X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c20ee63f0c17102213c5c6bb058b7bb9d0ad141..b50747ea53f4a9906d572d4bca4e452e66c8dbd5:/src/gtk/toplevel.cpp diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index fa07bb1c9b..877082cdc6 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -7,6 +7,9 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + // ============================================================================ // declarations // ============================================================================ @@ -15,20 +18,19 @@ // headers // ---------------------------------------------------------------------------- -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - #ifdef __VMS #define XIconifyWindow XICONIFYWINDOW #endif -#include "wx/defs.h" - #include "wx/toplevel.h" -#include "wx/log.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" +#endif + #include "wx/dialog.h" #include "wx/control.h" -#include "wx/app.h" #include "wx/dcclient.h" #include "wx/gtk/private.h" #include "wx/timer.h" @@ -48,13 +50,6 @@ // XA_CARDINAL #include -// ---------------------------------------------------------------------------- -// idle system -// ---------------------------------------------------------------------------- - -extern void wxapp_install_idle_handler(); -extern bool g_isIdle; - // ---------------------------------------------------------------------------- // data // ---------------------------------------------------------------------------- @@ -103,7 +98,7 @@ static void wxgtk_window_set_urgency_hint (GtkWindow *win, static gboolean gtk_frame_urgency_timer_callback( wxTopLevelWindowGTK *win ) { -#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2,7,0) +#if GTK_CHECK_VERSION(2,7,0) if(!gtk_check_version(2,7,0)) gtk_window_set_urgency_hint(GTK_WINDOW( win->m_widget ), FALSE); else @@ -153,7 +148,7 @@ static gboolean gtk_frame_focus_in_callback( GtkWidget *widget, g_source_remove( win->m_urgency_hint ); // no break, fallthrough to remove hint too case -1: -#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2,7,0) +#if GTK_CHECK_VERSION(2,7,0) if(!gtk_check_version(2,7,0)) gtk_window_set_urgency_hint(GTK_WINDOW( widget ), FALSE); else @@ -265,7 +260,10 @@ static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* //----------------------------------------------------------------------------- extern "C" { -static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxTopLevelWindowGTK *win ) +static gboolean +gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), + GdkEvent *WXUNUSED(event), + wxTopLevelWindowGTK *win ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -285,8 +283,10 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX //----------------------------------------------------------------------------- extern "C" { -static gint -gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *WXUNUSED(event), wxTopLevelWindowGTK *win ) +static gboolean +gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), + GdkEventConfigure *WXUNUSED(event), + wxTopLevelWindowGTK *win ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -380,7 +380,10 @@ gtk_frame_unmap_callback( GtkWidget * WXUNUSED(widget), //----------------------------------------------------------------------------- extern "C" { -static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_event, wxWindow *win ) +static gboolean +gtk_window_expose_callback( GtkWidget *widget, + GdkEventExpose *gdk_event, + wxWindow *win ) { GtkPizza *pizza = GTK_PIZZA(widget); @@ -1263,7 +1266,7 @@ void wxTopLevelWindowGTK::RequestUserAttention(int flags) } } -#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2,7,0) +#if GTK_CHECK_VERSION(2,7,0) if(!gtk_check_version(2,7,0)) gtk_window_set_urgency_hint(GTK_WINDOW( m_widget ), new_hint_value); else @@ -1273,8 +1276,10 @@ void wxTopLevelWindowGTK::RequestUserAttention(int flags) void wxTopLevelWindowGTK::SetWindowStyleFlag( long style ) { +#if defined(__WXGTK24__) || GTK_CHECK_VERSION(2,2,0) // Store which styles were changed long styleChanges = style ^ m_windowStyle; +#endif // Process wxWindow styles. This also updates the internal variable // Therefore m_windowStyle bits carry now the _new_ style values