Merge lp:~azzar1/gtk/fix-1720400 into lp:~ubuntu-desktop/gtk/ubuntugtk3

Proposed by Andrea Azzarone
Status: Merged
Merged at revision: 580
Proposed branch: lp:~azzar1/gtk/fix-1720400
Merge into: lp:~ubuntu-desktop/gtk/ubuntugtk3
Diff against target: 61 lines (+41/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/clear_glcontext_on_window_withdraw.patch (+32/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~azzar1/gtk/fix-1720400
Reviewer Review Type Date Requested Status
Jeremy Bícha Approve
Review via email: mp+332776@code.launchpad.net

Commit message

Apply proposed fix for a segmentation fault when adding Google online account.

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

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2017-10-16 12:35:41 +0000
+++ debian/changelog 2017-10-25 11:51:35 +0000
@@ -1,3 +1,11 @@
1gtk+3.0 (3.22.24-0ubuntu3) UNRELEASED; urgency=medium
2
3 * Add clear_glcontext_on_window_withdraw.patch:
4 - Apply proposed fix for a segmentation fault when
5 adding Google online account (LP: #1720400)
6
7 -- Andrea Azzarone <andrea.azzarone@canonical.com> Wed, 25 Oct 2017 11:16:44 +0000
8
1gtk+3.0 (3.22.24-0ubuntu2) UNRELEASED; urgency=medium9gtk+3.0 (3.22.24-0ubuntu2) UNRELEASED; urgency=medium
210
3 * Add 0004_fix-gtkentry-wayland-regression.patch:11 * Add 0004_fix-gtkentry-wayland-regression.patch:
412
=== added file 'debian/patches/clear_glcontext_on_window_withdraw.patch'
--- debian/patches/clear_glcontext_on_window_withdraw.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/clear_glcontext_on_window_withdraw.patch 2017-10-25 11:51:35 +0000
@@ -0,0 +1,32 @@
1Description: (gdk) Clear GL context when window is withdrawn
2 Some clients (e.g. gnome-online-accounts) quickly unmap and map
3 a window. With some backends the backend surface will be replaced
4 causing the application to crash because the GL context is still
5 using the old surface. Clearing the GL context when a window is
6 withdrawn fixes this.
7Author: Andrea Azzarone <andrea.azzarone@canonical.com>
8Origin: ubuntu
9Bug: https://bugzilla.gnome.org/show_bug.cgi?id=789141
10Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1720400
11
12--- a/gdk/gdkwindow.c
13+++ b/gdk/gdkwindow.c
14@@ -5744,6 +5744,7 @@
15 {
16 GdkWindowImplClass *impl_class;
17 gboolean was_mapped;
18+ GdkGLContext *current_context;
19
20 g_return_if_fail (GDK_IS_WINDOW (window));
21
22@@ -5768,6 +5769,10 @@
23 _gdk_synthesize_crossing_events_for_geometry_change (window->parent);
24 }
25
26+ current_context = gdk_gl_context_get_current ();
27+ if (current_context != NULL && gdk_gl_context_get_window (current_context) == window)
28+ gdk_gl_context_clear_current ();
29+
30 recompute_visible_regions (window, FALSE);
31 gdk_window_clear_old_updated_area (window);
32 }
033
=== modified file 'debian/patches/series'
--- debian/patches/series 2017-10-16 12:35:41 +0000
+++ debian/patches/series 2017-10-25 11:51:35 +0000
@@ -28,3 +28,4 @@
28unity-headerbar-maximized-mode.patch28unity-headerbar-maximized-mode.patch
29gtksocket-unscale-before-sending-configurenotify.patch29gtksocket-unscale-before-sending-configurenotify.patch
30no_content_hub.patch30no_content_hub.patch
31clear_glcontext_on_window_withdraw.patch

Subscribers

People subscribed via source and target branches