Browse Source

Add X _NET_WM_WINDOW_TYPE flags to plugin windows so they work equally well on tiling window manages and floating WM (#751)

tags/v2.1-alpha1-winvst
diovudau Filipe Coelho <falktx@falktx.com> 7 years ago
parent
commit
7fca77254b
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      source/utils/CarlaPluginUI.cpp

+ 9
- 0
source/utils/CarlaPluginUI.cpp View File

@@ -103,6 +103,15 @@ public:
const Atom _nwi = XInternAtom(fDisplay, "_NET_WM_ICON", False);
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);


if (parentId != 0)
setTransientWinId(parentId);
}


Loading…
Cancel
Save