[Xfce4-commits] [apps/xfce4-terminal] 01/01: Do not resize the window when it's vertically maximized

noreply at xfce.org noreply at xfce.org
Fri Mar 22 18:08:28 CET 2019


This is an automated email from the git hooks/post-receive script.

f   2   4   0   4       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-terminal.

commit 6ce019cad5550b2b8d5a8bc3ab2d5db10e84aaca
Author: Igor <f2404 at yandex.ru>
Date:   Fri Mar 22 13:06:51 2019 -0400

    Do not resize the window when it's vertically maximized
    
    Fixes bug #10551
---
 terminal/terminal-window.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 0f53364..8524edd 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -96,6 +96,17 @@ const gchar *CSS_SLIM_TABS =
 "  padding: 1px;\n"
 "}\n";
 
+/* See gnome-terminal bug #789356 */
+#if GTK_CHECK_VERSION (3, 22, 23)
+#define WINDOW_STATE_TILED (GDK_WINDOW_STATE_TILED       | \
+                            GDK_WINDOW_STATE_LEFT_TILED  | \
+                            GDK_WINDOW_STATE_RIGHT_TILED | \
+                            GDK_WINDOW_STATE_TOP_TILED   | \
+                            GDK_WINDOW_STATE_BOTTOM_TILED)
+#else
+#define WINDOW_STATE_TILED (GDK_WINDOW_STATE_TILED)
+#endif
+
 
 
 static void         terminal_window_finalize                      (GObject             *object);
@@ -1007,12 +1018,16 @@ terminal_window_set_size_force_grid (TerminalWindow *window,
                                      glong           force_grid_width,
                                      glong           force_grid_height)
 {
+  GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
+
   terminal_return_if_fail (TERMINAL_IS_WINDOW (window));
   terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
 
   /* required to get the char height/width right */
   if (gtk_widget_get_realized (GTK_WIDGET (screen))
-      && !window->priv->drop_down)
+      && gdk_window != NULL
+      && (gdk_window_get_state (gdk_window) & (GDK_WINDOW_STATE_FULLSCREEN | WINDOW_STATE_TILED)) == 0
+      && !window->priv->drop_down )
     {
       terminal_screen_force_resize_window (screen, GTK_WINDOW (window),
                                            force_grid_width, force_grid_height);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list