Alexandre Julliard : winex11.drv: Set the WM_STATE_ABOVE hint on topmost windows.
Alexandre Julliard
julliard at winehq.org
Thu Nov 1 07:39:42 CDT 2007
Module: wine
Branch: master
Commit: 83fd17f2163071415471bb1433b004dce1ddba00
URL: http://source.winehq.org/git/wine.git/?a=commit;h=83fd17f2163071415471bb1433b004dce1ddba00
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Oct 31 18:13:20 2007 +0100
winex11.drv: Set the WM_STATE_ABOVE hint on topmost windows.
---
dlls/winex11.drv/winpos.c | 3 +++
dlls/winex11.drv/x11drv.h | 2 ++
dlls/winex11.drv/x11drv_main.c | 1 +
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index 9de341b..e4ce6f5 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -181,6 +181,7 @@ static void update_wm_states( Display *display, struct x11drv_win_data *data, BO
static const unsigned int state_atoms[NB_WM_STATES] =
{
XATOM__NET_WM_STATE_FULLSCREEN,
+ XATOM__NET_WM_STATE_ABOVE,
XATOM__NET_WM_STATE_SKIP_PAGER,
XATOM__NET_WM_STATE_SKIP_TASKBAR
};
@@ -195,6 +196,8 @@ static void update_wm_states( Display *display, struct x11drv_win_data *data, BO
new_state |= (1 << WM_STATE_FULLSCREEN);
ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE );
+ if (ex_style & WS_EX_TOPMOST)
+ new_state |= (1 << WM_STATE_ABOVE);
if (ex_style & WS_EX_TOOLWINDOW)
new_state |= (1 << WM_STATE_SKIP_TASKBAR) | (1 << WM_STATE_SKIP_PAGER);
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 49d6e8b..445badc 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -578,6 +578,7 @@ enum x11drv_atoms
XATOM__NET_WM_PID,
XATOM__NET_WM_PING,
XATOM__NET_WM_STATE,
+ XATOM__NET_WM_STATE_ABOVE,
XATOM__NET_WM_STATE_FULLSCREEN,
XATOM__NET_WM_STATE_SKIP_PAGER,
XATOM__NET_WM_STATE_SKIP_TASKBAR,
@@ -649,6 +650,7 @@ enum x11drv_window_messages
enum x11drv_wm_state
{
WM_STATE_FULLSCREEN,
+ WM_STATE_ABOVE,
WM_STATE_SKIP_PAGER,
WM_STATE_SKIP_TASKBAR,
NB_WM_STATES
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index 1cfc0b0..d26fa8b 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -135,6 +135,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"_NET_WM_PID",
"_NET_WM_PING",
"_NET_WM_STATE",
+ "_NET_WM_STATE_ABOVE",
"_NET_WM_STATE_FULLSCREEN",
"_NET_WM_STATE_SKIP_PAGER",
"_NET_WM_STATE_SKIP_TASKBAR",
More information about the wine-cvs
mailing list