From a707ec228ff39d0df26d78f715561952d2f8c0b9 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Tue, 2 Apr 2013 14:08:57 +0100 Subject: Prevent toolbox getting lost when minimising windows On X, window managers don't like WM_TRANSIENT_FOR being altered while a window is visible; this meant that if you opened TikZiT and opened a second main window and minimised the main window that had focus, the toolbox and properties window would both disappear, with no way to get them back (well, almost - the properties window could be retreived with the menu item that shows/hides it). Tested with KWin, Metacity (Gnome 2's WM), Mutter (Gnome 3) and xfwm4 (XFCE 4). Metacity and Mutter still behave a little oddly - you have to click one of the main windows *twice* to get it to focus. KWin and xfwm4 work fine. --- tikzit/src/gtk/ToolBox.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tikzit/src/gtk/ToolBox.m') diff --git a/tikzit/src/gtk/ToolBox.m b/tikzit/src/gtk/ToolBox.m index 4b6aa0a..c6d2ccf 100644 --- a/tikzit/src/gtk/ToolBox.m +++ b/tikzit/src/gtk/ToolBox.m @@ -231,8 +231,8 @@ static void tool_button_toggled_cb (GtkWidget *widget, ToolBox *toolBox); gtk_window_present (GTK_WINDOW (window)); } -- (void) setTransientFor:(Window*)parent { - gtk_window_set_transient_for (GTK_WINDOW (window), [parent gtkWindow]); +- (void) attachToWindow:(Window*)parent { + utility_window_attach (GTK_WINDOW (window), [parent gtkWindow]); } - (void) loadConfiguration:(Configuration*)config { -- cgit v1.2.3