Add my patch from upstream bug 755947 to disable character-cell-based
size contraints for TILED windows, so that gnome-terminal can snap to half the screen under Wayland
This commit is contained in:
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -9,6 +9,9 @@ gtk+3.0 (3.20.6-2) UNRELEASED; urgency=medium
|
||||
they are based on the temporary HOME
|
||||
* Backport patch from upstream to mark tiled Mutter/Shell windows
|
||||
as GDK_WINDOW_STATE_TILED under Wayland (with mutter >= 3.20.2-2)
|
||||
* Add my patch from upstream bug 755947 to disable character-cell-based
|
||||
size contraints for TILED windows, so that gnome-terminal can snap to
|
||||
half the screen under Wayland
|
||||
|
||||
-- Laurent Bigonville <bigon@debian.org> Sun, 05 Jun 2016 02:29:49 +0200
|
||||
|
||||
|
||||
75
debian/patches/Don-t-apply-GDK_HINT_RESIZE_INC-to-GDK_WINDOW_STATE_.patch
vendored
Normal file
75
debian/patches/Don-t-apply-GDK_HINT_RESIZE_INC-to-GDK_WINDOW_STATE_.patch
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Mon, 6 Jun 2016 09:48:36 +0100
|
||||
Subject: Don't apply GDK_HINT_RESIZE_INC to GDK_WINDOW_STATE_TILED
|
||||
windows
|
||||
|
||||
This matches the behaviour of Mutter, Metacity and traditional X11
|
||||
window managers on the window manager side, and is what we want
|
||||
for at least gnome-terminal. I can't think of any reason why we'd
|
||||
want incremental resize in any other tiled window.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=755947
|
||||
Forwarded: yes
|
||||
---
|
||||
gdk/wayland/gdkwindow-wayland.c | 10 +++++-----
|
||||
gtk/gtkwindow.c | 4 ++--
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
|
||||
index cd71c04..c705d8d 100644
|
||||
--- a/gdk/wayland/gdkwindow-wayland.c
|
||||
+++ b/gdk/wayland/gdkwindow-wayland.c
|
||||
@@ -1215,7 +1215,7 @@ xdg_surface_configure (void *data,
|
||||
GdkWindow *window = GDK_WINDOW (data);
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
GdkWindowState new_state = 0;
|
||||
- gboolean maximized_or_fullscreen;
|
||||
+ gboolean fixed_size;
|
||||
uint32_t *p;
|
||||
|
||||
wl_array_for_each (p, states)
|
||||
@@ -1244,8 +1244,8 @@ xdg_surface_configure (void *data,
|
||||
}
|
||||
}
|
||||
|
||||
- maximized_or_fullscreen =
|
||||
- new_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN);
|
||||
+ fixed_size =
|
||||
+ new_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_TILED);
|
||||
|
||||
/* According to xdg_shell, an xdg_surface.configure with size 0x0
|
||||
* should be interpreted as that it is up to the client to set a
|
||||
@@ -1255,7 +1255,7 @@ xdg_surface_configure (void *data,
|
||||
* the client should configure its size back to what it was before
|
||||
* being maximize or fullscreen.
|
||||
*/
|
||||
- if (width == 0 && height == 0 && !maximized_or_fullscreen)
|
||||
+ if (width == 0 && height == 0 && !fixed_size)
|
||||
{
|
||||
width = impl->saved_width;
|
||||
height = impl->saved_height;
|
||||
@@ -1266,7 +1266,7 @@ xdg_surface_configure (void *data,
|
||||
GdkWindowHints geometry_mask = impl->geometry_mask;
|
||||
|
||||
/* Ignore size increments for maximized/fullscreen windows */
|
||||
- if (maximized_or_fullscreen)
|
||||
+ if (fixed_size)
|
||||
geometry_mask &= ~GDK_HINT_RESIZE_INC;
|
||||
|
||||
gdk_window_constrain_size (&impl->geometry_hints,
|
||||
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
|
||||
index b19a643..df1892a 100644
|
||||
--- a/gtk/gtkwindow.c
|
||||
+++ b/gtk/gtkwindow.c
|
||||
@@ -9939,8 +9939,8 @@ gtk_window_constrain_size (GtkWindow *window,
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
guint geometry_flags;
|
||||
|
||||
- /* ignore size increments for maximized/fullscreen windows */
|
||||
- if (priv->maximized || priv->fullscreen)
|
||||
+ /* ignore size increments for windows that fit in a fixed space */
|
||||
+ if (priv->maximized || priv->fullscreen || priv->tiled)
|
||||
geometry_flags = flags & ~GDK_HINT_RESIZE_INC;
|
||||
else
|
||||
geometry_flags = flags;
|
||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -8,3 +8,4 @@
|
||||
no-accessibility-dump.patch
|
||||
reftest-known-fail.patch
|
||||
wayland-add-extended-state-for-tiled.patch
|
||||
Don-t-apply-GDK_HINT_RESIZE_INC-to-GDK_WINDOW_STATE_.patch
|
||||
|
||||
Reference in New Issue
Block a user