diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2015-12-04 11:25:50 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2015-12-04 13:17:29 +0100 |
commit | 7fc493a8a89ae2b7df0f2deee90be122bf11fa09 (patch) | |
tree | 1b249d6fff63ea49df5b42e80506e8745d6d54e9 /tests/testtooltips.c | |
parent | bd332f10ab2d3a3eee5ee53d472dd0a7ad15198e (diff) | |
download | gtk+-7fc493a8a89ae2b7df0f2deee90be122bf11fa09.tar.gz |
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.
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759018
Diffstat (limited to 'tests/testtooltips.c')
-rw-r--r-- | tests/testtooltips.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/testtooltips.c b/tests/testtooltips.c index 4e1552d69b..853239e97b 100644 --- a/tests/testtooltips.c +++ b/tests/testtooltips.c @@ -341,6 +341,11 @@ main (int argc, char *argv[]) gtk_widget_show (tooltip_button); gtk_widget_set_tooltip_window (button, GTK_WINDOW (tooltip_window)); + gtk_window_set_type_hint (GTK_WINDOW (tooltip_window), + GDK_WINDOW_TYPE_HINT_TOOLTIP); + gtk_window_set_transient_for (GTK_WINDOW (tooltip_window), + GTK_WINDOW (window)); + g_signal_connect (button, "query-tooltip", G_CALLBACK (query_tooltip_custom_cb), NULL); g_object_set (button, "has-tooltip", TRUE, NULL); |