Commit 1a1b902e authored by Nickolay V. Shmyrev's avatar Nickolay V. Shmyrev Committed by Alexandre Julliard

winex11.drv: Always set window type.

parent 7e9e599d
......@@ -465,6 +465,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
XClassHint *class_hints;
XWMHints* wm_hints;
Atom protocols[3];
Atom window_type;
MwmHints mwm_hints;
Atom dndVersion = 4;
int i;
......@@ -523,13 +524,15 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_PID),
XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&i, 1);
/* map WS_EX_TOOLWINDOW to _NET_WM_WINDOW_TYPE_UTILITY */
if (ex_style & WS_EX_TOOLWINDOW)
{
Atom a = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY);
XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE),
XA_ATOM, 32, PropModeReplace, (unsigned char*)&a, 1);
}
/* set the WM_WINDOW_TYPE */
window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL);
if (ex_style & WS_EX_TOOLWINDOW) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY);
else if (style & WS_THICKFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL);
else if (style & WS_DLGFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG);
else if (ex_style & WS_EX_DLGMODALFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG);
XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE),
XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1);
mwm_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
mwm_hints.functions = MWM_FUNC_MOVE;
......
......@@ -571,6 +571,8 @@ enum x11drv_atoms
XATOM__NET_WM_STATE,
XATOM__NET_WM_STATE_FULLSCREEN,
XATOM__NET_WM_WINDOW_TYPE,
XATOM__NET_WM_WINDOW_TYPE_DIALOG,
XATOM__NET_WM_WINDOW_TYPE_NORMAL,
XATOM__NET_WM_WINDOW_TYPE_UTILITY,
XATOM__XEMBED_INFO,
XATOM_XdndAware,
......
......@@ -134,6 +134,8 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"_NET_WM_STATE",
"_NET_WM_STATE_FULLSCREEN",
"_NET_WM_WINDOW_TYPE",
"_NET_WM_WINDOW_TYPE_DIALOG",
"_NET_WM_WINDOW_TYPE_NORMAL",
"_NET_WM_WINDOW_TYPE_UTILITY",
"_XEMBED_INFO",
"XdndAware",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment