forked from AuroraMiddleware/gtk
tooltip: Ignore events with pressed buttons
We dont' want to show tooltips in those cases.
This commit is contained in:
parent
4336c6412a
commit
b0e9dc4723
@ -1176,10 +1176,20 @@ _gtk_tooltip_handle_event (GdkEvent *event)
|
||||
GdkEventType event_type;
|
||||
GdkSurface *surface;
|
||||
gdouble dx, dy;
|
||||
GdkModifierType event_state = 0;
|
||||
|
||||
if (!tooltips_enabled (event))
|
||||
return;
|
||||
|
||||
gdk_event_get_state (event, &event_state);
|
||||
if ((event_state &
|
||||
(GDK_BUTTON1_MASK |
|
||||
GDK_BUTTON2_MASK |
|
||||
GDK_BUTTON3_MASK |
|
||||
GDK_BUTTON4_MASK |
|
||||
GDK_BUTTON5_MASK)) != 0)
|
||||
return;
|
||||
|
||||
event_type = gdk_event_get_event_type (event);
|
||||
surface = gdk_event_get_surface (event);
|
||||
gdk_event_get_coords (event, &dx, &dy);
|
||||
|
Loading…
Reference in New Issue
Block a user