diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2015-04-01 14:52:31 -0700 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2015-04-01 15:02:20 -0700 |
commit | f3fecd478d5693a6381a3ab7912173c2bca85dbb (patch) | |
tree | b7b4612fa531dff73180c57a17707f956ef73509 | |
parent | a5d1f67c34511cb89241d807df51db66557cb0ef (diff) |
frame: Always use the client window's visual for our frame
Since the frame is the window that's redirected, there's no reason for
it to match the root window. There *is*, however, a big incentive to
match the window's visual, since not doing so might trigger automatic
redirection.
On a specific platform, we construct a depth-32 root window, and stick a
depth-24 child window inside it. The frame ends up being created
depth-32, not depth-24, so we get automatic redirection.
-rw-r--r-- | src/core/frame.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/core/frame.c b/src/core/frame.c index 0ab30e4e..9335fb62 100644 --- a/src/core/frame.c +++ b/src/core/frame.c @@ -37,7 +37,6 @@ meta_window_ensure_frame (MetaWindow *window) { MetaFrame *frame; XSetWindowAttributes attrs; - Visual *visual; gulong create_serial; if (window->frame) @@ -58,37 +57,14 @@ meta_window_ensure_frame (MetaWindow *window) frame->is_flashing = FALSE; frame->borders_cached = FALSE; - meta_verbose ("Framing window %s: visual %s default, depth %d default depth %d\n", - window->desc, - XVisualIDFromVisual (window->xvisual) == - XVisualIDFromVisual (window->screen->default_xvisual) ? - "is" : "is not", - window->depth, window->screen->default_depth); meta_verbose ("Frame geometry %d,%d %dx%d\n", frame->rect.x, frame->rect.y, frame->rect.width, frame->rect.height); - /* Default depth/visual handles clients with weird visuals; they can - * always be children of the root depth/visual obviously, but - * e.g. DRI games can't be children of a parent that has the same - * visual as the client. NULL means default visual. - * - * We look for an ARGB visual if we can find one, otherwise use - * the default of NULL. - */ - - /* Special case for depth 32 windows (assumed to be ARGB), - * we use the window's visual. Otherwise we just use the system visual. - */ - if (window->depth == 32) - visual = window->xvisual; - else - visual = NULL; - frame->ui_frame = meta_ui_create_frame (window->screen->ui, window->display->xdisplay, frame->window, - visual, + window->xvisual, frame->rect.x, frame->rect.y, frame->rect.width, |