Merge lp:~darkxst/ubuntu/saucy/gtk+3.0/lp1181632 into lp:~ubuntu-desktop/gtk/ubuntugtk3

Proposed by Tim Lunn
Status: Merged
Merged at revision: 284
Proposed branch: lp:~darkxst/ubuntu/saucy/gtk+3.0/lp1181632
Merge into: lp:~ubuntu-desktop/gtk/ubuntugtk3
Diff against target: 179 lines (+159/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/git_disable_frame_sync_gtkplug.patch (+150/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~darkxst/ubuntu/saucy/gtk+3.0/lp1181632
Reviewer Review Type Date Requested Status
Jeremy Bícha Approve
Review via email: mp+176303@code.launchpad.net

Description of the change

upstream git patch that fixes gnome-screensaver not redrawing when using lightdm with gnome-shell.

To post a comment you must log in.
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Thanks!

I didn't really get an email about this one either except for this minor note in the bug mail:

 Branch linked: lp:~darkxst/ubuntu/saucy/gtk+3.0/lp1181632

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 2013-07-22 23:01:47 +0000
3+++ debian/changelog 2013-07-22 23:48:26 +0000
4@@ -1,3 +1,11 @@
5+gtk+3.0 (3.8.2-3ubuntu3) UNRELEASED; urgency=low
6+
7+ * debian/patches/git_disable_frame_sync_gtkplug.patch:
8+ - Fixes gnome-screensaver not redrawing when used with
9+ lightdm/gnome-shell (LP: #1181632)
10+
11+ -- Tim Lunn <tim@feathertop.org> Tue, 23 Jul 2013 09:27:13 +1000
12+
13 gtk+3.0 (3.8.2-3ubuntu2) saucy; urgency=low
14
15 * Use simply expanded variable to avoid FTBFS due to recursive reference of
16
17=== added file 'debian/patches/git_disable_frame_sync_gtkplug.patch'
18--- debian/patches/git_disable_frame_sync_gtkplug.patch 1970-01-01 00:00:00 +0000
19+++ debian/patches/git_disable_frame_sync_gtkplug.patch 2013-07-22 23:48:26 +0000
20@@ -0,0 +1,150 @@
21+From e061305d617da3eafdedabe00031c31be9acdc03 Mon Sep 17 00:00:00 2001
22+From: "Owen W. Taylor" <otaylor@fishsoup.net>
23+Date: Wed, 26 Jun 2013 10:05:38 -0400
24+Subject: [PATCH] Disable frame sync for GtkPlug
25+
26+Plug windows weren't redrawing properly because the embedded
27+window was expecting to get messages for each frame from the
28+compositor, but the compositor doesn't know about embedded
29+windows. Simply disable frame sync for GtkPlug's GdkWindow -
30+extending XEMBED to handle frame sync isn't interesting
31+at this point.
32+
33+A new API gdk_x11_window_set_frame_sync_enabled() is added
34+to allow this to be done.
35+
36+https://bugzilla.gnome.org/show_bug.cgi?id=701613
37+---
38+ gdk/x11/gdkwindow-x11.c | 35 ++++++++++++++++++++++++++++++++++-
39+ gdk/x11/gdkwindow-x11.h | 3 +++
40+ gdk/x11/gdkx11window.h | 4 ++++
41+ gtk/gtkplug.c | 7 +++++++
42+ 4 files changed, 48 insertions(+), 1 deletion(-)
43+
44+diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
45+index 26eaf69..ca42e86 100644
46+--- a/gdk/x11/gdkwindow-x11.c
47++++ b/gdk/x11/gdkwindow-x11.c
48+@@ -157,6 +157,7 @@ gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
49+ impl->toplevel_window_type = -1;
50+ impl->device_cursor = g_hash_table_new_full (NULL, NULL,
51+ NULL, g_object_unref);
52++ impl->frame_sync_enabled = TRUE;
53+ }
54+
55+ GdkToplevelX11 *
56+@@ -403,7 +404,8 @@ gdk_x11_window_end_frame (GdkWindow *window)
57+ impl->toplevel->extended_update_counter,
58+ impl->toplevel->current_counter_value);
59+
60+- if (gdk_x11_screen_supports_net_wm_hint (gdk_window_get_screen (window),
61++ if (impl->frame_sync_enabled &&
62++ gdk_x11_screen_supports_net_wm_hint (gdk_window_get_screen (window),
63+ gdk_atom_intern_static_string ("_NET_WM_FRAME_DRAWN")))
64+ {
65+ impl->toplevel->frame_pending = TRUE;
66+@@ -5306,6 +5308,37 @@ gdk_x11_window_get_xid (GdkWindow *window)
67+ return GDK_WINDOW_IMPL_X11 (window->impl)->xid;
68+ }
69+
70++/**
71++ * gdk_x11_window_set_frame_sync_enabled:
72++ * @window: (type GdkX11Window): a native #GdkWindow
73++ * @frame_sync_enabled: whether frame-synchronization should be enabled
74++ *
75++ * This function can be used to disable frame synchronization for a window.
76++ * Normally frame synchronziation will be enabled or disabled based on whether
77++ * the system has a compositor that supports frame synchronization, but if
78++ * the window is not directly managed by the window manager, then frame
79++ * synchronziation may need to be disabled. This is the case for a window
80++ * embedded via the XEMBED protocol.
81++ *
82++ * Since: 3.8
83++ */
84++void
85++gdk_x11_window_set_frame_sync_enabled (GdkWindow *window,
86++ gboolean frame_sync_enabled)
87++{
88++ /* Try to ensure the window has a native window */
89++ if (!_gdk_window_has_impl (window))
90++ gdk_window_ensure_native (window);
91++
92++ if (!GDK_WINDOW_IS_X11 (window))
93++ {
94++ g_warning (G_STRLOC " drawable is not a native X11 window");
95++ return;
96++ }
97++
98++ GDK_WINDOW_IMPL_X11 (window->impl)->frame_sync_enabled = FALSE;
99++}
100++
101+ static void
102+ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
103+ {
104+diff --git a/gdk/x11/gdkwindow-x11.h b/gdk/x11/gdkwindow-x11.h
105+index 9982a5e..7e9b4dd 100644
106+--- a/gdk/x11/gdkwindow-x11.h
107++++ b/gdk/x11/gdkwindow-x11.h
108+@@ -73,6 +73,7 @@ struct _GdkWindowImplX11
109+ * unset during resizing and scaling */
110+ guint override_redirect : 1;
111+ guint frame_clock_connected : 1;
112++ guint frame_sync_enabled : 1;
113+
114+ cairo_surface_t *cairo_surface;
115+
116+@@ -172,6 +173,8 @@ GType gdk_window_impl_x11_get_type (void);
117+
118+ void gdk_x11_window_set_user_time (GdkWindow *window,
119+ guint32 timestamp);
120++void gdk_x11_window_set_frame_sync_enabled (GdkWindow *window,
121++ gboolean frame_sync_enabled);
122+
123+ GdkToplevelX11 *_gdk_x11_window_get_toplevel (GdkWindow *window);
124+ void _gdk_x11_window_tmp_unset_bg (GdkWindow *window,
125+diff --git a/gdk/x11/gdkx11window.h b/gdk/x11/gdkx11window.h
126+index 88cc40f..63090ed 100644
127+--- a/gdk/x11/gdkx11window.h
128++++ b/gdk/x11/gdkx11window.h
129+@@ -67,6 +67,10 @@ void gdk_x11_window_set_hide_titlebar_when_maximized (GdkWindow *window,
130+ gboolean hide_titlebar_when_maximized);
131+ void gdk_x11_window_move_to_current_desktop (GdkWindow *window);
132+
133++GDK_AVAILABLE_IN_3_8
134++void gdk_x11_window_set_frame_sync_enabled (GdkWindow *window,
135++ gboolean frame_sync_enabled);
136++
137+ /**
138+ * GDK_WINDOW_XDISPLAY:
139+ * @win: a #GdkWindow.
140+diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
141+index c93adeb..9171278 100644
142+--- a/gtk/gtkplug.c
143++++ b/gtk/gtkplug.c
144+@@ -1057,6 +1057,13 @@ gtk_plug_realize (GtkWidget *widget)
145+ else /* If it's a passive plug, we use the root window */
146+ gdk_window = gdk_window_new (gtk_widget_get_root_window (widget),
147+ &attributes, attributes_mask);
148++ /* Because the window isn't known to the window manager,
149++ * frame sync won't work. In theory, XEMBED could be extended
150++ * so that embedder did frame sync like a window manager, but
151++ * it's just not worth the effort considering the current
152++ * minimal use of XEMBED.
153++ */
154++ gdk_x11_window_set_frame_sync_enabled (gdk_window, FALSE);
155+ gtk_widget_set_window (widget, gdk_window);
156+
157+ gdk_display_sync (gtk_widget_get_display (widget));
158+--- a/gdk/gdk.symbols
159++++ b/gdk/gdk.symbols
160+@@ -631,6 +631,7 @@
161+ gdk_x11_window_get_type
162+ gdk_x11_window_get_xid
163+ gdk_x11_window_move_to_current_desktop
164++gdk_x11_window_set_frame_sync_enabled
165+ gdk_x11_window_set_theme_variant
166+ gdk_x11_window_set_hide_titlebar_when_maximized
167+ gdk_x11_window_set_user_time
168+--
169+1.8.3.2
170+
171
172=== modified file 'debian/patches/series'
173--- debian/patches/series 2013-07-22 23:01:47 +0000
174+++ debian/patches/series 2013-07-22 23:48:26 +0000
175@@ -27,3 +27,4 @@
176 git_filechooser_signal.patch
177 git_fileselect_subdir.patch
178 080_correct_padding_of_submenu_arrows.patch
179+git_disable_frame_sync_gtkplug.patch

Subscribers

People subscribed via source and target branches

to all changes: