From: Willi Schinmeyer Date: Fri, 4 May 2012 08:45:49 +0000 (+0200) Subject: Workaround for broken floating windows (XY Window etc. always in front of e.g. surfac... X-Git-Tag: xonotic-v0.7.0~16^2^2~4^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e35aa24c7420900e849d1d53c755c681f981abd2;p=xonotic%2Fnetradiant.git Workaround for broken floating windows (XY Window etc. always in front of e.g. surface inspector, properties) --- diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 9368292f..cb62e79a 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -2021,8 +2021,10 @@ static void mainframe_unmap( GtkWidget *widget ){ static GtkWidget* create_floating( MainFrame* mainframe ){ GtkWidget *wnd = gtk_window_new( GTK_WINDOW_TOPLEVEL ); - //if (mainframe->CurrentStyle() != MainFrame::eFloating) - gtk_window_set_transient_for( GTK_WINDOW( wnd ), GTK_WINDOW( mainframe->m_pWidget ) ); + //workaround for a bug with set_transient_for in GTK - resulting behaviour is not perfect but better than the bug. + //(see https://bugzilla.gnome.org/show_bug.cgi?id=658975 regarding the bug) + if (mainframe->CurrentStyle() != MainFrame::eFloating) + gtk_window_set_transient_for( GTK_WINDOW( wnd ), GTK_WINDOW( mainframe->m_pWidget ) ); gtk_widget_set_events( wnd, GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK ); gtk_signal_connect( GTK_OBJECT( wnd ), "delete_event", GTK_SIGNAL_FUNC( widget_delete_hide ), NULL ); gtk_signal_connect( GTK_OBJECT( wnd ), "destroy", GTK_SIGNAL_FUNC( gtk_widget_destroy ), NULL );