Hello community,

here is the log from the commit of package mutter for openSUSE:Factory checked 
in at 2016-08-28 12:17:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    2016-07-12 
23:48:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mutter.new/mutter.changes       2016-08-28 
12:17:30.000000000 +0200
@@ -1,0 +2,5 @@
+Sat Jul 30 03:45:15 CEST 2016 - [email protected]
+
+- Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387).
+
+-------------------------------------------------------------------
@@ -34,0 +40,6 @@
+Mon May  2 10:57:13 CEST 2016 - [email protected]
+
+- Drop mutter-grab-display.patch, it has been fixed by upstream
+  differently.
+
+-------------------------------------------------------------------
@@ -45,0 +57,8 @@
+Wed Apr 13 06:46:07 UTC 2016 - [email protected]
+
+- Update to GNOME 3.20  Fate#318572
+- Remove upstream patches: mutter-bnc879109-no-monitors-crash.patch
+- Refresh mutter-grab-display.patch, mutter-bell.patch,
+  relax-some-constraints-on-CSD-windows-in-sle-classic.patch
+
+-------------------------------------------------------------------
@@ -599,0 +619,5 @@
+Thu Aug 14 08:35:16 UTC 2014 - [email protected]
+
+- Update mutter-bell.patch so it works on all cases (bnc#889218)
+
+-------------------------------------------------------------------
@@ -656,0 +681,21 @@
+Wed Jul  9 11:53:15 UTC 2014 - [email protected]
+
+- Add relax-some-constraints-on-CSD-windows-in-sle-classic.patch:
+  CSD (Client Side Decoration) windows have invisible box wrapping
+  around them, which leads to some positioning issues as in this
+  bug report. Relax some constraints on window positioning for CSD
+  windows s.t. they can be placed at the very top of the monitor.
+  This fix works nicely for "sle-classic" as there is no top bar
+  any more, and is NOT applied in other GNOME sessions for reasons
+  stated in bgo#719772 (bnc#883491).
+
+-------------------------------------------------------------------
+Sat May 31 13:05:37 CDT 2014 - [email protected]
+
+- Add mutter-bnc879109-no-monitors-crash.patch:
+  Fixes a crash in Mutter when there are no usable monitors, such
+  as when a laptop is booted with the lid closed while on a docking
+  station, with the intent of plugging an external monitor later
+  (bnc#879109).
+
+-------------------------------------------------------------------
@@ -666,0 +712,11 @@
+Wed May  7 18:54:54 CEST 2014 - [email protected]
+
+- Added support for gnome-patch-translation (2 strings).
+
+-------------------------------------------------------------------
+Sun Apr 27 23:49:47 UTC 2014 - [email protected]
+
+- Update mutter-grab-display.patch to fix (bnc#873763)
+  remove the duplicated trap-pop.
+
+-------------------------------------------------------------------
@@ -681,0 +738,7 @@
+Fri Mar 28 08:40:54 UTC 2014 - [email protected]
+
+- Add mutter-grab-display.patch (bnc#870285)
+  The oracle installer cannot display correctly.
+  The bug was introduced in 3.10.4 and is now fixed in upstream.
+
+-------------------------------------------------------------------
@@ -792,0 +856,12 @@
+Fri Feb 14 11:03:34 UTC 2014 - [email protected]
+
+- Update mutter-bell.patch: correctly get gsetting from the right
+  schema [FATE#316042]
+
+-------------------------------------------------------------------
+Wed Feb  5 08:44:05 UTC 2014 - [email protected]
+
+- Add mutter-bell.patch to make audible bell work out of the box.
+  Implements FATE#316042
+
+-------------------------------------------------------------------

New:
----
  mutter-bell.patch
  mutter-bsc984738-grab-display.patch
  relax-some-constraints-on-CSD-windows-in-sle-classic.patch

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

Other differences:
------------------
++++++ mutter.spec ++++++
--- /var/tmp/diff_new_pack.zWtUY3/_old  2016-08-28 12:17:30.000000000 +0200
+++ /var/tmp/diff_new_pack.zWtUY3/_new  2016-08-28 12:17:30.000000000 +0200
@@ -30,6 +30,12 @@
 Group:          System/GUI/GNOME
 Url:            http://www.gnome.org
 Source:         
http://download.gnome.org/sources/mutter/3.20/%{name}-%{version}.tar.xz
+# PATCH-FEATURE-SLE mutter-bell.patch FATE#316042 bnc#889218 [email protected] 
-- make audible bell work out of the box.
+Patch1:         mutter-bell.patch
+# PATCH-FIX-SLE relax-some-constraints-on-CSD-windows-in-sle-classic.patch 
bnc#883491 [email protected] -- Relax some constraints on window positioning for 
CSD windows s.t. they can be placed at the very top of the monitor.
+Patch2:         relax-some-constraints-on-CSD-windows-in-sle-classic.patch
+# PATCH-FIX-UPSTREAM mutter-bsc984738-grab-display.patch bsc#984738 bgo#769387 
[email protected] -- Revert a upstream commit to avoid X11 race condition that 
results in wrong dialog sizes.
+Patch3:         mutter-bsc984738-grab-display.patch
 BuildRequires:  fdupes
 BuildRequires:  gobject-introspection-devel >= 0.9.5
 BuildRequires:  intltool
@@ -140,7 +146,10 @@
 %setup -q
 %if !0%{?is_opensuse}
 translation-update-upstream
+%patch1 -p1
+%patch2 -p1
 %endif
+%patch3 -p1
 
 %build
 %configure \

++++++ mutter-bell.patch ++++++
Index: mutter-3.20.0/src/meta/prefs.h
===================================================================
--- mutter-3.20.0.orig/src/meta/prefs.h
+++ mutter-3.20.0/src/meta/prefs.h
@@ -89,6 +89,7 @@ typedef enum
   META_PREF_WORKSPACE_NAMES,
   META_PREF_VISUAL_BELL,
   META_PREF_AUDIBLE_BELL,
+  META_PREF_AUDIBLE_BELL_FORCE_THROUGH_SERVER,
   META_PREF_VISUAL_BELL_TYPE,
   META_PREF_GNOME_ACCESSIBILITY,
   META_PREF_GNOME_ANIMATIONS,
@@ -399,6 +400,7 @@ MetaKeyBindingAction meta_prefs_get_keyb
 
 gboolean           meta_prefs_get_visual_bell      (void);
 gboolean           meta_prefs_bell_is_audible      (void);
+gboolean           meta_prefs_bell_force_through_server (void);
 GDesktopVisualBellType meta_prefs_get_visual_bell_type (void);
 
 #endif
Index: mutter-3.20.0/src/core/prefs.c
===================================================================
--- mutter-3.20.0.orig/src/core/prefs.c
+++ mutter-3.20.0/src/core/prefs.c
@@ -93,6 +93,7 @@ static gboolean auto_raise_delay = 500;
 static gboolean focus_change_on_pointer_rest = FALSE;
 static gboolean bell_is_visible = FALSE;
 static gboolean bell_is_audible = TRUE;
+static gboolean bell_force_through_server = FALSE;
 static gboolean gnome_accessibility = FALSE;
 static gboolean gnome_animations = TRUE;
 static char *cursor_theme = NULL;
@@ -353,6 +354,13 @@ static MetaBoolPreference preferences_bo
       &bell_is_audible, /* FIXME: change the name: it's confusing */
     },
     {
+      { "audible-bell-force-through-server",
+        SCHEMA_MUTTER,
+        META_PREF_AUDIBLE_BELL_FORCE_THROUGH_SERVER,
+      },
+      &bell_force_through_server,
+    },
+    {
       { KEY_GNOME_ACCESSIBILITY,
         SCHEMA_INTERFACE,
         META_PREF_GNOME_ACCESSIBILITY,
@@ -1813,6 +1821,9 @@ meta_preference_to_string (MetaPreferenc
     case META_PREF_AUDIBLE_BELL:
       return "AUDIBLE_BELL";
 
+    case META_PREF_AUDIBLE_BELL_FORCE_THROUGH_SERVER:
+      return "AUDIBLE_BELL_FORCE_THROUGH_SERVER";
+
     case META_PREF_VISUAL_BELL_TYPE:
       return "VISUAL_BELL_TYPE";
 
@@ -2077,6 +2088,12 @@ meta_prefs_bell_is_audible (void)
   return bell_is_audible;
 }
 
+gboolean
+meta_prefs_bell_force_through_server (void)
+{
+  return bell_force_through_server;
+}
+
 GDesktopVisualBellType
 meta_prefs_get_visual_bell_type (void)
 {
Index: mutter-3.20.0/src/core/bell.c
===================================================================
--- mutter-3.20.0.orig/src/core/bell.c
+++ mutter-3.20.0/src/core/bell.c
@@ -220,6 +220,12 @@ meta_bell_notify (MetaDisplay *display,
   if (meta_prefs_get_visual_bell ())
     bell_visual_notify (display, window);
 
+  if (meta_prefs_bell_force_through_server ())
+   {
+    XkbForceBell (display->xdisplay, 100);
+    return TRUE;
+    }
+
   if (meta_prefs_bell_is_audible ())
     return bell_audible_notify (display, window);
 
Index: mutter-3.20.0/data/org.gnome.mutter.gschema.xml.in
===================================================================
--- mutter-3.20.0.orig/data/org.gnome.mutter.gschema.xml.in
+++ mutter-3.20.0/data/org.gnome.mutter.gschema.xml.in
@@ -102,6 +102,16 @@
       </_description>
     </key>
 
+    <key name="audible-bell-force-through-server" type="b">
+      <default>false</default>
+      <_summary>Force the System Bell through the X server only.</_summary>
+      <_description>
+        Force the System Bell through the X server only for systems that
+        do not want to go through the sound card - for example that don't
+        have speakers.
+      </_description>
+    </key>
+
     <child name="keybindings" schema="org.gnome.mutter.keybindings"/>
 
   </schema>
++++++ mutter-bsc984738-grab-display.patch ++++++
diff --git a/src/core/display-private.h b/src/core/display-private.h
index 531c6f7..aaa90ec 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -174,6 +174,8 @@ struct _MetaDisplay
   GHashTable *stamps;
   GHashTable *wayland_windows;
 
+  int server_grab_count;
+
   /* serials of leave/unmap events that may
    * correspond to an enter event we should
    * ignore
@@ -322,6 +324,8 @@ struct _MetaDisplayClass
 gboolean      meta_display_open                (void);
 void          meta_display_close               (MetaDisplay *display,
                                                 guint32      timestamp);
+void          meta_display_grab                (MetaDisplay *display);
+void          meta_display_ungrab              (MetaDisplay *display);
 
 void          meta_display_unmanage_windows_for_screen (MetaDisplay *display,
                                                         MetaScreen  *screen,
diff --git a/src/core/display.c b/src/core/display.c
index 4c7a00e..87e3307 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -585,6 +585,7 @@ meta_display_open (void)
   display->focus_serial = 0;
   display->server_focus_window = None;
   display->server_focus_serial = 0;
+  display->server_grab_count = 0;
 
   display->mouse_mode = TRUE; /* Only relevant for mouse or sloppy focus */
   display->allow_terminal_deactivation = TRUE; /* Only relevant for when a
@@ -1130,6 +1131,50 @@ meta_display_close (MetaDisplay *display,
   meta_quit (META_EXIT_SUCCESS);
 }
 
+/* Grab/ungrab routines taken from fvwm.
+ * Calling this function will cause X to ignore all other clients until
+ * you ungrab. This may not be quite as bad as it sounds, yet there is
+ * agreement that avoiding server grabs except when they are clearly needed
+ * is a good thing.
+ *
+ * If you do use such grabs, please clearly explain the necessity for their
+ * usage in a comment. Try to keep their scope extremely limited. In
+ * particular, try to avoid emitting any signals or notifications while
+ * a grab is active (if the signal receiver tries to block on an X request
+ * from another client at this point, you will have a deadlock).
+ */
+void
+meta_display_grab (MetaDisplay *display)
+{
+  if (display->server_grab_count == 0)
+    {
+      XGrabServer (display->xdisplay);
+    }
+  display->server_grab_count += 1;
+  meta_verbose ("Grabbing display, grab count now %d\n",
+                display->server_grab_count);
+}
+
+void
+meta_display_ungrab (MetaDisplay *display)
+{
+  if (display->server_grab_count == 0)
+    meta_bug ("Ungrabbed non-grabbed server\n");
+
+  display->server_grab_count -= 1;
+  if (display->server_grab_count == 0)
+    {
+      /* FIXME we want to purge all pending "queued" stuff
+       * at this point, such as window hide/show
+       */
+      XUngrabServer (display->xdisplay);
+      XFlush (display->xdisplay);
+    }
+
+  meta_verbose ("Ungrabbing display, grab count now %d\n",
+                display->server_grab_count);
+}
+
 /**
  * meta_display_for_x_display:
  * @xdisplay: An X display
@@ -1516,7 +1561,7 @@ request_xserver_input_focus_change (MetaDisplay *display,
    * we know which is which by making two requests that the server will
    * process at the same time.
    */
-  XGrabServer (display->xdisplay);
+  meta_display_grab (display);
 
   serial = XNextRequest (display->xdisplay);
 
@@ -1529,8 +1574,7 @@ request_xserver_input_focus_change (MetaDisplay *display,
                    display->atom__MUTTER_FOCUS_SET,
                    XA_STRING, 8, PropModeAppend, NULL, 0);
 
-  XUngrabServer (display->xdisplay);
-  XFlush (display->xdisplay);
+  meta_display_ungrab (display);
 
   meta_display_update_focus_window (display,
                                     meta_window,
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index ed34aea..a989200 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -979,6 +979,9 @@ meta_display_grab_window_buttons (MetaDisplay *display,
 {
   MetaKeyBindingManager *keys = &display->key_binding_manager;
 
+  if (display->server_grab_count > 0)
+    return;
+
   /* Grab Alt + button1 for moving window.
    * Grab Alt + button2 for resizing window.
    * Grab Alt + button3 for popping up window menu.
@@ -1015,6 +1018,9 @@ meta_display_ungrab_window_buttons (MetaDisplay *display,
 {
   MetaKeyBindingManager *keys = &display->key_binding_manager;
 
+  if (display->server_grab_count > 0)
+    return;
+
   if (keys->window_grab_modifiers == 0)
     return;
 
@@ -1041,6 +1047,9 @@ meta_display_grab_focus_window_button (MetaDisplay 
*display,
 {
   MetaKeyBindingManager *keys = &display->key_binding_manager;
 
+  if (display->server_grab_count > 0)
+    return;
+
   /* Grab button 1 for activating unfocused windows */
   meta_verbose ("Grabbing unfocused window buttons for %s\n", window->desc);
 
@@ -1080,6 +1089,9 @@ meta_display_ungrab_focus_window_button (MetaDisplay 
*display,
 {
   MetaKeyBindingManager *keys = &display->key_binding_manager;
 
+  if (display->server_grab_count > 0)
+    return;
+
   meta_verbose ("Ungrabbing unfocused window buttons for %s\n", window->desc);
 
   if (!window->have_focus_click_grab)
@@ -1309,6 +1321,9 @@ meta_window_grab_keys (MetaWindow  *window)
   MetaDisplay *display = window->display;
   MetaKeyBindingManager *keys = &display->key_binding_manager;
 
+  if (display->server_grab_count > 0)
+    return;
+
   if (window->all_keys_grabbed)
     return;
 
@@ -1348,6 +1363,9 @@ meta_window_ungrab_keys (MetaWindow  *window)
       MetaDisplay *display = window->display;
       MetaKeyBindingManager *keys = &display->key_binding_manager;
 
+      if (display->server_grab_count > 0)
+        return;
+
       if (window->grab_on_frame &&
           window->frame != NULL)
         change_window_keygrabs (keys, window->frame->xwindow, FALSE);
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 3d47f0d..5ea1213 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -507,6 +507,8 @@ meta_window_x11_manage (MetaWindow *window)
 
   meta_icon_cache_init (&priv->icon_cache);
 
+  meta_display_grab (display);
+
   meta_display_register_x_window (display, &window->xwindow, window);
 
   /* assign the window to its group, or create a new group if needed */
@@ -565,6 +567,13 @@ meta_window_x11_manage (MetaWindow *window)
 
   meta_window_x11_update_shape_region (window);
   meta_window_x11_update_input_region (window);
+
+  meta_display_ungrab (display);
+
+  /* Perform operations prevented by grab */
+  if (window->frame)
+    meta_display_grab_window_buttons (display, window->frame->xwindow);
+  meta_window_grab_keys (window);
 }
 
 static void
++++++ relax-some-constraints-on-CSD-windows-in-sle-classic.patch ++++++
Index: mutter-3.20.0/src/core/constraints.c
===================================================================
--- mutter-3.20.0.orig/src/core/constraints.c
+++ mutter-3.20.0/src/core/constraints.c
@@ -1241,6 +1241,12 @@ constrain_to_single_monitor (MetaWindow
 }
 
 static gboolean
+constraint_is_sle_classic(void){
+  char * session_mode = (char *) g_getenv ("GNOME_SHELL_SESSION_MODE");
+  return g_strcmp0("sle-classic", session_mode) == 0;
+}
+
+static gboolean
 constrain_fully_onscreen (MetaWindow         *window,
                           ConstraintInfo     *info,
                           ConstraintPriority  priority,
@@ -1256,6 +1262,11 @@ constrain_fully_onscreen (MetaWindow
   if (window->type == META_WINDOW_DESKTOP ||
       window->type == META_WINDOW_DOCK    ||
       window->fullscreen                  ||
+      /* in SLE Classic, there is no top bar and to avoid issues like
+       * bnc#883491, remove some constraints on CSD windows, which tends to 
have
+       * invisible wrapper box. Do the same for "constrain_titlebar_visible".
+       */
+      (constraint_is_sle_classic() && !window->decorated) ||
       !window->require_fully_onscreen     ||
       info->is_user_action)
     return TRUE;
@@ -1292,10 +1303,11 @@ constrain_titlebar_visible (MetaWindow
    * is only meant for normal windows (e.g. we don't want docks to be shoved
    * "onscreen" by their own strut).
    */
-  if (window->type == META_WINDOW_DESKTOP ||
-      window->type == META_WINDOW_DOCK    ||
-      window->fullscreen                  ||
-      !window->require_titlebar_visible   ||
+  if (window->type == META_WINDOW_DESKTOP                 ||
+      window->type == META_WINDOW_DOCK                    ||
+      window->fullscreen                                  ||
+      (constraint_is_sle_classic() && !window->decorated) ||
+      !window->require_titlebar_visible                   ||
       unconstrained_user_action)
     return TRUE;
 

Reply via email to