diff options
author | falkTX <falktx@gmail.com> | 2018-09-22 22:25:30 +0200 |
---|---|---|
committer | falkTX <falktx@gmail.com> | 2018-09-22 22:25:30 +0200 |
commit | 40d8865d290ae27fdc1491642246ceab25fb7acb (patch) | |
tree | 4ba16ca82cbb53b2fb018bbeabbafd8cd191ebc4 /dgl/src | |
parent | 03a3afd4e8880fd420e8a6a55bd9ec0f8ece0e6f (diff) |
Set _NET_WM_WINDOW_TYPE for our X11 windows
Diffstat (limited to 'dgl/src')
-rw-r--r-- | dgl/src/Window.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp index 61d1452b..c677d111 100644 --- a/dgl/src/Window.cpp +++ b/dgl/src/Window.cpp @@ -241,9 +241,20 @@ struct Window::PrivateData { if (! fUsingEmbed) { - pid_t pid = getpid(); - Atom _nwp = XInternAtom(xDisplay, "_NET_WM_PID", True); + const pid_t pid = getpid(); + const Atom _nwp = XInternAtom(xDisplay, "_NET_WM_PID", False); XChangeProperty(xDisplay, xWindow, _nwp, XA_CARDINAL, 32, PropModeReplace, (const uchar*)&pid, 1); + + const Atom _wt = XInternAtom(xDisplay, "_NET_WM_WINDOW_TYPE", False); + + // Setting the window to both dialog and normal will produce a decorated floating dialog + // Order is important: DIALOG needs to come before NORMAL + const Atom _wts[2] = { + XInternAtom(xDisplay, "_NET_WM_WINDOW_TYPE_DIALOG", False), + XInternAtom(xDisplay, "_NET_WM_WINDOW_TYPE_NORMAL", False) + }; + XChangeProperty(xDisplay, xWindow, _wt, XA_ATOM, 32, PropModeReplace, (const uchar*)&_wts, 2); + } #endif puglEnterContext(fView); |