mutter/src
Jonas Ådahl c41657bc4f wayland/activation: Remove token from hash table on timeout
When an activation times out, we'll be signalled two signals on the
startup sequence object: "timeout", and "complete".

Normally, the "complete" signal is emitted when a startup sequence is
completed succesfully by it being used for activation, and in this case,
the xdg_activation implementation should remove the sequence from the
startup notification machinery.

However, in the timeout case, we should not remove it, as the startup
notification machinery itself will deal with this. If we would, we'd end
up with use-after-free issues, as the sequence would be finalized when
removed the first time.

To avoid this, just clean up the Wayland side in the "timeout" signal
handler, leaving the "complete" signal handler early out if it was
already handled by it.

This avoids crashes like:

  0) g_type_check_instance (type_instance=type_instance@entry=0xdd6740)
  1) g_signal_handlers_disconnect_matched (instance=0xdd6740, ...)
  2) meta_startup_notification_remove_sequence (sn=0x4cc890,
                                                seq=0xdd6740) at
       ../src/core/startup-notification.c:544
  3) startup_sequence_timeout (data=0x4cc890, ...) at
       ../src/core/startup-notification.c:504
  4) g_timeout_dispatch (...) at ../glib/gmain.c:4933

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2081>
2021-11-24 15:20:59 +01:00
..
backends kms/impl-device: Report 'full' change if we removed connectors 2021-11-18 17:55:22 +01:00
compositor plugins/default: Add env var to disable animations 2021-11-06 14:25:40 +00:00
core startup-notification: Fix naming of handle ID 2021-11-24 15:20:59 +01:00
meta util: Remove unused logging functions 2021-11-21 20:53:33 +00:00
tests tests: Add test for maintaining constraints after client resizes 2021-11-23 00:51:01 +00:00
ui frames: Keep accounting of double clicks in place 2021-10-29 00:27:18 +02:00
wayland wayland/activation: Remove token from hash table on timeout 2021-11-24 15:20:59 +01:00
x11 x11: Initialize struct early 2021-10-27 14:12:35 +02:00
libmutter.pc.in build: Fix libs and cflags in autotools .pc file 2018-11-10 16:20:46 +00:00
meson.build backends/native: Use rtkit to get realtime priority 2021-10-22 08:35:15 +00:00
meta-private-enum-types.c.in core: Drop "volatile" from static GTypes in manual registration 2021-03-22 10:47:51 +00:00
meta-private-enum-types.h.in screen-cast: Add screen cast flag to streams 2020-07-30 09:51:16 +02:00
org.freedesktop.login1.xml
org.freedesktop.RealtimeKit1.xml backends/native: Use rtkit to get realtime priority 2021-10-22 08:35:15 +00:00
org.gnome.Mutter.DisplayConfig.xml x11: Support the CTM (color transform matrix) RandR property 2021-01-11 13:44:54 +00:00
org.gnome.Mutter.IdleMonitor.xml idle-monitor: Add ResetIdletime API, for testing purposes 2018-04-16 13:28:03 +02:00
org.gnome.Mutter.RemoteDesktop.xml remote-desktop/session: Add CapsLockState and NumLockState properties 2021-03-04 17:39:08 +00:00
org.gnome.Mutter.ScreenCast.xml screen-cast/session: Introduce RecordVirtual D-Bus API 2021-03-12 15:09:45 +00:00