mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Fix sleep function
This commit is contained in:
parent
d91edda475
commit
22c6fbe2d6
1 changed files with 10 additions and 25 deletions
|
@ -2052,6 +2052,13 @@ static void mainframe_unmap( GtkWidget *widget ){
|
||||||
CHECK_MINIMIZE( g_pGroupDlg->m_pWidget );
|
CHECK_MINIMIZE( g_pGroupDlg->m_pWidget );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static gboolean mainframe_state( GtkWidget *widget, GdkEventWindowState *e, gpointer user_data ){
|
||||||
|
|
||||||
|
if( e->changed_mask & GDK_WINDOW_STATE_ICONIFIED && !( e->new_window_state & GDK_WINDOW_STATE_ICONIFIED ) ) {
|
||||||
|
mainframe_map( widget );
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static GtkWidget* create_floating( MainFrame* mainframe ){
|
static GtkWidget* create_floating( MainFrame* mainframe ){
|
||||||
GtkWidget *wnd = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
GtkWidget *wnd = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
||||||
|
@ -2441,6 +2448,8 @@ void MainFrame::Create(){
|
||||||
GTK_SIGNAL_FUNC( mainframe_map ), this );
|
GTK_SIGNAL_FUNC( mainframe_map ), this );
|
||||||
gtk_signal_connect( GTK_OBJECT( window ), "unmap_event",
|
gtk_signal_connect( GTK_OBJECT( window ), "unmap_event",
|
||||||
GTK_SIGNAL_FUNC( mainframe_unmap ), this );
|
GTK_SIGNAL_FUNC( mainframe_unmap ), this );
|
||||||
|
gtk_signal_connect( GTK_OBJECT( window ), "window-state-event",
|
||||||
|
GTK_SIGNAL_FUNC( mainframe_state ), this );
|
||||||
|
|
||||||
g_qeglobals_gui.d_main_window = window;
|
g_qeglobals_gui.d_main_window = window;
|
||||||
|
|
||||||
|
@ -3024,31 +3033,7 @@ static void Sys_Iconify( GtkWidget *w ){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined ( __linux__ ) || defined ( __APPLE__ )
|
gtk_window_iconify( GTK_WINDOW( w ) );
|
||||||
Sys_FPrintf( SYS_WRN, "FIXME: Sys_Iconify\n" );
|
|
||||||
#if 0
|
|
||||||
XWindowAttributes xattr;
|
|
||||||
GdkWindowPrivate *Private;
|
|
||||||
|
|
||||||
Private = (GdkWindowPrivate*)w->window;
|
|
||||||
g_object_set_data( G_OBJECT( w ), "was_mapped", GINT_TO_POINTER( 0 ) );
|
|
||||||
|
|
||||||
if ( !Private->destroyed ) {
|
|
||||||
xattr.map_state = IsUnmapped;
|
|
||||||
XGetWindowAttributes( Private->xdisplay, Private->xwindow, &xattr );
|
|
||||||
|
|
||||||
if ( xattr.map_state != IsUnmapped ) {
|
|
||||||
g_object_set_data( G_OBJECT( w ), "was_mapped", GINT_TO_POINTER( 1 ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
XIconifyWindow( Private->xdisplay, Private->xwindow, 0 );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
ShowWindow( (HWND)GDK_WINDOW_HWND( w->window ), SW_MINIMIZE );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Sys_Restore( GtkWidget *w ){
|
static void Sys_Restore( GtkWidget *w ){
|
||||||
|
|
Loading…
Reference in a new issue