inline void CHECK_RESTORE( ui::Widget w ){
if ( gpointer_to_int( g_object_get_data( G_OBJECT( w ), "was_mapped" ) ) != 0 ) {
w.show();
+#define GARUX_GTK_WORKAROUND
+#ifndef GARUX_GTK_WORKAROUND
/* workaround for gtk 2.24 issue: not displayed glwidget after min/restore */
GtkWidget* glwidget = GTK_WIDGET( g_object_get_data( G_OBJECT( w ), "glwidget" ) );
if ( glwidget ){
gtk_widget_hide( glwidget );
gtk_widget_show( glwidget );
}
+#endif
}
}
void Show(){
// workaround for strange gtk behaviour - modifying the contents of a window while it is not visible causes the window position to change without sending a configure_event
m_position_tracker.sync( m_window );
+#define GARUX_GTK_WORKAROUND
+#ifndef GARUX_GTK_WORKAROUND
/* workaround for gtk 2.24 issue: not displayed glwidget after toggle */
GtkWidget* glwidget = GTK_WIDGET( g_object_get_data( G_OBJECT( m_window ), "glwidget" ) );
if ( glwidget ){
gtk_widget_hide( glwidget );
gtk_widget_show( glwidget );
}
+#endif
m_window.show();
}
void Hide(){
window.add(frame);
}
CamWnd_setParent( *m_pCamWnd, window );
+#define GARUX_GTK_WORKAROUND
+#ifndef GARUX_GTK_WORKAROUND
/* workaround for gtk 2.24 issue: not displayed glwidget after toggle */
g_object_set_data( G_OBJECT( window ), "glwidget", CamWnd_getWidget( *m_pCamWnd ) );
+#endif
g_floating_windows.push_back( window );
}
window.add(frame);
}
XY_Top_Shown_Construct( window );
+#ifndef GARUX_GTK_WORKAROUND
/* workaround for gtk 2.24 issue: not displayed glwidget after toggle */
g_object_set_data( G_OBJECT( window ), "glwidget", m_pXYWnd->GetWidget() );
+#endif
g_floating_windows.push_back( window );
}
}
XZ_Front_Shown_Construct( window );
+#ifndef GARUX_GTK_WORKAROUND
/* workaround for gtk 2.24 issue: not displayed glwidget after toggle */
g_object_set_data( G_OBJECT( window ), "glwidget", m_pXZWnd->GetWidget() );
+#endif
g_floating_windows.push_back( window );
}
}
YZ_Side_Shown_Construct( window );
+#ifndef GARUX_GTK_WORKAROUND
/* workaround for gtk 2.24 issue: not displayed glwidget after toggle */
g_object_set_data( G_OBJECT( window ), "glwidget", m_pYZWnd->GetWidget() );
+#endif
g_floating_windows.push_back( window );
}
{
auto frame = create_framed_widget( TextureBrowser_constructWindow( GroupDialog_getWindow() ) );
g_page_textures = GroupDialog_addPage( "Textures", frame, TextureBrowserExportTitleCaller() );
+#ifndef GARUX_GTK_WORKAROUND
/* workaround for gtk 2.24 issue: not displayed glwidget after toggle */
g_object_set_data( G_OBJECT( GroupDialog_getWindow() ), "glwidget", TextureBrowser_getGLWidget() );
+#endif
}
{
auto frame = create_framed_widget( TextureBrowser_constructWindow( window ) );
g_page_textures = GroupDialog_addPage( "Textures", frame, TextureBrowserExportTitleCaller() );
+#ifndef GARUX_GTK_WORKAROUND
/* workaround for gtk 2.24 issue: not displayed glwidget after toggle */
g_object_set_data( G_OBJECT( GroupDialog_getWindow() ), "glwidget", TextureBrowser_getGLWidget() );
+#endif
}
}