GNOME Bugzilla – Bug 759018
wayland: tests/testtooltips custom tooltip misplaced at (0,0) on Wayland
Last modified: 2015-12-04 12:19:49 UTC
Summary: On Wayland for tooltips tp works as ecpedted the type hint must be set to tooltips, otherwise the popup window won't be translated as a subsurface in Wayland. The tests/testtooltips doesn't do that for its custom tooltip example. Steps to reproduce - Run a Wayland session - From gtk+ source tree, run ./tests/testtooltips - hover "This one has a custome tooltip window" label Actual result "blaat" written in black over dark blue appears at (0,0) Expected result "blaat" written in black over dark blue appears next to the pointer/label Additional info: Patch to be attached in a sec once I have this bugzilla number created
Created attachment 316757 [details] [review] wayland: fix testtooltips On Wayland, for tooltips to work as expected, the type hint must be set to tooltips, otherwise the popup window won't be translated as a subsurface. Fix the test do work as expected under Wayland.
Review of attachment 316757 [details] [review]: ::: tests/testtooltips.c @@ +60,3 @@ GtkWindow *window = gtk_widget_get_tooltip_window (widget); + gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_TOOLTIP); I wonder why you put these here, instead of setting the hint and the transient-for bits when creating tooltip_window.
Created attachment 316763 [details] [review] wayland: fix testtooltips (In reply to Emmanuele Bassi (:ebassi) from comment #2) > Review of attachment 316757 [details] [review] [review]: > > ::: tests/testtooltips.c > @@ +60,3 @@ > GtkWindow *window = gtk_widget_get_tooltip_window (widget); > > + gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_TOOLTIP); > > I wonder why you put these here, instead of setting the hint and the > transient-for bits when creating tooltip_window. Yeah, that would work equally well. Updated patch attached.
Review of attachment 316763 [details] [review]: Looks good to me.
Review of attachment 316763 [details] [review]: attachment 316763 [details] [review] pushed a commit 7fc493a wayland: fix testtooltips
Closing now