Hi Jules,
If you test the juce demo with compiz enabled you will probably notice that the juce menus appear with lots of disturbing fancy effects – it looks like compiz thinks the menu windows are just regular windows.
in LinuxComponentPeer::removeWindowsDecoration , you have:
[code]long netHints [2];
netHints[0] = XInternAtom (display, “_KDE_NET_WM_WINDOW_TYPE_OVERRIDE”, True);
if ((styleFlags & windowIsTemporary) != 0)
netHints[1] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_MENU", True);
else
netHints[1] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_NORMAL", True);
XChangeProperty (display, wndH, hints, XA_ATOM, 32, PropModeReplace,
(unsigned char*) &netHints, 2);
[/code]
the first atom is NULL on my wm, and it looks like compiz does not take into account the properties that are set after a “null” hint. So it basically ignores the _NET_WM_WINDOW_TYPE_MENU property. Changing to:
[code] long netHints [2];
int nbHints = 0;
netHints[nbHints] = XInternAtom (display, “_KDE_NET_WM_WINDOW_TYPE_OVERRIDE”, True);
if (netHints[nbHints]) ++nbHints;
if ((styleFlags & windowIsTemporary) != 0) {
netHints[nbHints] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_MENU", True);
} else
netHints[nbHints] = XInternAtom (display, "_NET_WM_WINDOW_TYPE_NORMAL", True);
if (netHints[nbHints]) ++nbHints;
XChangeProperty (display, wndH, hints, XA_ATOM, 32, PropModeReplace,
(unsigned char*) &netHints, nbHints);
[/code]
fixes the problem.