Merge lp:~mkhu/compiz/compiz.fix_1101648 into lp:compiz/0.9.10

Proposed by Micheal Hsu
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3706
Merged at revision: 3712
Proposed branch: lp:~mkhu/compiz/compiz.fix_1101648
Merge into: lp:compiz/0.9.10
Diff against target: 57 lines (+23/-2)
1 file modified
gtk/window-decorator/events.c (+23/-2)
To merge this branch: bzr merge lp:~mkhu/compiz/compiz.fix_1101648
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Sam Spilsbury Approve
Review via email: mp+164060@code.launchpad.net

Commit message

gtk-window-decorator: destroy action menu when any of the (close, min, max) buttons on the title bar is pressed

Description of the change

destroy action menu when any of the (close, min, max) buttons on the title bar is pressed

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Great, thanks!

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 'gtk/window-decorator/events.c'
2--- gtk/window-decorator/events.c 2013-05-13 15:39:25 +0000
3+++ gtk/window-decorator/events.c 2013-05-16 01:14:25 +0000
4@@ -134,6 +134,13 @@
5 decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
6 guint state = d->button_states[BUTTON_CLOSE];
7
8+ if (action_menu_mapped && gtkwd_type == GButtonPress)
9+ {
10+ gtk_object_destroy (GTK_OBJECT (action_menu));
11+ action_menu_mapped = FALSE;
12+ action_menu = NULL;
13+ }
14+
15 common_button_event (win, gtkwd_event, gtkwd_type,
16 BUTTON_CLOSE, 1, _("Close Window"));
17
18@@ -156,6 +163,13 @@
19 decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
20 guint state = d->button_states[BUTTON_MAX];
21
22+ if (action_menu_mapped && gtkwd_type == GButtonPress)
23+ {
24+ gtk_object_destroy (GTK_OBJECT (action_menu));
25+ action_menu_mapped = FALSE;
26+ action_menu = NULL;
27+ }
28+
29 if (wnck_window_is_maximized (win))
30 common_button_event (win, gtkwd_event, gtkwd_type, BUTTON_MAX,
31 3, _("Unmaximize Window"));
32@@ -210,6 +224,13 @@
33 decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
34 guint state = d->button_states[BUTTON_MIN];
35
36+ if (action_menu_mapped && gtkwd_type == GButtonPress)
37+ {
38+ gtk_object_destroy (GTK_OBJECT (action_menu));
39+ action_menu_mapped = FALSE;
40+ action_menu = NULL;
41+ }
42+
43 common_button_event (win, gtkwd_event, gtkwd_type,
44 BUTTON_MIN, 1, _("Minimize Window"));
45
46@@ -991,9 +1012,9 @@
47 GdkScreen *g_screen = gdk_display_get_default_screen (gdkdisplay);
48 Window root = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (g_screen));
49 WnckScreen *screen;
50-
51+
52 screen = wnck_screen_get_for_root (root);
53-
54+
55 if (screen)
56 {
57 if (gwd_process_decor_shadow_property_update ())

Subscribers

People subscribed via source and target branches