From 54bd70a741a46c935c0751d7615ce0de626d76df Mon Sep 17 00:00:00 2001 From: Olivier Fourdan <fourdan.olivier@wanadoo.fr> Date: Mon, 10 Dec 2007 22:27:15 +0000 Subject: [PATCH] Set depth/visual in overlay output window (Old svn revision: 26456) --- src/compositor.c | 19 ++++++------------- src/screen.h | 2 -- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index b80096ed4..f79040402 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -928,6 +928,7 @@ win_extents (CWindow *cw) if ((screen_info->params->show_popup_shadow && WIN_IS_OVERRIDE(cw) && + !WIN_IS_FULLSCREEN(cw) && !(WIN_IS_ARGB(cw) || WIN_IS_SHAPED(cw))) || (screen_info->params->show_frame_shadow && !WIN_IS_OVERRIDE(cw) && @@ -2754,8 +2755,6 @@ compositorInitDisplay (DisplayInfo *display_info) #if HAVE_OVERLAYS display_info->have_overlays = ((composite_major > 0) || (composite_minor >= 3)); -#else /* HAVE_OVERLAYS */ - display_info->have_overlays = FALSE; #endif /* HAVE_OVERLAYS */ #else /* HAVE_COMPOSITOR */ @@ -2828,23 +2827,18 @@ compositorManageScreen (ScreenInfo *screen_info) screen_info->overlay = XCompositeGetOverlayWindow (display_info->dpy, screen_info->xroot); if (screen_info->overlay != None) { -#if USE_CHILD_OVERLAY XSetWindowAttributes attributes; - attributes.override_redirect = TRUE; screen_info->root_overlay = XCreateWindow (display_info->dpy, screen_info->overlay, - 0, 0, screen_info->width, screen_info->height, 0, 0, - InputOutput, CopyFromParent, CWOverrideRedirect, &attributes); + 0, 0, screen_info->width, screen_info->height, 0, screen_info->depth, + InputOutput, screen_info->visual, 0, &attributes); XMapWindow (display_info->dpy, screen_info->root_overlay); XRaiseWindow (display_info->dpy, screen_info->overlay); + XShapeCombineRectangles (display_info->dpy, screen_info->overlay, + ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted); XShapeCombineRectangles (display_info->dpy, screen_info->root_overlay, ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted); screen_info->output = screen_info->root_overlay; -#else - screen_info->output = screen_info->overlay; -#endif /* USE_CHILD_OVERLAY */ - XShapeCombineRectangles (display_info->dpy, screen_info->overlay, - ShapeInput, 0, 0, NULL, 0, ShapeSet, Unsorted); TRACE ("Overlay enabled"); } else @@ -2931,10 +2925,9 @@ compositorUnmanageScreen (ScreenInfo *screen_info) #if HAVE_OVERLAYS if (display_info->have_overlays) { -#if USE_CHILD_OVERLAY XDestroyWindow (display_info->dpy, screen_info->root_overlay); screen_info->root_overlay = None; -#endif /* USE_CHILD_OVERLAY */ + XCompositeReleaseOverlayWindow (display_info->dpy, screen_info->overlay); screen_info->overlay = None; } diff --git a/src/screen.h b/src/screen.h index 41e51185f..11c7c2c99 100644 --- a/src/screen.h +++ b/src/screen.h @@ -136,9 +136,7 @@ struct _ScreenInfo #ifdef HAVE_COMPOSITOR #if HAVE_OVERLAYS Window overlay; -#if USE_CHILD_OVERLAY Window root_overlay; -#endif /* USE_CHILD_OVERLAY */ #endif GList *cwindows; Window output; -- GitLab