[Xfce4-commits] [apps/xfce4-terminal] 01/01: When detaching a tab from a drop-down window, resize the new window to the default geometry
noreply at xfce.org
noreply at xfce.org
Fri Jun 29 21:16:28 CEST 2018
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 d44e64c7f63e0f9209df8fb51fab203b6638c1f7
Author: Igor <f2404 at yandex.ru>
Date: Fri Jun 29 15:16:21 2018 -0400
When detaching a tab from a drop-down window, resize the new window to the default geometry
---
terminal/terminal-app.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c
index 4eef4f0..94eacba 100644
--- a/terminal/terminal-app.c
+++ b/terminal/terminal-app.c
@@ -500,9 +500,27 @@ terminal_app_new_window_with_terminal (TerminalWindow *existing,
terminal_window_add (TERMINAL_WINDOW (window), terminal);
- /* resize new window to the original terminal geometry */
- terminal_screen_get_size (terminal, &width, &height);
- terminal_screen_force_resize_window (terminal, GTK_WINDOW (window), width, height);
+ if (G_UNLIKELY (terminal_window_is_drop_down (existing)))
+ {
+ /* resize new window to the default geometry */
+#ifdef GDK_WINDOWING_X11
+ gchar *geo;
+ guint w, h;
+ g_object_get (G_OBJECT (app->preferences), "misc-default-geometry", &geo, NULL);
+ if (G_LIKELY (geo != NULL))
+ {
+ XParseGeometry (geo, NULL, NULL, &w, &h);
+ g_free (geo);
+ terminal_screen_force_resize_window (terminal, GTK_WINDOW (window), w, h);
+ }
+#endif
+ }
+ else
+ {
+ /* resize new window to the original terminal geometry */
+ terminal_screen_get_size (terminal, &width, &height);
+ terminal_screen_force_resize_window (terminal, GTK_WINDOW (window), width, height);
+ }
gtk_widget_show (window);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list