Use Menus to implement tooltips

The order in which tooltips are created, drawn, shown and then positioned,
always requires repositioning the surface. The tooltip window type only has
limited capability to do so. An alternative could be to use bufferstreams.

https://bugzilla.gnome.org/show_bug.cgi?id=768138
This commit is contained in:
Andreas Pokorny 2016-07-19 10:45:33 +02:00 committed by William Hua
parent 056ddf2567
commit 3334e0a21d

View File

@ -334,6 +334,9 @@ create_window_type_spec (GdkDisplay *display,
case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
case GDK_WINDOW_TYPE_HINT_TOOLBAR:
case GDK_WINDOW_TYPE_HINT_COMBO:
case GDK_WINDOW_TYPE_HINT_DND:
case GDK_WINDOW_TYPE_HINT_TOOLTIP:
case GDK_WINDOW_TYPE_HINT_NOTIFICATION:
return mir_connection_create_spec_for_menu (connection,
width,
height,
@ -349,16 +352,6 @@ create_window_type_spec (GdkDisplay *display,
height,
format,
parent_surface);
case GDK_WINDOW_TYPE_HINT_DND:
case GDK_WINDOW_TYPE_HINT_TOOLTIP:
case GDK_WINDOW_TYPE_HINT_NOTIFICATION:
return mir_connection_create_spec_for_tooltip (connection,
width,
height,
format,
parent_surface,
&real_rect);
break;
case GDK_WINDOW_TYPE_HINT_NORMAL:
case GDK_WINDOW_TYPE_HINT_DESKTOP:
default: