diff --git a/source/modules/dgl/src/Window.cpp b/source/modules/dgl/src/Window.cpp index 61d1452bf..c677d1114 100644 --- a/source/modules/dgl/src/Window.cpp +++ b/source/modules/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); diff --git a/source/utils/CarlaPluginUI.cpp b/source/utils/CarlaPluginUI.cpp index 6f3dec519..36d26fdb0 100644 --- a/source/utils/CarlaPluginUI.cpp +++ b/source/utils/CarlaPluginUI.cpp @@ -104,13 +104,14 @@ public: XChangeProperty(fDisplay, fHostWindow, _nwi, XA_CARDINAL, 32, PropModeReplace, (const uchar*)sCarlaX11Icon, sCarlaX11IconSize); const Atom _wt = XInternAtom(fDisplay, "_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 - long _wtd = XInternAtom(fDisplay, "_NET_WM_WINDOW_TYPE_DIALOG", False); - XChangeProperty(fDisplay, fHostWindow, _wt, XA_ATOM, 32, PropModeReplace, (const uchar*) &_wtd, 1); - long _wtn = XInternAtom(fDisplay, "_NET_WM_WINDOW_TYPE_NORMAL", False); - XChangeProperty(fDisplay, fHostWindow, _wt, XA_ATOM, 32, PropModeAppend, (const uchar*) &_wtn, 1); - + const Atom _wts[2] = { + XInternAtom(fDisplay, "_NET_WM_WINDOW_TYPE_DIALOG", False), + XInternAtom(fDisplay, "_NET_WM_WINDOW_TYPE_NORMAL", False) + }; + XChangeProperty(fDisplay, fHostWindow, _wt, XA_ATOM, 32, PropModeReplace, (const uchar*)&_wts, 2); if (parentId != 0) setTransientWinId(parentId);