mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
win32: Make all GDK_WINDOW_TEMP always on top
This makes menus, popups and tooltips show above the windows task bar.
This commit is contained in:
parent
a63b6cc7f1
commit
62b505174f
@ -546,7 +546,7 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
|
||||
/* A temp window is not necessarily a top level window */
|
||||
dwStyle = (_gdk_root == real_parent ? WS_POPUP : WS_CHILDWINDOW);
|
||||
dwStyle |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
|
||||
dwExStyle |= WS_EX_TOOLWINDOW;
|
||||
dwExStyle |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
|
||||
offset_x = _gdk_offset_x;
|
||||
offset_y = _gdk_offset_y;
|
||||
break;
|
||||
@ -1144,10 +1144,11 @@ show_window_internal (GdkWindow *window,
|
||||
}
|
||||
|
||||
/* Sync STATE_ABOVE to TOPMOST */
|
||||
if (((window->state & GDK_WINDOW_STATE_ABOVE) &&
|
||||
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TEMP &&
|
||||
(((window->state & GDK_WINDOW_STATE_ABOVE) &&
|
||||
!(exstyle & WS_EX_TOPMOST)) ||
|
||||
(!(window->state & GDK_WINDOW_STATE_ABOVE) &&
|
||||
(exstyle & WS_EX_TOPMOST)))
|
||||
(exstyle & WS_EX_TOPMOST))))
|
||||
{
|
||||
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
|
||||
(window->state & GDK_WINDOW_STATE_ABOVE)?HWND_TOPMOST:HWND_NOTOPMOST,
|
||||
@ -2452,8 +2453,9 @@ update_style_bits (GdkWindow *window)
|
||||
new_style = old_style;
|
||||
new_exstyle = old_exstyle;
|
||||
|
||||
if (window->window_type == GDK_WINDOW_TEMP ||
|
||||
impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
|
||||
if (window->window_type == GDK_WINDOW_TEMP)
|
||||
new_exstyle |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
|
||||
else if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
|
||||
new_exstyle |= WS_EX_TOOLWINDOW ;
|
||||
else
|
||||
new_exstyle &= ~WS_EX_TOOLWINDOW;
|
||||
|
Loading…
Reference in New Issue
Block a user