Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / wayland / xwayland
Commits: 2ab53d5c by Olivier Fourdan at 2023-09-19T11:14:59+02:00 xtest: Check whether there is a sendEventsProc to call If a client tries to send XTEST events while there is no sendEventsProc defined for the given device, Xwayland would call into 0x0 and crash. Make sure the handler is defined before trying to use it, to avoid the crash. Signed-off-by: Olivier Fourdan <[email protected]> Reviewed-by: Peter Hutterer <[email protected]> Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1574 (cherry picked from commit e820030de2da3d0064f36504ccad53302e0f718d) - - - - - ad46baaa by Michel Dänzer at 2023-09-19T11:15:13+02:00 glamor: Ignore destination alpha as necessary for composite operation If the destination drawable is a window with effective depth 24 backed by a depth 32 pixmap. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1575 (cherry picked from commit d1f142891ef346e90c36a7393009ffaac2aa8b38) - - - - - ada62bf8 by Olivier Fourdan at 2023-09-20T10:10:03+02:00 Bump version to 23.2.1 Signed-off-by: Olivier Fourdan <[email protected]> - - - - - 4 changed files: - Xext/xtest.c - glamor/glamor_priv.h - glamor/glamor_render.c - meson.build Changes: ===================================== Xext/xtest.c ===================================== @@ -437,7 +437,8 @@ ProcXTestFakeInput(ClientPtr client) valuator_mask_set_range(&mask, firstValuator, numValuators, valuators); - (*dev->sendEventsProc) (dev, type, ev->u.u.detail, flags, &mask); + if (dev->sendEventsProc) + (*dev->sendEventsProc) (dev, type, ev->u.u.detail, flags, &mask); if (need_ptr_update) miPointerUpdateSprite(dev); ===================================== glamor/glamor_priv.h ===================================== @@ -111,6 +111,7 @@ enum shader_mask { enum shader_dest_swizzle { SHADER_DEST_SWIZZLE_DEFAULT, SHADER_DEST_SWIZZLE_ALPHA_TO_RED, + SHADER_DEST_SWIZZLE_IGNORE_ALPHA, SHADER_DEST_SWIZZLE_COUNT, }; ===================================== glamor/glamor_render.c ===================================== @@ -197,6 +197,11 @@ glamor_create_composite_fs(glamor_screen_private *glamor_priv, struct shader_key " float undef;\n" " return vec4(color.a, undef, undef, undef);" "}"; + const char *dest_swizzle_ignore_alpha = + "vec4 dest_swizzle(vec4 color)\n" + "{" + " return vec4(color.xyz, 1.0);" + "}"; const char *in_normal = "void main()\n" @@ -286,6 +291,9 @@ glamor_create_composite_fs(glamor_screen_private *glamor_priv, struct shader_key case SHADER_DEST_SWIZZLE_ALPHA_TO_RED: dest_swizzle = dest_swizzle_alpha_to_red; break; + case SHADER_DEST_SWIZZLE_IGNORE_ALPHA: + dest_swizzle = dest_swizzle_ignore_alpha; + break; default: FatalError("Bad composite shader dest swizzle"); } @@ -938,7 +946,11 @@ glamor_composite_choose_shader(CARD8 op, glamor_priv->formats[8].format == GL_RED) { key.dest_swizzle = SHADER_DEST_SWIZZLE_ALPHA_TO_RED; } else { - key.dest_swizzle = SHADER_DEST_SWIZZLE_DEFAULT; + if (dest_pixmap->drawable.depth == 32 && + glamor_drawable_effective_depth(dest->pDrawable) == 24) + key.dest_swizzle = SHADER_DEST_SWIZZLE_IGNORE_ALPHA; + else + key.dest_swizzle = SHADER_DEST_SWIZZLE_DEFAULT; } if (source && source->alphaMap) { ===================================== meson.build ===================================== @@ -3,10 +3,10 @@ project('xwayland', 'c', 'buildtype=debugoptimized', 'c_std=gnu99', ], - version: '23.2.0', + version: '23.2.1', meson_version: '>= 0.52.0', ) -release_date = '2023-08-16' +release_date = '2023-09-20' add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc']) cc = meson.get_compiler('c') View it on GitLab: https://salsa.debian.org/xorg-team/wayland/xwayland/-/compare/9143d93e4e3163dc1b12f02134cb914bdaad8fc4...ada62bf828289885a1a731a93aab54a76c81f54c -- View it on GitLab: https://salsa.debian.org/xorg-team/wayland/xwayland/-/compare/9143d93e4e3163dc1b12f02134cb914bdaad8fc4...ada62bf828289885a1a731a93aab54a76c81f54c You're receiving this email because of your account on salsa.debian.org.

