Timo Aaltonen pushed to branch debian-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]>

- - - - -
e6656d80 by Timo Aaltonen at 2023-09-20T16:08:36+03:00
Merge branch 'upstream-unstable' into debian-unstable

- - - - -
bd9169a3 by Timo Aaltonen at 2023-09-20T16:08:58+03:00
version bump

- - - - -
5a6bf614 by Timo Aaltonen at 2023-09-20T16:12:01+03:00
release to sid

- - - - -


5 changed files:

- Xext/xtest.c
- debian/changelog
- 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);


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+xwayland (2:23.2.1-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Timo Aaltonen <[email protected]>  Wed, 20 Sep 2023 16:09:23 +0300
+
 xwayland (2:23.2.0-1) unstable; urgency=medium
 
   * New upstream release.


=====================================
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/0bad4c5d1a6870e49039ebcdbfc12b9036441bae...5a6bf614e945b9a8786abaf9894327c1baacd21c

-- 
View it on GitLab: 
https://salsa.debian.org/xorg-team/wayland/xwayland/-/compare/0bad4c5d1a6870e49039ebcdbfc12b9036441bae...5a6bf614e945b9a8786abaf9894327c1baacd21c
You're receiving this email because of your account on salsa.debian.org.


Reply via email to