GNOME Bugzilla – Bug 734869
gimp_test_utils_synthesize_key_event() broken for win32
Last modified: 2014-08-15 21:17:44 UTC
Created attachment 283527 [details] [review] Fix gimp_test_utils_synthesize_key_event() 2 tests were failing for win32: crop_tool_can_crop() in app/tests/test-tools.c and keyboard_zoom_focus() in app/tests/test-ui.c. gimp_test_utils_synthesize_key_event() was at fault, in particular because here is gdk_test_simulate_key() implementation for win32: gboolean gdk_test_simulate_key (GdkWindow *window, gint x, gint y, guint keyval, GdkModifierType modifiers, GdkEventType key_pressrelease) { g_return_val_if_fail (key_pressrelease == GDK_KEY_PRESS || key_pressrelease == GDK_KEY_RELEASE, FALSE); g_return_val_if_fail (window != NULL, FALSE); return FALSE; } Basically it does nothing. I wrote down an alternative win32 implementation, I'll also send a patch for GTK+, but for the time being, let's have a copy of the working implementation in GIMP code too. With this patch, both failing tests are now working.
The proposed patch for GTK+ is at bug 734879.
commit 2b64efc11d50e2d714827205cba13cdd9af32eea Author: Jehan <jehan@girinstud.io> Date: Fri Aug 15 16:35:57 2014 +0000 tests: gimp_test_utils_synthesize_key_event() not working for win32. gdk_test_simulate_key() has currently no win32 implementation. Add this implementation in our code until a patch to GTK+ for this is merged. This fixes 2 `make check` tests for win32.