mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
fix another edge case in the floating texture window management
This commit is contained in:
parent
f2ab6576c6
commit
61aa13c1f9
2 changed files with 11 additions and 5 deletions
|
@ -1138,6 +1138,13 @@ static void switch_page( GtkNotebook *notebook, GtkNotebookPage *page, guint pag
|
|||
// =============================================================================
|
||||
// GroupDlg class
|
||||
|
||||
static gint OnDeleteHide( GtkWidget *widget ) {
|
||||
gtk_widget_hide( widget );
|
||||
// see OnDialogKey
|
||||
gtk_notebook_set_current_page( GTK_NOTEBOOK( g_pGroupDlg->m_pNotebook ), 0 );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// NOTE: when a key is hit with group window focused, we catch in this handler but it gets propagated to mainframe too
|
||||
// therefore the message will be intercepted and used as a ID_SELECTION_DESELECT
|
||||
static gint OnDialogKey( GtkWidget* widget, GdkEventKey* event, gpointer data ) {
|
||||
|
@ -1207,7 +1214,7 @@ void GroupDlg::Create(){
|
|||
load_window_pos( dlg, g_PrefsDlg.mWindowInfo.posEntityWnd );
|
||||
|
||||
gtk_window_set_title( GTK_WINDOW( dlg ), "Entities" );
|
||||
gtk_signal_connect( GTK_OBJECT( dlg ), "delete_event", GTK_SIGNAL_FUNC( widget_delete_hide ), NULL );
|
||||
gtk_signal_connect( GTK_OBJECT( dlg ), "delete_event", GTK_SIGNAL_FUNC( OnDeleteHide ), NULL );
|
||||
// catch 'Esc'
|
||||
gtk_signal_connect( GTK_OBJECT( dlg ), "key_press_event", GTK_SIGNAL_FUNC( OnDialogKey ), NULL );
|
||||
|
||||
|
|
|
@ -138,10 +138,9 @@ void load_window_pos( GtkWidget *wnd, window_position_t& pos ){
|
|||
#endif
|
||||
}
|
||||
|
||||
gint widget_delete_hide( GtkWidget *widget ){
|
||||
gtk_widget_hide( widget );
|
||||
|
||||
return TRUE;
|
||||
gint widget_delete_hide( GtkWidget *widget ) {
|
||||
gtk_widget_hide( widget );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue