mutter/relax-some-constraints-on-CSD-windows-in-sle-classic.patch
Bjørn Lie bc9db1f782 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 12:00:22 +00:00

46 lines
1.9 KiB
Diff

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;