app: Fix on canvas widgets ignoring clicks from tablets - bug 614441
Disable extended input events when the cursor moves to a child of the canvas widget. Otherwise GTK will try and fail to deliver an extended event to the child widget, and end up sending it to the canvas instead.
This commit is contained in:

committed by
Michael Natterer

parent
60e232569f
commit
a059c0e7eb
@ -339,7 +339,9 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
|||||||
display, gimp_print_event (event));
|
display, gimp_print_event (event));
|
||||||
|
|
||||||
/* Find out what device the event occurred upon */
|
/* Find out what device the event occurred upon */
|
||||||
if (! gimp->busy && gimp_devices_check_change (gimp, event))
|
if (! gimp->busy &&
|
||||||
|
! shell->inferior_ignore_mode &&
|
||||||
|
gimp_devices_check_change (gimp, event))
|
||||||
{
|
{
|
||||||
gimp_display_shell_check_device_cursor (shell);
|
gimp_display_shell_check_device_cursor (shell);
|
||||||
device_changed = TRUE;
|
device_changed = TRUE;
|
||||||
@ -367,6 +369,13 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
|||||||
{
|
{
|
||||||
GdkEventCrossing *cevent = (GdkEventCrossing *) event;
|
GdkEventCrossing *cevent = (GdkEventCrossing *) event;
|
||||||
|
|
||||||
|
if (shell->inferior_ignore_mode)
|
||||||
|
{
|
||||||
|
shell->inferior_ignore_mode = FALSE;
|
||||||
|
gtk_widget_set_extension_events (shell->canvas,
|
||||||
|
GDK_EXTENSION_EVENTS_ALL);
|
||||||
|
}
|
||||||
|
|
||||||
if (cevent->mode != GDK_CROSSING_NORMAL)
|
if (cevent->mode != GDK_CROSSING_NORMAL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -388,6 +397,13 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
|||||||
{
|
{
|
||||||
GdkEventCrossing *cevent = (GdkEventCrossing *) event;
|
GdkEventCrossing *cevent = (GdkEventCrossing *) event;
|
||||||
|
|
||||||
|
if (cevent->detail == GDK_NOTIFY_INFERIOR)
|
||||||
|
{
|
||||||
|
shell->inferior_ignore_mode = TRUE;
|
||||||
|
gtk_widget_set_extension_events (shell->canvas,
|
||||||
|
GDK_EXTENSION_EVENTS_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
if (cevent->mode != GDK_CROSSING_NORMAL)
|
if (cevent->mode != GDK_CROSSING_NORMAL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
@ -174,6 +174,8 @@ struct _GimpDisplayShell
|
|||||||
gboolean keyboard_grabbed;
|
gboolean keyboard_grabbed;
|
||||||
guint32 keyboard_grab_time;
|
guint32 keyboard_grab_time;
|
||||||
|
|
||||||
|
gboolean inferior_ignore_mode;
|
||||||
|
|
||||||
gboolean space_pressed;
|
gboolean space_pressed;
|
||||||
gboolean space_release_pending;
|
gboolean space_release_pending;
|
||||||
const gchar *space_shaded_tool;
|
const gchar *space_shaded_tool;
|
||||||
|
Reference in New Issue
Block a user