Merge lp:~pete-woods/hud/maybe-help-with-bug-1253676 into lp:hud/14.04

Proposed by Pete Woods
Status: Merged
Approved by: Antti Kaijanmäki
Approved revision: 350
Merged at revision: 348
Proposed branch: lp:~pete-woods/hud/maybe-help-with-bug-1253676
Merge into: lp:hud/14.04
Diff against target: 87 lines (+28/-3)
3 files modified
src/application-list.c (+24/-0)
src/query.c (+1/-0)
tests/CMakeLists.txt (+3/-3)
To merge this branch: bzr merge lp:~pete-woods/hud/maybe-help-with-bug-1253676
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Antti Kaijanmäki (community) Approve
Review via email: mp+197467@code.launchpad.net

Commit message

Initialize the current_source pointer

Description of the change

Initialize the current_source pointer

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

Not initializing the current_source to NULL is clearly an error.
Approved.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

OK. Tested on nexus 4 and a laptop.
Fixes the identified crash.

Revision history for this message
Antti Kaijanmäki (kaijanmaki) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
350. By Pete Woods

Disable the unreliable tests - a new HUD is coming

Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

Yes, those tests would not have passed on armhf for unrelated technical reasons.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/application-list.c'
2--- src/application-list.c 2013-11-04 17:25:57 +0000
3+++ src/application-list.c 2013-12-04 10:35:17 +0000
4@@ -35,6 +35,7 @@
5 HudApplicationSource * last_focused_main_stage_source;
6
7 DBusWindowStack * window_stack;
8+ guint bus_watch_id;
9 gulong matcher_app_sig;
10 gulong matcher_view_open_sig;
11 gulong matcher_view_close_sig;
12@@ -141,8 +142,27 @@
13 }
14
15 static void
16+window_stack_vanished(G_GNUC_UNUSED GDBusConnection *connection,
17+ const gchar *name, gpointer user_data) {
18+ HudApplicationList *self = HUD_APPLICATION_LIST(user_data);
19+
20+ g_debug("window stack vanished %s", name);
21+
22+ g_hash_table_remove_all(self->priv->applications);
23+
24+ self->priv->used_source = NULL;
25+ self->priv->last_focused_main_stage_source = NULL;
26+
27+ hud_source_changed(HUD_SOURCE(self));
28+}
29+
30+static void
31 matching_setup (HudApplicationList * self)
32 {
33+ self->priv->bus_watch_id = g_bus_watch_name(G_BUS_TYPE_SESSION,
34+ "com.canonical.Unity.WindowStack", G_BUS_NAME_WATCHER_FLAGS_NONE,
35+ NULL, window_stack_vanished, self, NULL);
36+
37 GError *error = NULL;
38 self->priv->window_stack = dbus_window_stack_proxy_new_for_bus_sync(
39 G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE,
40@@ -227,6 +247,10 @@
41 HudApplicationList * self = HUD_APPLICATION_LIST(object);
42 g_debug("Application List Dispose Start");
43
44+ if(self->priv->bus_watch_id > 0) {
45+ g_bus_unwatch_name(self->priv->bus_watch_id);
46+ }
47+
48 if (self->priv->used_source != NULL) {
49 hud_source_unuse(self->priv->used_source);
50 self->priv->used_source = NULL;
51
52=== modified file 'src/query.c'
53--- src/query.c 2013-08-21 19:33:16 +0000
54+++ src/query.c 2013-12-04 10:35:17 +0000
55@@ -896,6 +896,7 @@
56 {
57 GError *error = NULL;
58
59+ query->current_source = NULL;
60 query->refresh_id = 0;
61 query->voice_idle = 0;
62
63
64=== modified file 'tests/CMakeLists.txt'
65--- tests/CMakeLists.txt 2013-10-08 21:02:15 +0000
66+++ tests/CMakeLists.txt 2013-12-04 10:35:17 +0000
67@@ -204,17 +204,17 @@
68 # HUD Test Suite
69 #######################
70
71-hudtest(test-watchdog test-watchdog.c test-watchdog.xml)
72+#hudtest(test-watchdog test-watchdog.c test-watchdog.xml)
73 hudtest(test-distance test-distance.c test-distance.xml)
74 hudtest(test-hud-item test-huditem.c test-hud-item.xml)
75 hudtest(test-result-highlighting test-result-highlighting.c test-result-highlighting.xml)
76 hudtest(test-menu-input test-menu-input.c test-menu-input.xml)
77-hudtest(test-keyword-mapping test-keyword-mapping.c test-keyword-mapping.xml)
78-add_dependencies(test-keyword-mapping keyword-files)
79 hudtest(test-string-list test-string-list.c test-string-list.xml)
80 hudtest(test-pronounce-dict test-pronounce-dict.c test-pronounce-dict.xml)
81 # FIXME: Disabled temporarily on platform-api systems due to some platform-api problems
82 if(${ENABLE_BAMF})
83+ hudtest(test-keyword-mapping test-keyword-mapping.c test-keyword-mapping.xml)
84+ add_dependencies(test-keyword-mapping keyword-files)
85 hudtest(test-source test-source.c test-source.xml)
86 endif()
87 hudtest(test-app-indicator-source test-app-indicator-source.c test-app-indicator-source.xml)

Subscribers

People subscribed via source and target branches