mutter/mutter-SLE-relax-some-constraints-on-CSD-windows.patch

48 lines
2.1 KiB
Diff
Raw Normal View History

Index: mutter-3.23.2/src/core/constraints.c
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
===================================================================
--- mutter-3.23.2.orig/src/core/constraints.c
+++ mutter-3.23.2/src/core/constraints.c
@@ -1466,6 +1466,12 @@ constrain_to_single_monitor (MetaWindow
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
}
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,
@@ -1481,6 +1487,11 @@ constrain_fully_onscreen (MetaWindow
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->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 ||
meta_window_get_placement_rule (window))
@@ -1518,11 +1529,12 @@ constrain_titlebar_visible (MetaWindow
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
* 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 ||
- unconstrained_user_action ||
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->type == META_WINDOW_DESKTOP ||
+ window->type == META_WINDOW_DOCK ||
+ window->fullscreen ||
+ (constraint_is_sle_classic() && !window->decorated) ||
+ !window->require_titlebar_visible ||
+ unconstrained_user_action ||
meta_window_get_placement_rule (window))
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
return TRUE;