Hello community,

here is the log from the commit of package mutter for openSUSE:Factory checked 
in at 2014-12-21 12:02:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mutter (Old)
 and      /work/SRC/openSUSE:Factory/.mutter.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mutter"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mutter/mutter.changes    2014-12-17 
19:18:30.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.mutter.new/mutter.changes       2014-12-21 
12:01:19.000000000 +0100
@@ -1,0 +2,17 @@
+Fri Dec 19 15:16:54 UTC 2014 - [email protected]
+
+- Update to version 3.14.3:
+  + Fix crash when trying to unredirect a destroyed window
+    (bgo#740133).
+  + Fix "flicker" during startup transition (bgo#740377).
+  + Don't leave left-over frames queued (bgo#738686).
+  + Set CRTC configuration even if it might be redundant
+    (bgo#740838).
+- Drop upstreamed patches:
+  + mutter-black-screen-during-login.patch.
+  + mutter-window-actor-unredirection-when-destroyed.patch.
+  + mutter-empty-input-shapes-windows.patch.
+  + mutter-left-over-queued-frames.patch.
+  + mutter-dont-overwrite-send_frame_messages_timer.patch.
+
+-------------------------------------------------------------------

Old:
----
  mutter-3.14.2.tar.xz
  mutter-black-screen-during-login.patch
  mutter-dont-overwrite-send_frame_messages_timer.patch
  mutter-empty-input-shapes-windows.patch
  mutter-left-over-queued-frames.patch
  mutter-window-actor-unredirection-when-destroyed.patch

New:
----
  mutter-3.14.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mutter.spec ++++++
--- /var/tmp/diff_new_pack.1ZKZqx/_old  2014-12-21 12:01:20.000000000 +0100
+++ /var/tmp/diff_new_pack.1ZKZqx/_new  2014-12-21 12:01:20.000000000 +0100
@@ -23,23 +23,13 @@
 %endif
 
 Name:           mutter
-Version:        3.14.2
+Version:        3.14.3
 Release:        0
 Summary:        Window and compositing manager based on Clutter
 License:        GPL-2.0+
 Group:          System/GUI/GNOME
 Url:            http://www.gnome.org
 Source:         
http://download.gnome.org/sources/mutter/3.14/%{name}-%{version}.tar.xz
-# PATCH-FIX-UPSTREAM mutter-black-screen-during-login.patch bgo#740377 
[email protected] --Disable ugly black screen during login; patch taken from 
upstream git
-Patch0:         mutter-black-screen-during-login.patch
-# PATCH-FIX-UPSTREAM mutter-window-actor-unredirection-when-destroyed.patch 
bgo#740133 [email protected] -- window-actor: Do not request unredirection 
when destroyed; patch taken from upstream
-Patch1:         mutter-window-actor-unredirection-when-destroyed.patch
-# PATCH-FIX-UPSTREAM mutter-empty-input-shapes-windows.patch 
[email protected] -- window-x11: Fix windows that set empty input shapes; 
patch taken from upstream git
-Patch2:         mutter-empty-input-shapes-windows.patch
-# PATCH-FIX-UPSTREAM mutter-left-over-queued-frames.patch bgo#738686 
[email protected] -- Fix problems resulting in left-over queued frames; 
patch taken from upstream git
-Patch3:         mutter-left-over-queued-frames.patch
-# PATCH-FIX-UPSTREAM mutter-dont-overwrite-send_frame_messages_timer.patch 
bgo#738686 [email protected] -- MetaWindowActor: don't overwrite 
send_frame_messages_timer; patch taken from upstream git
-Patch4:         mutter-dont-overwrite-send_frame_messages_timer.patch
 BuildRequires:  fdupes
 BuildRequires:  gobject-introspection-devel >= 0.9.5
 BuildRequires:  intltool
@@ -151,11 +141,6 @@
 %lang_package
 %prep
 %setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
 translation-update-upstream
 
 %build

++++++ mutter-3.14.2.tar.xz -> mutter-3.14.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutter-3.14.2/NEWS new/mutter-3.14.3/NEWS
--- old/mutter-3.14.2/NEWS      2014-11-12 19:00:43.000000000 +0100
+++ new/mutter-3.14.3/NEWS      2014-12-19 12:14:40.000000000 +0100
@@ -1,3 +1,13 @@
+3.14.3
+======
+* Fix crash when trying to unredirect a destroyed window [Florian; #740133]
+* Fix "flicker" during startup transition [Ray; #740377]
+* Don't leave left-over frames queued [Owen; #738686]
+* Set CRTC configuration even if it might be redundant [Rui; #740838]
+
+Contributors:
+  Rui Matos, Florian Müllner, Jasper St. Pierre, Ray Strode, Owen W. Taylor
+
 3.14.2
 ======
 * Prevent crash applying monitor config for a closed lid [Rui; #739450]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutter-3.14.2/configure new/mutter-3.14.3/configure
--- old/mutter-3.14.2/configure 2014-11-12 19:01:15.000000000 +0100
+++ new/mutter-3.14.3/configure 2014-12-19 12:14:48.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mutter 3.14.2.
+# Generated by GNU Autoconf 2.69 for mutter 3.14.3.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=mutter>.
 #
@@ -591,8 +591,8 @@
 # Identity of this package.
 PACKAGE_NAME='mutter'
 PACKAGE_TARNAME='mutter'
-PACKAGE_VERSION='3.14.2'
-PACKAGE_STRING='mutter 3.14.2'
+PACKAGE_VERSION='3.14.3'
+PACKAGE_STRING='mutter 3.14.3'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=mutter'
 PACKAGE_URL=''
 
@@ -1458,7 +1458,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mutter 3.14.2 to adapt to many kinds of systems.
+\`configure' configures mutter 3.14.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1532,7 +1532,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mutter 3.14.2:";;
+     short | recursive ) echo "Configuration of mutter 3.14.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1691,7 +1691,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mutter configure 3.14.2
+mutter configure 3.14.3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2243,7 +2243,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mutter $as_me 3.14.2, which was
+It was created by mutter $as_me 3.14.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3112,7 +3112,7 @@
 
 # Define the identity of the package.
  PACKAGE='mutter'
- VERSION='3.14.2'
+ VERSION='3.14.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3385,7 +3385,7 @@
 
 MUTTER_MAJOR_VERSION=3
 MUTTER_MINOR_VERSION=14
-MUTTER_MICRO_VERSION=2
+MUTTER_MICRO_VERSION=3
 MUTTER_PLUGIN_API_VERSION=3
 
 
@@ -17407,7 +17407,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mutter $as_me 3.14.2, which was
+This file was extended by mutter $as_me 3.14.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17473,7 +17473,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-mutter config.status 3.14.2
+mutter config.status 3.14.3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutter-3.14.2/configure.ac 
new/mutter-3.14.3/configure.ac
--- old/mutter-3.14.2/configure.ac      2014-11-12 19:00:54.000000000 +0100
+++ new/mutter-3.14.3/configure.ac      2014-12-19 12:14:40.000000000 +0100
@@ -2,7 +2,7 @@
 
 m4_define([mutter_major_version], [3])
 m4_define([mutter_minor_version], [14])
-m4_define([mutter_micro_version], [2])
+m4_define([mutter_micro_version], [3])
 
 m4_define([mutter_version],
           [mutter_major_version.mutter_minor_version.mutter_micro_version])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutter-3.14.2/doc/reference/html/index.html 
new/mutter-3.14.3/doc/reference/html/index.html
--- old/mutter-3.14.2/doc/reference/html/index.html     2014-11-12 
19:01:40.000000000 +0100
+++ new/mutter-3.14.3/doc/reference/html/index.html     2014-12-19 
12:15:00.000000000 +0100
@@ -15,7 +15,7 @@
 <div>
 <div><table class="navigation" id="top" width="100%" cellpadding="2" 
cellspacing="0"><tr><th valign="middle"><p class="title">Mutter Reference 
Manual</p></th></tr></table></div>
 <div><p class="releaseinfo">
-      This document is for Mutter 3.14.2.
+      This document is for Mutter 3.14.3.
       The latest version of this documentation can be found on-line at
       <a class="ulink" href="http://developer.gnome.org/meta/"; 
target="_top">http://developer.gnome.org/meta/</a>.
     </p></div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutter-3.14.2/doc/reference/meta-docs.sgml 
new/mutter-3.14.3/doc/reference/meta-docs.sgml
--- old/mutter-3.14.2/doc/reference/meta-docs.sgml      2014-11-12 
19:01:23.000000000 +0100
+++ new/mutter-3.14.3/doc/reference/meta-docs.sgml      2014-12-19 
12:14:51.000000000 +0100
@@ -3,7 +3,7 @@
                "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";
 [
   <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 
'http://www.w3.org/2003/XInclude'">
-  <!ENTITY version "3.14.2">
+  <!ENTITY version "3.14.3">
 ]>
 <book id="index">
   <bookinfo>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mutter-3.14.2/src/backends/x11/meta-monitor-manager-xrandr.c 
new/mutter-3.14.3/src/backends/x11/meta-monitor-manager-xrandr.c
--- old/mutter-3.14.2/src/backends/x11/meta-monitor-manager-xrandr.c    
2014-11-12 18:27:07.000000000 +0100
+++ new/mutter-3.14.3/src/backends/x11/meta-monitor-manager-xrandr.c    
2014-12-19 12:14:40.000000000 +0100
@@ -838,26 +838,12 @@
           unsigned int j, n_outputs;
           int width, height;
           Status ok;
-          unsigned long old_controlled_mask;
-          unsigned long new_controlled_mask;
 
           mode = crtc_info->mode;
 
           n_outputs = crtc_info->outputs->len;
           outputs = g_new (XID, n_outputs);
 
-          old_controlled_mask = 0;
-          for (j = 0; j < manager->n_outputs; j++)
-            {
-              MetaOutput *output;
-
-              output = &manager->outputs[j];
-
-              if (output->crtc == crtc)
-                old_controlled_mask |= 1UL << j;
-            }
-
-          new_controlled_mask = 0;
           for (j = 0; j < n_outputs; j++)
             {
               MetaOutput *output;
@@ -866,21 +852,10 @@
 
               output->is_dirty = TRUE;
               output->crtc = crtc;
-              new_controlled_mask |= 1UL << j;
 
               outputs[j] = output->winsys_id;
             }
 
-          if (crtc->current_mode == mode &&
-              crtc->rect.x == crtc_info->x &&
-              crtc->rect.y == crtc_info->y &&
-              crtc->transform == crtc_info->transform &&
-              old_controlled_mask == new_controlled_mask)
-            {
-              /* No change */
-              goto next;
-            }
-
           ok = XRRSetCrtcConfig (manager_xrandr->xdisplay,
                                  manager_xrandr->resources,
                                  (XID)crtc->crtc_id,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutter-3.14.2/src/compositor/meta-window-actor.c 
new/mutter-3.14.3/src/compositor/meta-window-actor.c
--- old/mutter-3.14.2/src/compositor/meta-window-actor.c        2014-11-07 
00:06:58.000000000 +0100
+++ new/mutter-3.14.3/src/compositor/meta-window-actor.c        2014-12-19 
11:57:58.000000000 +0100
@@ -100,7 +100,7 @@
   guint                    disposed               : 1;
 
   /* If set, the client needs to be sent a _NET_WM_FRAME_DRAWN
-   * client message using the most recent frame in ->frames */
+   * client message for one or more messages in ->frames */
   guint             needs_frame_drawn      : 1;
   guint             repaint_scheduled      : 1;
 
@@ -118,10 +118,21 @@
 
 typedef struct _FrameData FrameData;
 
+/* Each time the application updates the sync request counter to a new even 
value
+ * value, we queue a frame into the windows list of frames. Once we're painting
+ * an update "in response" to the window, we fill in frame_counter with the
+ * Cogl counter for that frame, and send _NET_WM_FRAME_DRAWN at the end of the
+ * frame. _NET_WM_FRAME_TIMINGS is sent when we get a frame_complete callback.
+ *
+ * As an exception, if a window is completely obscured, we try to throttle 
drawning
+ * to a slower frame rate. In this case, frame_counter stays -1 until
+ * send_frame_message_timeout() runs, at which point we send both the
+ * _NET_WM_FRAME_DRAWN and _NET_WM_FRAME_TIMINGS messages.
+ */
 struct _FrameData
 {
-  int64_t frame_counter;
   guint64 sync_request_serial;
+  int64_t frame_counter;
   gint64 frame_drawn_time;
 };
 
@@ -656,6 +667,30 @@
 }
 
 static void
+assign_frame_counter_to_frames (MetaWindowActor *self)
+{
+  MetaWindowActorPrivate *priv = self->priv;
+  GList *l;
+
+  /* If the window is obscured, then we're expecting to deal with sending
+   * frame messages in a timeout, rather than in this paint cycle.
+   */
+  if (priv->send_frame_messages_timer != 0)
+    return;
+
+  for (l = priv->frames; l; l = l->next)
+    {
+      FrameData *frame = l->data;
+
+      if (frame->frame_counter == -1)
+        {
+          CoglOnscreen *onscreen = COGL_ONSCREEN (cogl_get_draw_framebuffer());
+          frame->frame_counter = cogl_onscreen_get_frame_counter (onscreen);
+        }
+    }
+}
+
+static void
 meta_window_actor_paint (ClutterActor *actor)
 {
   MetaWindowActor *self = META_WINDOW_ACTOR (actor);
@@ -671,6 +706,8 @@
     {
       g_source_remove (priv->send_frame_messages_timer);
       priv->send_frame_messages_timer = 0;
+
+      assign_frame_counter_to_frames (self);
     }
 
   if (shadow != NULL)
@@ -873,16 +910,27 @@
 {
   MetaWindowActor *self = (MetaWindowActor *) data;
   MetaWindowActorPrivate *priv = self->priv;
-  FrameData *frame = g_slice_new0 (FrameData);
+  GList *l;
 
-  frame->sync_request_serial = priv->window->sync_request_serial;
+  for (l = priv->frames; l;)
+    {
+      GList *l_next = l->next;
+      FrameData *frame = l->data;
+
+      if (frame->frame_counter == -1)
+        {
+          do_send_frame_drawn (self, frame);
+          do_send_frame_timings (self, frame, 0, 0);
 
-  do_send_frame_drawn (self, frame);
-  do_send_frame_timings (self, frame, 0, 0);
+          priv->frames = g_list_delete_link (priv->frames, l);
+          frame_data_free (frame);
+        }
+
+      l = l_next;
+    }
 
   priv->needs_frame_drawn = FALSE;
   priv->send_frame_messages_timer = 0;
-  frame_data_free (frame);
 
   return FALSE;
 }
@@ -891,6 +939,10 @@
 queue_send_frame_messages_timeout (MetaWindowActor *self)
 {
   MetaWindowActorPrivate *priv = self->priv;
+
+  if (priv->send_frame_messages_timer != 0)
+    return;
+
   MetaDisplay *display = meta_window_get_display (priv->window);
   gint64 current_time = meta_compositor_monotonic_time_to_server_time 
(display, g_get_monotonic_time ());
   MetaMonitorManager *monitor_manager = meta_monitor_manager_get ();
@@ -933,6 +985,7 @@
     return;
 
   frame = g_slice_new0 (FrameData);
+  frame->frame_counter = -1;
 
   priv->needs_frame_drawn = TRUE;
 
@@ -1155,7 +1208,7 @@
 meta_window_actor_should_unredirect (MetaWindowActor *self)
 {
   MetaWindowActorPrivate *priv = self->priv;
-  if (priv->surface)
+  if (!meta_window_actor_is_destroyed (self) && priv->surface)
     return meta_surface_actor_should_unredirect (priv->surface);
   else
     return FALSE;
@@ -1905,24 +1958,12 @@
 void
 meta_window_actor_pre_paint (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  GList *l;
-
   if (meta_window_actor_is_destroyed (self))
     return;
 
   meta_window_actor_handle_updates (self);
 
-  for (l = priv->frames; l != NULL; l = l->next)
-    {
-      FrameData *frame = l->data;
-
-      if (frame->frame_counter == 0)
-        {
-          CoglOnscreen *onscreen = COGL_ONSCREEN (cogl_get_draw_framebuffer());
-          frame->frame_counter = cogl_onscreen_get_frame_counter (onscreen);
-        }
-    }
+  assign_frame_counter_to_frames (self);
 }
 
 static void
@@ -1963,16 +2004,23 @@
   if (meta_window_actor_is_destroyed (self))
     return;
 
- /* This window had damage, but wasn't actually redrawn because
-  * it is obscured. So we should wait until timer expiration
-  * before sending _NET_WM_FRAME_* messages.
-  */
-  if (priv->send_frame_messages_timer != 0)
-    return;
-
-  if (priv->needs_frame_drawn)
+  /* If the window had damage, but wasn't actually redrawn because
+   * it is obscured, we should wait until timer expiration before
+   * sending _NET_WM_FRAME_* messages.
+   */
+  if (priv->send_frame_messages_timer == 0 &&
+      priv->needs_frame_drawn)
     {
-      do_send_frame_drawn (self, priv->frames->data);
+      GList *l;
+
+      for (l = priv->frames; l; l = l->next)
+        {
+          FrameData *frame = l->data;
+
+          if (frame->frame_drawn_time == 0)
+            do_send_frame_drawn (self, frame);
+        }
+
       priv->needs_frame_drawn = FALSE;
     }
 
@@ -2057,15 +2105,20 @@
     {
       GList *l_next = l->next;
       FrameData *frame = l->data;
+      gint64 frame_counter = cogl_frame_info_get_frame_counter (frame_info);
 
-      if (frame->frame_counter == cogl_frame_info_get_frame_counter 
(frame_info))
+      if (frame->frame_counter != -1 && frame->frame_counter <= frame_counter)
         {
-          if (frame->frame_drawn_time != 0)
-            {
-              priv->frames = g_list_delete_link (priv->frames, l);
-              send_frame_timings (self, frame, frame_info, presentation_time);
-              frame_data_free (frame);
-            }
+          if (G_UNLIKELY (frame->frame_drawn_time == 0))
+            g_warning ("%s: Frame has assigned frame counter but no frame 
drawn time",
+                       priv->window->desc);
+          if (G_UNLIKELY (frame->frame_counter < frame_counter))
+            g_warning ("%s: frame_complete callback never occurred for frame 
%" G_GINT64_FORMAT,
+                       priv->window->desc, frame->frame_counter);
+
+          priv->frames = g_list_delete_link (priv->frames, l);
+          send_frame_timings (self, frame, frame_info, presentation_time);
+          frame_data_free (frame);
         }
 
       l = l_next;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutter-3.14.2/src/core/screen.c 
new/mutter-3.14.3/src/core/screen.c
--- old/mutter-3.14.2/src/core/screen.c 2014-10-16 11:00:50.000000000 +0200
+++ new/mutter-3.14.3/src/core/screen.c 2014-12-19 11:57:58.000000000 +0100
@@ -496,15 +496,6 @@
   return guard_window;
 }
 
-/* Set a black background on the root window so that we don't
- * see confusing old copies of old windows when debugging
- * and testing. */
-static void
-meta_screen_set_background (MetaScreen *screen)
-{
-  XSetWindowBackground (screen->display->xdisplay, screen->xroot, 0x00000000);
-}
-
 MetaScreen*
 meta_screen_new (MetaDisplay *display,
                  int          number,
@@ -709,7 +700,6 @@
   reload_monitor_infos (screen);
 
   meta_screen_set_cursor (screen, META_CURSOR_DEFAULT);
-  meta_screen_set_background (screen);
 
   /* Handle creating a no_focus_window for this screen */
   screen->no_focus_window =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutter-3.14.2/src/x11/window-x11.c 
new/mutter-3.14.3/src/x11/window-x11.c
--- old/mutter-3.14.2/src/x11/window-x11.c      2014-10-16 00:11:51.000000000 
+0200
+++ new/mutter-3.14.3/src/x11/window-x11.c      2014-12-19 12:14:40.000000000 
+0100
@@ -1684,7 +1684,7 @@
       /* Translate the set of XShape rectangles that we
        * get from the X server to a cairo_region. */
       XRectangle *rects = NULL;
-      int n_rects, ordering;
+      int n_rects = -1, ordering;
 
       meta_error_trap_push (window->display);
       rects = XShapeGetRectangles (window->display->xdisplay,
@@ -1694,21 +1694,46 @@
                                    &ordering);
       meta_error_trap_pop (window->display);
 
-      /* XXX: The x shape extension doesn't provide a way to only test if an
-       * input shape has been specified, so we have to query and throw away the
-       * rectangles. */
-      if (rects)
-        {
-          if (n_rects > 1 ||
-              (n_rects == 1 &&
-               (rects[0].x != 0 ||
-                rects[0].y != 0 ||
-                rects[0].width != priv->client_rect.width ||
-                rects[0].height != priv->client_rect.height)))
-            region = region_create_from_x_rectangles (rects, n_rects);
+      /* XXX: The X Shape specification is quite unfortunately specified.
+       *
+       * By default, the window has a shape the same as its bounding region,
+       * which we consider "NULL".
+       *
+       * If the window sets an empty region, then we'll get n_rects as 0
+       * and rects as NULL, which we need to transform back into an empty
+       * region.
+       *
+       * It would be great to have a less-broken extension for this, but
+       * hey, it's X11!
+       */
 
-          XFree (rects);
+      if (n_rects == -1)
+        {
+          /* We had an error. */
+          region = NULL;
         }
+      else if (n_rects == 0)
+        {
+          /* Client set an empty region. */
+          region = cairo_region_create ();
+        }
+      else if (n_rects == 1 &&
+               (rects[0].x == 0 ||
+                rects[0].y == 0 ||
+                rects[0].width == priv->client_rect.width ||
+                rects[0].height == priv->client_rect.height))
+        {
+          /* This is the bounding region case. Keep the
+           * region as NULL. */
+          region = NULL;
+        }
+      else
+        {
+          /* Window has a custom shape. */
+          region = region_create_from_x_rectangles (rects, n_rects);
+        }
+
+      meta_XFree (rects);
     }
 
   if (region != NULL)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to