Merge lp:~azzar1/gtk/lp-1574693-shadows into lp:~ubuntu-desktop/gtk/ubuntugtk3

Proposed by Andrea Azzarone
Status: Merged
Merged at revision: 516
Proposed branch: lp:~azzar1/gtk/lp-1574693-shadows
Merge into: lp:~ubuntu-desktop/gtk/ubuntugtk3
Diff against target: 129 lines (+36/-12)
2 files modified
debian/changelog (+7/-0)
debian/patches/unity-border-radius.patch (+29/-12)
To merge this branch: bzr merge lp:~azzar1/gtk/lp-1574693-shadows
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Ubuntu Desktop Pending
Review via email: mp+293082@code.launchpad.net

Commit message

Make sure shadows are drawn for menus on Unity.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Works for me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-03-24 14:41:53 +0000
3+++ debian/changelog 2016-04-27 11:59:48 +0000
4@@ -1,3 +1,10 @@
5+gtk+3.0 (3.18.9-1ubuntu4) UNRELEASED; urgency=medium
6+
7+ * debian/patches/unity-border-radius.patch:
8+ - Make sure shadows are drawn for menus on Unity.
9+
10+ -- Andrea <andrea.azzarone@canonical.com> Wed, 27 Apr 2016 11:47:31 +0200
11+
12 gtk+3.0 (3.18.9-1ubuntu3) xenial; urgency=medium
13
14 * Merge branch from Marco Trevisan to hide buttons in headerbar apps when
15
16=== modified file 'debian/patches/unity-border-radius.patch'
17--- debian/patches/unity-border-radius.patch 2016-03-17 13:35:12 +0000
18+++ debian/patches/unity-border-radius.patch 2016-04-27 11:59:48 +0000
19@@ -4,10 +4,10 @@
20 Author: Marco Trevisan <marco.trevisan@canonical.com>
21 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1516403
22
23-Index: gtk+3.0-3.18.8/gtk/gtkwindow.c
24+Index: gtk+3.0-3.18.9/gtk/gtkwindow.c
25 ===================================================================
26---- gtk+3.0-3.18.8.orig/gtk/gtkwindow.c
27-+++ gtk+3.0-3.18.8/gtk/gtkwindow.c
28+--- gtk+3.0-3.18.9.orig/gtk/gtkwindow.c
29++++ gtk+3.0-3.18.9/gtk/gtkwindow.c
30 @@ -232,6 +232,7 @@ struct _GtkWindowPrivate
31 guint csd_requested : 1;
32 guint client_decorated : 1; /* Decorations drawn client-side */
33@@ -67,7 +67,7 @@
34 + border_radius = gdk_x11_get_xatom_by_name_for_display (display,
35 + "_UNITY_GTK_BORDER_RADIUS");
36 +
37-+ if (corners[TOP_LEFT] || corners[TOP_RIGHT] || corners[BOTTOM_LEFT] || corners[BOTTOM_RIGHT])
38++ if (priv->client_decorated)
39 + {
40 + XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
41 + GDK_WINDOW_XID (gdk_window),
42@@ -177,7 +177,24 @@
43 }
44 else
45 {
46-@@ -4118,6 +4247,7 @@ gtk_window_set_titlebar (GtkWindow *wind
47+@@ -4057,6 +4186,9 @@ gtk_window_enable_csd (GtkWindow *window
48+ }
49+
50+ priv->client_decorated = TRUE;
51++
52++ if (priv->use_unity_border_radius)
53++ unity_border_radius_update (window);
54+ }
55+
56+ static void
57+@@ -4114,10 +4246,14 @@ gtk_window_set_titlebar (GtkWindow *wind
58+ priv->client_decorated = FALSE;
59+ gtk_style_context_remove_class (gtk_widget_get_style_context (widget), GTK_STYLE_CLASS_CSD);
60+
61++ if (priv->use_unity_border_radius)
62++ unity_border_radius_update (window);
63++
64+ goto out;
65 }
66
67 priv->use_client_shadow = gtk_window_supports_client_shadow (window);
68@@ -185,7 +202,7 @@
69
70 gtk_window_enable_csd (window);
71 priv->title_box = titlebar;
72-@@ -4129,6 +4259,8 @@ gtk_window_set_titlebar (GtkWindow *wind
73+@@ -4129,6 +4265,8 @@ gtk_window_set_titlebar (GtkWindow *wind
74 on_titlebar_title_notify (GTK_HEADER_BAR (titlebar), NULL, window);
75 }
76
77@@ -194,7 +211,7 @@
78 gtk_style_context_add_class (gtk_widget_get_style_context (titlebar),
79 GTK_STYLE_CLASS_TITLEBAR);
80
81-@@ -5857,13 +5989,19 @@ create_decoration (GtkWidget *widget)
82+@@ -5857,13 +5995,19 @@ create_decoration (GtkWidget *widget)
83 GtkWindowPrivate *priv = window->priv;
84
85 priv->use_client_shadow = gtk_window_supports_client_shadow (window);
86@@ -217,7 +234,7 @@
87
88 if (priv->title_box == NULL)
89 {
90-@@ -5871,6 +6009,8 @@ create_decoration (GtkWidget *widget)
91+@@ -5871,6 +6015,8 @@ create_decoration (GtkWidget *widget)
92 gtk_widget_set_parent (priv->titlebar, widget);
93 gtk_widget_show_all (priv->titlebar);
94 priv->title_box = priv->titlebar;
95@@ -226,7 +243,7 @@
96 }
97
98 update_window_buttons (window);
99-@@ -6547,6 +6687,9 @@ get_shadow_width (GtkWindow *window,
100+@@ -6547,6 +6693,9 @@ get_shadow_width (GtkWindow *window,
101 if (!priv->decorated)
102 return;
103
104@@ -236,7 +253,7 @@
105 if (!priv->client_decorated &&
106 !(gtk_window_should_use_csd (window) &&
107 gtk_window_supports_client_shadow (window)))
108-@@ -7141,7 +7284,7 @@ gtk_window_realize (GtkWidget *widget)
109+@@ -7141,7 +7290,7 @@ gtk_window_realize (GtkWidget *widget)
110
111 attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
112
113@@ -245,7 +262,7 @@
114 {
115 const gchar *cursor[8] = {
116 "nw-resize", "n-resize", "ne-resize",
117-@@ -7223,6 +7366,12 @@ gtk_window_realize (GtkWidget *widget)
118+@@ -7223,6 +7372,12 @@ gtk_window_realize (GtkWidget *widget)
119 }
120 #endif
121
122@@ -258,7 +275,7 @@
123 child_allocation.x = 0;
124 child_allocation.y = 0;
125 child_allocation.width = allocation.width;
126-@@ -10587,7 +10736,7 @@ gtk_window_set_screen (GtkWindow *window
127+@@ -10587,7 +10742,7 @@ gtk_window_set_screen (GtkWindow *window
128 }
129 g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_SCREEN]);
130

Subscribers

People subscribed via source and target branches