[gimp] Win32 has a gdk_test_simulate_key() implementation since GTK+ 2.24.25.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Win32 has a gdk_test_simulate_key() implementation since GTK+ 2.24.25.
- Date: Thu, 6 Nov 2014 15:53:41 +0000 (UTC)
commit 56f0dc06fca5b31437034ba64585fe7f67c1675b
Author: Jehan <jehan girinstud io>
Date: Thu Nov 6 16:47:57 2014 +0100
Win32 has a gdk_test_simulate_key() implementation since GTK+ 2.24.25.
See bug 734879: commits c87c5cd in GTK+ master, and 03c5335 in gtk-2-24
branch.
app/tests/gimp-app-test-utils.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/app/tests/gimp-app-test-utils.c b/app/tests/gimp-app-test-utils.c
index 850764e..511bb59 100644
--- a/app/tests/gimp-app-test-utils.c
+++ b/app/tests/gimp-app-test-utils.c
@@ -163,9 +163,10 @@ void
gimp_test_utils_synthesize_key_event (GtkWidget *widget,
guint keyval)
{
-#ifdef G_OS_WIN32
- /* gdk_test_simulate_key() has no implementation for win32 currently.
- * Use this for now. */
+#if defined G_OS_WIN32 && ! GTK_CHECK_VERSION (2, 24, 25)
+ /* gdk_test_simulate_key() has no implementation for win32 until
+ * GTK+ 2.24.25.
+ * TODO: remove the below hack when our GTK+ requirement is over 2.24.25. */
GdkKeymapKey *keys = NULL;
gint n_keys = 0;
INPUT ip;
@@ -227,7 +228,7 @@ gimp_test_utils_synthesize_key_event (GtkWidget *widget,
{
g_warning ("%s: no win32 key mapping found for keyval %d.", G_STRFUNC, keyval);
}
-#else /* G_OS_WIN32 */
+#else /* G_OS_WIN32 && ! GTK_CHECK_VERSION (2, 24, 25) */
gdk_test_simulate_key (gtk_widget_get_window (widget),
-1, -1, /*x, y*/
keyval,
@@ -238,7 +239,7 @@ gimp_test_utils_synthesize_key_event (GtkWidget *widget,
keyval,
0 /*modifiers*/,
GDK_KEY_RELEASE);
-#endif /* G_OS_WIN32 */
+#endif /* G_OS_WIN32 && ! GTK_CHECK_VERSION (2, 24, 25) */
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]