[gtk+] win32: Make all GDK_WINDOW_TEMP always on top
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] win32: Make all GDK_WINDOW_TEMP always on top
- Date: Fri, 25 Nov 2011 10:24:42 +0000 (UTC)
commit 62b505174f16743833467290f49c1ae09c25448e
Author: Alexander Larsson <alexl redhat com>
Date: Fri Nov 25 11:21:26 2011 +0100
win32: Make all GDK_WINDOW_TEMP always on top
This makes menus, popups and tooltips show above the windows
task bar.
gdk/win32/gdkwindow-win32.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 0218620..45457a3 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -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) &&
- !(exstyle & WS_EX_TOPMOST)) ||
- (!(window->state & GDK_WINDOW_STATE_ABOVE) &&
- (exstyle & WS_EX_TOPMOST)))
+ 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))))
{
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
(window->state & GDK_WINDOW_STATE_ABOVE)?HWND_TOPMOST:HWND_NOTOPMOST,
@@ -2452,9 +2453,10 @@ 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)
- new_exstyle |= WS_EX_TOOLWINDOW;
+ 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]