]> git.saurik.com Git - wxWidgets.git/commitdiff
inform the IM context about focus changes
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 24 Jun 2004 20:52:25 +0000 (20:52 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 24 Jun 2004 20:52:25 +0000 (20:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/window.cpp

index e805789afc1399c9208392c92d730341a4b55370..cd98009b09baaeaaed996112553255f903309317 100644 (file)
@@ -1900,6 +1900,11 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget,
     if (g_isIdle)
         wxapp_install_idle_handler();
 
+#ifdef __WXGTK20__
+    if (win->m_imContext)
+        gtk_im_context_focus_in(win->m_imContext);
+#endif
+
     if (!win->m_hasVMT) return FALSE;
     if (g_blockEventsOnDrag) return FALSE;
 
@@ -1988,6 +1993,11 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEventFocus *gdk
     if (g_isIdle)
         wxapp_install_idle_handler();
 
+#ifdef __WXGTK20__
+    if (win->m_imContext)
+        gtk_im_context_focus_out(win->m_imContext);
+#endif
+
     if (!win->m_hasVMT) return FALSE;
     if (g_blockEventsOnDrag) return FALSE;
 
index e805789afc1399c9208392c92d730341a4b55370..cd98009b09baaeaaed996112553255f903309317 100644 (file)
@@ -1900,6 +1900,11 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget,
     if (g_isIdle)
         wxapp_install_idle_handler();
 
+#ifdef __WXGTK20__
+    if (win->m_imContext)
+        gtk_im_context_focus_in(win->m_imContext);
+#endif
+
     if (!win->m_hasVMT) return FALSE;
     if (g_blockEventsOnDrag) return FALSE;
 
@@ -1988,6 +1993,11 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEventFocus *gdk
     if (g_isIdle)
         wxapp_install_idle_handler();
 
+#ifdef __WXGTK20__
+    if (win->m_imContext)
+        gtk_im_context_focus_out(win->m_imContext);
+#endif
+
     if (!win->m_hasVMT) return FALSE;
     if (g_blockEventsOnDrag) return FALSE;