diff options
author | Timm Bäder <mail@baedert.org> | 2019-01-18 09:28:03 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2019-01-18 19:43:52 +0100 |
commit | a25d6b1dc7bcc7134a9c9238ec48b2c66242547e (patch) | |
tree | 782461cffabeadc756b93e6ca27bf5b94b4623a4 | |
parent | c8ec0f42a02b77a856370b8bdc5c95e1174b5bab (diff) | |
download | gtk+-a25d6b1dc7bcc7134a9c9238ec48b2c66242547e.tar.gz |
tooltip: Use gdk_rectangle_contains_point
-rw-r--r-- | gtk/gtktooltip.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index 42f550c24e..07f535ada5 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -944,7 +944,7 @@ gtk_tooltip_handle_event_internal (GdkEventType event_type, if (current_tooltip) { gboolean tip_area_set; - GdkRectangle tip_area; + GdkRectangle tip_area; gboolean hide_tooltip; tip_area_set = current_tooltip->tip_area_set; @@ -963,10 +963,7 @@ gtk_tooltip_handle_event_internal (GdkEventType event_type, /* Did the pointer move out of the previous "context area"? */ if (tip_area_set) - hide_tooltip |= (x <= tip_area.x - || x >= tip_area.x + tip_area.width - || y <= tip_area.y - || y >= tip_area.y + tip_area.height); + hide_tooltip |= !gdk_rectangle_contains_point (&tip_area, x, y); if (hide_tooltip) gtk_tooltip_hide_tooltip (current_tooltip); |