r45509 - in /desktop/unstable/metacity/debian: changelog patches/fix_crash_on_destroying.diff patches/series

mitya57 at users.alioth.debian.org mitya57 at users.alioth.debian.org
Wed Jul 8 11:49:50 UTC 2015


Author: mitya57
Date: Wed Jul  8 11:49:50 2015
New Revision: 45509

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=45509
Log:
Add a patch to fix potential crash when destroying windows
(from Alberts Muktupāvels).

Added:
    desktop/unstable/metacity/debian/patches/fix_crash_on_destroying.diff
Modified:
    desktop/unstable/metacity/debian/changelog
    desktop/unstable/metacity/debian/patches/series

Modified: desktop/unstable/metacity/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/changelog?rev=45509&op=diff
==============================================================================
--- desktop/unstable/metacity/debian/changelog	[utf-8] (original)
+++ desktop/unstable/metacity/debian/changelog	[utf-8] Wed Jul  8 11:49:50 2015
@@ -1,3 +1,10 @@
+metacity (1:3.17.2-4) UNRELEASED; urgency=medium
+
+  * Add a patch to fix potential crash when destroying windows
+    (from Alberts Muktupāvels).
+
+ -- Dmitry Shachnev <mitya57 at debian.org>  Wed, 08 Jul 2015 14:49:11 +0300
+
 metacity (1:3.17.2-3) unstable; urgency=medium
 
   * Update README.Debian.

Added: desktop/unstable/metacity/debian/patches/fix_crash_on_destroying.diff
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/patches/fix_crash_on_destroying.diff?rev=45509&op=file
==============================================================================
--- desktop/unstable/metacity/debian/patches/fix_crash_on_destroying.diff	(added)
+++ desktop/unstable/metacity/debian/patches/fix_crash_on_destroying.diff	[utf-8] Wed Jul  8 11:49:50 2015
@@ -0,0 +1,88 @@
+Description: compositor: fix possible crash closing/destroying window
+Author: Alberts Muktupāvels <alberts.muktupavels at gmail.com>
+Origin: https://bugzilla.gnome.org/show_bug.cgi?id=751833#c13
+Last-Update: 2015-07-08
+
+--- a/src/compositor/compositor-private.h
++++ b/src/compositor/compositor-private.h
+@@ -48,6 +48,9 @@
+                              MetaScreen     *screen,
+                              MetaWindow     *window);
+ 
++  void (*free_window) (MetaCompositor *compositor,
++                       MetaWindow     *window);
++
+   void (*maximize_window)   (MetaCompositor *compositor,
+                              MetaWindow     *window);
+   void (*unmaximize_window) (MetaCompositor *compositor,
+--- a/src/compositor/compositor-xrender.c
++++ b/src/compositor/compositor-xrender.c
+@@ -2799,23 +2799,38 @@
+ #ifdef HAVE_COMPOSITE_EXTENSIONS
+ #endif
+ }
++#endif /* 0 */
+ 
+ static void
+ xrender_free_window (MetaCompositor *compositor,
+                      MetaWindow     *window)
+ {
+ #ifdef HAVE_COMPOSITE_EXTENSIONS
+-  /* FIXME: When an undecorated window is hidden this is called,
+-     but the window does not get readded if it is subsequentally shown again
+-     See http://bugzilla.gnome.org/show_bug.cgi?id=504876
+-
+-     I don't *think* theres any need for this call anyway, leaving it out
+-     does not seem to cause any side effects so far, but I should check with
+-     someone who understands more. */
+-  /* destroy_win (compositor->display, window->xwindow, FALSE); */
++  MetaCompositorXRender *xrc;
++  MetaFrame *frame;
++  Window xwindow;
++
++  xrc = (MetaCompositorXRender *) compositor;
++  frame = meta_window_get_frame (window);
++  xwindow = None;
++
++  if (frame)
++    {
++      xwindow = meta_frame_get_xwindow (frame);
++    }
++  else
++    {
++      /* FIXME: When an undecorated window is hidden this is called, but the
++       * window does not get readded if it is subsequentally shown again. See:
++       * http://bugzilla.gnome.org/show_bug.cgi?id=504876
++       */
++      /* xwindow = meta_window_get_xwindow (window); */
++    }
++
++  if (xwindow != None)
++    destroy_win (xrc->display, xwindow, FALSE);
+ #endif
+ }
+-#endif /* 0 */
+ 
+ static void
+ xrender_process_event (MetaCompositor *compositor,
+@@ -3095,6 +3110,7 @@
+   xrender_process_event,
+   xrender_get_window_pixmap,
+   xrender_set_active_window,
++  xrender_free_window,
+   xrender_maximize_window,
+   xrender_unmaximize_window,
+ };
+--- a/src/compositor/compositor.c
++++ b/src/compositor/compositor.c
+@@ -154,6 +154,10 @@
+ void meta_compositor_free_window (MetaCompositor *compositor,
+                                   MetaWindow     *window)
+ {
++#ifdef HAVE_COMPOSITE_EXTENSIONS
++  if (compositor && compositor->free_window)
++    compositor->free_window (compositor, window);
++#endif
+ }
+ 
+ void

Modified: desktop/unstable/metacity/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/patches/series?rev=45509&op=diff
==============================================================================
--- desktop/unstable/metacity/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/metacity/debian/patches/series	[utf-8] Wed Jul  8 11:49:50 2015
@@ -1 +1,2 @@
 check_display.diff
+fix_crash_on_destroying.diff




More information about the pkg-gnome-commits mailing list