mirror of https://github.com/GNOME/gimp.git
work around bug #136636 (Win32 only) and ask the current device for its
2004-03-10 Michael Natterer <mitch@gimp.org> * app/display/gimpdisplayshell-callbacks.c (gimp_display_shell_events): work around bug #136636 (Win32 only) and ask the current device for its modifier state in order to fill in the missing GDK_BUTTON*_MASK bits in GdkEventKey::state.
This commit is contained in:
parent
ab1adaa0bb
commit
2b7101979a
|
@ -1,3 +1,10 @@
|
||||||
|
2004-03-10 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/display/gimpdisplayshell-callbacks.c
|
||||||
|
(gimp_display_shell_events): work around bug #136636 (Win32 only)
|
||||||
|
and ask the current device for its modifier state in order to fill
|
||||||
|
in the missing GDK_BUTTON*_MASK bits in GdkEventKey::state.
|
||||||
|
|
||||||
2004-03-10 Ville Pätsi <drc@gimp.org>
|
2004-03-10 Ville Pätsi <drc@gimp.org>
|
||||||
|
|
||||||
* Makefile.am
|
* Makefile.am
|
||||||
|
|
|
@ -133,6 +133,29 @@ gimp_display_shell_events (GtkWidget *widget,
|
||||||
if (gimp->busy)
|
if (gimp->busy)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
/* work around missing GDK_BUTTON*_MASK bits in GdkEventKey::state
|
||||||
|
* (see http://bugzilla.gnome.org/show_bug.cgi?id=136636)
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
GdkModifierType mouse_mask;
|
||||||
|
|
||||||
|
gdk_device_get_state (gimp_devices_get_current (gimp),
|
||||||
|
widget->window, NULL, &mouse_mask);
|
||||||
|
|
||||||
|
if (mouse_mask & GDK_BUTTON1_MASK)
|
||||||
|
kevent->state |= GDK_BUTTON1_MASK;
|
||||||
|
if (mouse_mask & GDK_BUTTON2_MASK)
|
||||||
|
kevent->state |= GDK_BUTTON2_MASK;
|
||||||
|
if (mouse_mask & GDK_BUTTON3_MASK)
|
||||||
|
kevent->state |= GDK_BUTTON3_MASK;
|
||||||
|
if (mouse_mask & GDK_BUTTON4_MASK)
|
||||||
|
kevent->state |= GDK_BUTTON4_MASK;
|
||||||
|
if (mouse_mask & GDK_BUTTON5_MASK)
|
||||||
|
kevent->state |= GDK_BUTTON5_MASK;
|
||||||
|
}
|
||||||
|
#endif /* G_OS_WIN32 */
|
||||||
|
|
||||||
/* do not process any key events while BUTTON1 is down. We do this
|
/* do not process any key events while BUTTON1 is down. We do this
|
||||||
* so tools keep the modifier state they were in when BUTTON1 was
|
* so tools keep the modifier state they were in when BUTTON1 was
|
||||||
* pressed and to prevent accelerators from being invoked.
|
* pressed and to prevent accelerators from being invoked.
|
||||||
|
|
Loading…
Reference in New Issue