#include <ctype.h>
#include "wx/gtk/private.h"
-#include "wx/gtk/win_gtk.h"
+#include "wx/gtk/private/win_gtk.h"
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkx.h>
wxWindowGTK *g_focusWindow = (wxWindowGTK*) NULL;
-// the last window which had the focus - this is normally never NULL (except
-// if we never had focus at all) as even when g_focusWindow is NULL it still
-// keeps its previous value
-wxWindowGTK *g_focusWindowLast = (wxWindowGTK*) NULL;
-
// If a window get the focus set but has not been realized
// yet, defer setting the focus to idle time.
wxWindowGTK *g_delayedFocus = (wxWindowGTK*) NULL;
//-----------------------------------------------------------------------------
// returns the child of win which currently has focus or NULL if not found
-//
-// Note: can't be static, needed by textctrl.cpp.
-wxWindow *wxFindFocusedChild(wxWindowGTK *win)
+static wxWindow *wxFindFocusedChild(wxWindowGTK *win)
{
wxWindow *winFocus = wxWindowGTK::FindFocus();
if ( !winFocus )
if (win->m_imData)
gtk_im_context_focus_in(win->m_imData->context);
- g_focusWindowLast =
g_focusWindow = win;
wxLogTrace(TRACE_FOCUS,
}
}
- if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
+ if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
}
window = m_wxwindow->window;
return window;
}
+
+// ----------------------------------------------------------------------------
+// freeze/thaw
+// ----------------------------------------------------------------------------
+
+void wxWindowGTK::GTKFreezeWidget(GtkWidget *w)
+{
+ if ( w && !GTK_WIDGET_NO_WINDOW(w) )
+ gdk_window_freeze_updates(w->window);
+}
+
+void wxWindowGTK::GTKThawWidget(GtkWidget *w)
+{
+ if ( w && !GTK_WIDGET_NO_WINDOW(w) )
+ gdk_window_thaw_updates(w->window);
+}
+
+void wxWindowGTK::DoFreeze()
+{
+ GTKFreezeWidget(m_widget);
+ if ( m_wxwindow && m_widget != m_wxwindow )
+ GTKFreezeWidget(m_wxwindow);
+}
+
+void wxWindowGTK::DoThaw()
+{
+ GTKThawWidget(m_widget);
+ if ( m_wxwindow && m_widget != m_wxwindow )
+ GTKThawWidget(m_wxwindow);
+}