From cfcabaefc29e65d7d955585fbd26bcfb42e4c080 Mon Sep 17 00:00:00 2001 From: David Sundstrom Date: Tue, 15 May 2012 10:21:01 -0500 Subject: [PATCH] Do not use override redirect - causes windows to appear on all desktops Enable non-rectangular windows and test with windows media player --- client/X11/xf_window.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c index 5f914c87a..2a3a0e1ce 100644 --- a/client/X11/xf_window.c +++ b/client/X11/xf_window.c @@ -230,15 +230,6 @@ void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_st if ((ex_style & WS_EX_TOPMOST) || (ex_style & WS_EX_TOOLWINDOW)) { - /* - * These include tool tips, dropdown menus, etc. These won't work - * correctly if the local window manager resizes or moves them. - * Set override redirect to prevent this from occurring. - */ - - XSetWindowAttributes attrs; - attrs.override_redirect = True; - XChangeWindowAttributes(xfi->display, window->handle, CWOverrideRedirect, &attrs); window->is_transient = true; xf_SetWindowUnlisted(xfi, window); @@ -666,6 +657,9 @@ void xf_SetWindowRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int n int i; XRectangle* xrects; + if (nrects == 0) + return; + xrects = xmalloc(sizeof(XRectangle) * nrects); for (i = 0; i < nrects; i++) @@ -688,6 +682,9 @@ void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* re int i; XRectangle* xrects; + if (nrects == 0) + return; + xrects = xmalloc(sizeof(XRectangle) * nrects); for (i = 0; i < nrects; i++) @@ -699,7 +696,7 @@ void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* re } #ifdef WITH_XEXT - //XShapeCombineRectangles(xfi->display, window->handle, ShapeBounding, 0, 0, xrects, nrects, ShapeSet, 0); + XShapeCombineRectangles(xfi->display, window->handle, ShapeBounding, 0, 0, xrects, nrects, ShapeSet, 0); #endif xfree(xrects);