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 734738 - Possible bug in W32 input grabbing
Possible bug in W32 input grabbing
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-13 19:56 UTC by LRN
Modified: 2014-08-15 17:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description LRN 2014-08-13 19:56:03 UTC
When building GDK i get this:
../../../gtk+-3.13.6/gdk/win32/gdkevents-win32.c: In function 'generate_grab_broken_event':
../../../gtk+-3.13.6/gdk/win32/gdkevents-win32.c:213:14: warning: variable 'source_device' set but not used [-Wunused-but-set-variable]
   GdkDevice *source_device;
              ^

This doesn't look like just unused variable warning, since it may be possible that the value was actually meant to be used, but a different one is re-used instead:

  GdkDevice *device;
  GdkDevice *source_device;

  /* Much efforts to get source_device here */
  if (keyboard)
    {
      device = GDK_DEVICE_MANAGER_WIN32 (device_manager)->core_keyboard;
      source_device = GDK_DEVICE_MANAGER_WIN32 (device_manager)->system_keyboard;
    }
  else
    {
      device = GDK_DEVICE_MANAGER_WIN32 (device_manager)->core_pointer;
      source_device = GDK_DEVICE_MANAGER_WIN32 (device_manager)->system_pointer;
    }

  event->grab_broken.window = window;
  event->grab_broken.send_event = 0;
  event->grab_broken.keyboard = keyboard;
  event->grab_broken.implicit = FALSE;
  event->grab_broken.grab_window = grab_window;
  gdk_event_set_device (event, device);
  /* Yet it's never used here */
  gdk_event_set_source_device (event, device);
Comment 1 Matthias Clasen 2014-08-13 22:46:44 UTC
yeah, pretty clear that source_device was meant in the last line