mutter/src
Jonas Ådahl 4ff54997b6 cursor-renderer/native: Create all view objects before realizing
Realizing a cursor will assume view related state objects are valid so
they can mark them as dirty. This assumption broke when there were a
scale changed that happened with multiple CRTCs, as we'd create view
object by view object as we realized the texture. Realizing the texture
would trigger a signal that had the handler assuming the validity of all
view objects, but if we only had gotten to the first, the second view
would not be there yet, thus we'd be doing a NULL pointer dereference.

Creating the view objects first, then handling the updating avoids this
problem by making the already done assumption valid on hotplugs.

The test case added tests exactly this series of events, and uses a
virtual monitor as a cheap trick to make the KMS CRTC based view the
first one, and an arbitrary view the second that previously had its view
object initialized too late.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3012
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3262>
2023-09-13 10:38:06 +00:00
..
backends cursor-renderer/native: Create all view objects before realizing 2023-09-13 10:38:06 +00:00
common Update license access method 2023-08-30 08:48:23 +02:00
compositor compositor: Fix surface accounting at MetaWindowActor 2023-09-06 18:13:00 +02:00
core window: Mark the suspend-state property with (skip) 2023-09-12 10:46:58 +00:00
frames cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00
meta monitor-manager: Add 'reason' argument to 'power-save-changed' signal 2023-09-02 11:07:38 +00:00
tests cursor-renderer/native: Create all view objects before realizing 2023-09-13 10:38:06 +00:00
wayland wayland/pointer: Update cursor surface when current surface changes 2023-09-13 10:38:06 +00:00
x11 x11: Avoid poking MetaCompositor during MetaDisplay destruction 2023-09-06 09:28:09 +00:00
meson.build eis: Add "viewport" interface 2023-09-01 10:43:26 +00:00
meta-private-enum-types.c.in build: Add missing include 2022-08-10 20:28:40 +02:00
meta-private-enum-types.h.in cleanup: Switch to pragma once 2023-08-07 22:24:36 +00:00