[Libreoffice-commits] .: 2 commits - vcl/unx
David Tardon
dtardon at kemper.freedesktop.org
Thu Oct 21 22:31:42 PDT 2010
vcl/unx/gtk/window/gtkframe.cxx | 7 ++++---
vcl/unx/inc/plugins/gtk/gtkframe.hxx | 5 +++--
2 files changed, 7 insertions(+), 5 deletions(-)
New commits:
commit b064b889b95c166361147a9be62599e79320db9a
Author: David Tardon <dtardon at redhat.com>
Date: Fri Oct 22 07:30:36 2010 +0200
fix comparison of key events for IM
diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
index ac2069b..a975a3b 100644
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
@@ -118,11 +118,12 @@ class GtkSalFrame : public SalFrame
return (event != NULL)
&& (event->window == window)
&& (event->send_event == send_event)
- && (event->state == state)
+ // ignore non-Gdk state bits, e.g., these used by IBus
+ && ((event->state & GDK_MODIFIER_MASK) == (state & GDK_MODIFIER_MASK))
&& (event->keyval == keyval)
&& (event->hardware_keycode == hardware_keycode)
&& (event->group == group)
- && (event->time - time < 3)
+ && (event->time - time < 300)
;
}
};
commit 8a362c58f56a65030d9fc1afbd0f0192d8bd179c
Author: David Tardon <dtardon at redhat.com>
Date: Fri Oct 22 07:30:09 2010 +0200
fix IM input
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 0e70fc6..2398fbb 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3552,6 +3552,10 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
// open a block that will end the GTK_YIELD_GRAB before calling preedit changed again
{
GTK_YIELD_GRAB();
+
+ const bool bWasPreedit =
+ (pThis->m_aInputEvent.mpTextAttr != 0) ||
+ pThis->m_bPreeditJustChanged;
pThis->m_aInputEvent.mnTime = 0;
pThis->m_aInputEvent.mpTextAttr = 0;
@@ -3576,9 +3580,6 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
* or because there never was a preedit.
*/
bool bSingleCommit = false;
- bool bWasPreedit =
- (pThis->m_aInputEvent.mpTextAttr != 0) ||
- pThis->m_bPreeditJustChanged;
if( ! bWasPreedit
&& pThis->m_aInputEvent.maText.Len() == 1
&& ! pThis->m_aPrevKeyPresses.empty()
More information about the Libreoffice-commits
mailing list