mutter/mutter-SLE-bsc984738-grab-display.patch

197 lines
6.7 KiB
Diff
Raw Normal View History

diff --unified --recursive --text --new-file --color mutter-40.0.old/src/core/display.c mutter-40.0.new/src/core/display.c
--- mutter-40.0.old/src/core/display.c 2021-04-23 08:52:33.877578506 +0800
+++ mutter-40.0.new/src/core/display.c 2021-04-23 09:07:24.330113775 +0800
@@ -827,6 +827,8 @@
display->check_fullscreen_later = 0;
display->work_area_later = 0;
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
+ display->server_grab_count = 0;
+
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
display->mouse_mode = TRUE; /* Only relevant for mouse or sloppy focus */
display->allow_terminal_deactivation = TRUE; /* Only relevant for when a
terminal has the focus */
@@ -1140,6 +1142,50 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
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->x11_display->xdisplay);
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
+ }
+ 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->x11_display->xdisplay);
+ XFlush (display->x11_display->xdisplay);
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
+ }
+
+ meta_verbose ("Ungrabbing display, grab count now %d\n",
+ display->server_grab_count);
+}
+
/**
* meta_display_for_x_display:
* @xdisplay: An X display
diff --unified --recursive --text --new-file --color mutter-40.0.old/src/core/display-private.h mutter-40.0.new/src/core/display-private.h
--- mutter-40.0.old/src/core/display-private.h 2021-04-23 08:52:33.877578506 +0800
+++ mutter-40.0.new/src/core/display-private.h 2021-04-23 09:07:24.330113775 +0800
@@ -144,6 +144,8 @@
GHashTable *stamps;
GHashTable *wayland_windows;
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
+ int server_grab_count;
+
/* serials of leave/unmap events that may
* correspond to an enter event we should
* ignore
@@ -261,6 +263,8 @@
)
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
gboolean meta_display_open (void);
+void meta_display_grab (MetaDisplay *display);
+void meta_display_ungrab (MetaDisplay *display);
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
void meta_display_manage_all_xwindows (MetaDisplay *display);
void meta_display_unmanage_windows (MetaDisplay *display,
diff --unified --recursive --text --new-file --color mutter-40.0.old/src/core/keybindings.c mutter-40.0.new/src/core/keybindings.c
--- mutter-40.0.old/src/core/keybindings.c 2021-04-23 08:52:33.877578506 +0800
+++ mutter-40.0.new/src/core/keybindings.c 2021-04-23 09:11:57.619333618 +0800
@@ -1253,6 +1253,9 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
{
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.
@@ -1289,6 +1292,9 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
+ if (display->server_grab_count > 0)
+ return;
+
if (keys->window_grab_modifiers == 0)
return;
@@ -1319,6 +1325,9 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
{
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", window->desc);
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
@@ -1343,6 +1352,9 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
{
MetaKeyBindingManager *keys = &display->key_binding_manager;
+ if (display->server_grab_count > 0)
+ return;
+
meta_verbose ("Ungrabbing unfocused window buttons for %s", window->desc);
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
if (!window->have_focus_click_grab)
@@ -1588,6 +1600,10 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
if (meta_is_wayland_compositor ())
return;
+
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
+ if (display->server_grab_count > 0)
+ return;
+
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
if (window->all_keys_grabbed)
return;
@@ -1627,6 +1643,9 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
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 --unified --recursive --text --new-file --color mutter-40.0.old/src/x11/meta-x11-display.c mutter-40.0.new/src/x11/meta-x11-display.c
--- mutter-40.0.old/src/x11/meta-x11-display.c 2021-04-23 08:52:33.884245138 +0800
+++ mutter-40.0.new/src/x11/meta-x11-display.c 2021-04-23 09:07:24.330113775 +0800
@@ -1945,7 +1945,7 @@
* we know which is which by making two requests that the server will
* process at the same time.
*/
- XGrabServer (x11_display->xdisplay);
+ meta_display_grab(x11_display->display);
XSetInputFocus (x11_display->xdisplay,
xwindow,
@@ -1957,8 +1957,7 @@
x11_display->atom__MUTTER_FOCUS_SET,
XA_STRING, 8, PropModeAppend, NULL, 0);
- XUngrabServer (x11_display->xdisplay);
- XFlush (x11_display->xdisplay);
+ meta_display_ungrab(x11_display->display);
meta_x11_error_trap_pop (x11_display);
}
diff --unified --recursive --text --new-file --color mutter-40.0.old/src/x11/window-x11.c mutter-40.0.new/src/x11/window-x11.c
--- mutter-40.0.old/src/x11/window-x11.c 2021-04-23 08:52:33.884245138 +0800
+++ mutter-40.0.new/src/x11/window-x11.c 2021-04-23 09:07:24.330113775 +0800
@@ -522,6 +522,8 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
meta_icon_cache_init (&priv->icon_cache);
+ meta_display_grab (display);
+
meta_x11_display_register_x_window (display->x11_display,
&window->xwindow,
window);
@@ -582,6 +584,13 @@
Accepting request 422494 from home:zhangxiaofei:branches:GNOME:Factory SLE sync - Add mutter-bsc984738-grab-display.patch (bsc#984738, bgo#769387). - Drop mutter-grab-display.patch, it has been fixed by upstream differently. - 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 - Update mutter-bell.patch so it works on all cases (bnc#889218) - 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). - 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). - Added support for gnome-patch-translation (2 strings). - Update mutter-grab-display.patch to fix (bnc#873763) OBS-URL: https://build.opensuse.org/request/show/422494 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=203
2016-08-26 14:00:22 +02:00
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