Browse Source

Set _NET_WM_WINDOW_TYPE for our X11 windows

pull/72/head
falkTX 5 years ago
parent
commit
40d8865d29
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      dgl/src/Window.cpp

+ 13
- 2
dgl/src/Window.cpp View File

@@ -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);


Loading…
Cancel
Save