After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734879 - gdk_test_simulate_key() has no implementation on win32
gdk_test_simulate_key() has no implementation on win32
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-08-15 18:02 UTC by Jehan
Modified: 2014-09-23 01:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
win32 implementation for gdk_test_simulate_key() (3.18 KB, patch)
2014-08-15 18:02 UTC, Jehan
none Details | Review
win32 implementation for gdk_test_simulate_key() on GTK+2 (3.17 KB, patch)
2014-08-15 18:05 UTC, Jehan
none Details | Review

Description Jehan 2014-08-15 18:02:08 UTC
Created attachment 283547 [details] [review]
win32 implementation for gdk_test_simulate_key()

Here is the current "implementation":

gboolean
_gdk_win32_window_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;
}

It does nothing. I realized this by checking why some of our unit tests for GIMP fail for the win32 platform. See bug 734869.
Attached a patch which makes an implementation for gdk_test_simulate_key() on win32. Patch built against master.
Comment 1 Jehan 2014-08-15 18:05:12 UTC
Created attachment 283550 [details] [review]
win32 implementation for gdk_test_simulate_key() on GTK+2

And as a bonus, the GTK+2 patch. Because that would be nice to be backported there (especially since we use this on GIMP).