diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-06-06 12:00:30 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-06-06 12:00:36 +0100 |
commit | 56906cbece486701c7d5c4fcc55a6649885de685 (patch) | |
tree | 13da43e9d1381a8c3a76c46f4b2f85882ef457ce /src/libxcwm/context.c | |
parent | 1a4661f41ad603ec39da1cc0ebce3f6e06564284 (diff) |
Make sure SHM pixmap always gets alpha channellibxcwm-20140606work
Promote the depth with which the SHM pixmap image will be requested from 24-bit
to 32-bit to ensure it has an alpha channel (otherwise it seems that the alpha
channel can be lost on a 64-bit host)
Diffstat (limited to 'src/libxcwm/context.c')
-rw-r--r-- | src/libxcwm/context.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libxcwm/context.c b/src/libxcwm/context.c index f982557..d63c223 100644 --- a/src/libxcwm/context.c +++ b/src/libxcwm/context.c @@ -122,6 +122,11 @@ xcwm_context_open(char *display, xcwm_context_flags_t flags) if (!(flags & XCWM_DISABLE_SHM)) { context->has_shm = (_xcwm_init_extension(conn, "MIT-SHM") != NULL); context->depth = xcb_aux_get_depth(conn, root_screen); + + /* Promote 24-bit root window to 32-bit, as we want alpha as well */ + if (context->depth == 24) { + context->depth = 32; + } } _xcwm_atoms_init(context); |