mirror of
https://github.com/reactos/wine.git
synced 2025-01-27 06:53:49 +00:00
winex11.drv: Always set window type.
This commit is contained in:
parent
7e9e599d1e
commit
1a1b902e7f
@ -465,6 +465,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
|
|||||||
XClassHint *class_hints;
|
XClassHint *class_hints;
|
||||||
XWMHints* wm_hints;
|
XWMHints* wm_hints;
|
||||||
Atom protocols[3];
|
Atom protocols[3];
|
||||||
|
Atom window_type;
|
||||||
MwmHints mwm_hints;
|
MwmHints mwm_hints;
|
||||||
Atom dndVersion = 4;
|
Atom dndVersion = 4;
|
||||||
int i;
|
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),
|
XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_PID),
|
||||||
XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&i, 1);
|
XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&i, 1);
|
||||||
|
|
||||||
/* map WS_EX_TOOLWINDOW to _NET_WM_WINDOW_TYPE_UTILITY */
|
/* set the WM_WINDOW_TYPE */
|
||||||
if (ex_style & WS_EX_TOOLWINDOW)
|
window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL);
|
||||||
{
|
if (ex_style & WS_EX_TOOLWINDOW) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY);
|
||||||
Atom a = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY);
|
else if (style & WS_THICKFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL);
|
||||||
XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE),
|
else if (style & WS_DLGFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG);
|
||||||
XA_ATOM, 32, PropModeReplace, (unsigned char*)&a, 1);
|
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.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
|
||||||
mwm_hints.functions = MWM_FUNC_MOVE;
|
mwm_hints.functions = MWM_FUNC_MOVE;
|
||||||
|
@ -571,6 +571,8 @@ enum x11drv_atoms
|
|||||||
XATOM__NET_WM_STATE,
|
XATOM__NET_WM_STATE,
|
||||||
XATOM__NET_WM_STATE_FULLSCREEN,
|
XATOM__NET_WM_STATE_FULLSCREEN,
|
||||||
XATOM__NET_WM_WINDOW_TYPE,
|
XATOM__NET_WM_WINDOW_TYPE,
|
||||||
|
XATOM__NET_WM_WINDOW_TYPE_DIALOG,
|
||||||
|
XATOM__NET_WM_WINDOW_TYPE_NORMAL,
|
||||||
XATOM__NET_WM_WINDOW_TYPE_UTILITY,
|
XATOM__NET_WM_WINDOW_TYPE_UTILITY,
|
||||||
XATOM__XEMBED_INFO,
|
XATOM__XEMBED_INFO,
|
||||||
XATOM_XdndAware,
|
XATOM_XdndAware,
|
||||||
|
@ -134,6 +134,8 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
|
|||||||
"_NET_WM_STATE",
|
"_NET_WM_STATE",
|
||||||
"_NET_WM_STATE_FULLSCREEN",
|
"_NET_WM_STATE_FULLSCREEN",
|
||||||
"_NET_WM_WINDOW_TYPE",
|
"_NET_WM_WINDOW_TYPE",
|
||||||
|
"_NET_WM_WINDOW_TYPE_DIALOG",
|
||||||
|
"_NET_WM_WINDOW_TYPE_NORMAL",
|
||||||
"_NET_WM_WINDOW_TYPE_UTILITY",
|
"_NET_WM_WINDOW_TYPE_UTILITY",
|
||||||
"_XEMBED_INFO",
|
"_XEMBED_INFO",
|
||||||
"XdndAware",
|
"XdndAware",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user