mutter/src/backends
Jonas Ådahl d31b781efb monitor-manager: Restore old config in idle callback when unconfirmed
We might get told to restore the old monitor configuration by the
monitor configuration prompt, in case the user pressed "revert" or
equivalent. This might be in response to a button press, and those
happen during frame clock dispatch. If we would restore an old
configuration during dispatch, it means we would reconfigure the
monitors including their stage views while dispatching, which means we'd
destroy the frame clock while it's dispatching.

Doing that causes problems, as the frame clock isn't expecting to be
destroyed mid-function. Specifically,

We'd enter

  clutter_frame_clock_dispatch (clutter-frame-clock.c:811)
  frame_clock_source_dispatch (clutter-frame-clock.c:839)
  g_main_dispatch (gmain.c:3454)
  g_main_context_dispatch (gmain.c:4172)
  g_main_context_iterate.constprop.0 (gmain.c:4248)
  g_main_loop_run (gmain.c:4448)
  meta_context_run_main_loop (meta-context.c:482)
  main (main.c:663)

which would first call

  _clutter_process_event (clutter-main.c:920)
  _clutter_stage_process_queued_events (clutter-stage.c:757)
  handle_frame_clock_before_frame (clutter-stage-view.c:1150)

which would emit e.g. a button event all the way to a button press
handler, which would e.g. deny the new configuration:

  restore_previous_config (meta-monitor-manager.c:1931)
  confirm_configuration (meta-monitor-manager.c:2866)
  meta_monitor_manager_confirm_configuration (meta-monitor-manager.c:2880)
  meta_plugin_complete_display_change (meta-plugin.c:172)

That would then regenerate the monitor configuration and stage view
layout, which would destroy the old stage view and frame clock.

  meta_stage_native_rebuild_views (meta-stage-native.c:68)
  meta_backend_native_update_screen_size (meta-backend-native.c:457)
  meta_backend_sync_screen_size (meta-backend.c:266)
  meta_backend_monitors_changed (meta-backend.c:337)
  meta_monitor_manager_notify_monitors_changed (meta-monitor-manager.c:3595)
  meta_monitor_manager_rebuild (meta-monitor-manager.c:3683)
  meta_monitor_manager_native_apply_monitors_config (meta-monitor-manager-native.c:343)
  meta_monitor_manager_apply_monitors_config (meta-monitor-manager.c:704)

After returning back to the original clutter_frame_clock_dispatch()
frame, various state in the frame clock will be gone and we'd crash.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2901>
2023-03-18 13:52:10 +00:00
..
native backends/native: Convert MetaOutputColorspace to DRM Colorspace 2023-03-04 19:53:30 +00:00
x11 cogl: Remove legacy OpenGL driver support 2023-02-21 18:09:28 +00:00
edid-parse.c edid: Remove all unnecessary EDID parameters parsing 2023-02-16 08:42:37 +00:00
edid.h edid: Fix MetaEdidStaticMetadataType bitmask 2023-03-04 09:30:41 +00:00
gsm-inhibitor-flag.h idle-monitor: Take idle inhibition into account 2018-04-16 13:28:03 +02:00
meta-backend-private.h backends: Add generic D-Bus session manager helper class 2023-02-23 17:52:08 +00:00
meta-backend-types.h backends: Add generic D-Bus session manager helper class 2023-02-23 17:52:08 +00:00
meta-backend.c backend: Always include D-Bus session watcher header 2023-02-28 09:50:57 +00:00
meta-barrier-private.h barrier: Modernize type implementation 2022-07-26 20:27:24 +00:00
meta-barrier.c barrier: Make type derivable again 2022-09-15 12:27:52 +00:00
meta-color-device.c color-device: Don't close lcms profile on error from cd_icc_load_handle 2023-03-03 12:07:02 +00:00
meta-color-device.h color-device: Add API to set test efivar path 2022-09-01 21:09:28 +00:00
meta-color-manager-private.h tests: Add duplicate color profile test case 2022-09-15 11:22:54 +00:00
meta-color-manager.c Use the same prefix for all generated D-Bus boiler plate 2023-01-28 12:35:54 +01:00
meta-color-manager.h x11: Add X11 color manager subclass 2022-09-01 19:09:21 +02:00
meta-color-profile.c color: Handle profiles not initializing succesfully 2022-09-15 11:22:54 +00:00
meta-color-profile.h color-device: Pass calibration state separately when creating profile 2022-09-01 21:09:28 +00:00
meta-color-store.c color-store: Forward cancelled error if connect failed 2023-01-30 13:17:19 +00:00
meta-color-store.h tests: Add duplicate color profile test case 2022-09-15 11:22:54 +00:00
meta-crtc-mode.c crtc-kms: Make KMS CRTC mode a type inheriting MetaCrtcMode 2020-06-11 09:20:16 +00:00
meta-crtc-mode.h output/kms: Replace common mode bandwidth check with clock check 2022-07-01 16:13:18 +02:00
meta-crtc.c backends/native: Handle gamma sizes independent of the KMS LUT 2023-02-23 17:20:36 +00:00
meta-crtc.h kms/update: Add API to merge two updates 2023-03-01 23:57:32 +00:00
meta-cursor-renderer.c clutter: Pass 'ClutterFrame' in all stage update signals 2023-01-23 15:57:50 +01:00
meta-cursor-renderer.h backend: Set up and use ownership chains 2022-12-17 13:52:51 +00:00
meta-cursor-sprite-xcursor.c cursor-sprite: Register all cursor sprites with the cursor tracker 2021-12-22 16:22:08 +00:00
meta-cursor-sprite-xcursor.h cursor-sprite: Register all cursor sprites with the cursor tracker 2021-12-22 16:22:08 +00:00
meta-cursor-tracker-private.h cursor-sprite: Register all cursor sprites with the cursor tracker 2021-12-22 16:22:08 +00:00
meta-cursor-tracker.c backend: Set up and use ownership chains 2022-12-17 13:52:51 +00:00
meta-cursor.c cursor: Hold reference to cursor tracker 2021-12-22 19:37:16 +01:00
meta-cursor.h backends: Replace MetaCursorSprite::prepare-at with in-place function 2021-12-07 20:04:08 +00:00
meta-dbus-session-manager.c dbus-session: Make some properties part of the interface 2023-02-23 17:52:08 +00:00
meta-dbus-session-manager.h backends: Add generic D-Bus session manager helper class 2023-02-23 17:52:08 +00:00
meta-dbus-session-watcher.c dbus-session: Make some properties part of the interface 2023-02-23 17:52:08 +00:00
meta-dbus-session-watcher.h dbus-session: Make some properties part of the interface 2023-02-23 17:52:08 +00:00
meta-display-config-shared.h Use a consistent style for enum braces 2019-02-28 09:31:01 +01:00
meta-dnd-private.h dnd: Notify about events during compositor grab from event filter 2022-03-02 15:12:23 +00:00
meta-egl-ext.h EGL: Include EGL/eglmesaext.h 2019-10-21 14:04:30 +00:00
meta-egl.c egl: Fix number of configs returned in meta_egl_choose_all_configs 2022-03-03 08:18:56 +00:00
meta-egl.h egl: Add eglQueryDisplayAttribEXT() helper 2022-01-05 16:36:48 +00:00
meta-gles3-table.h backends: Add OpenGL ES 3 abstraction layer 2017-10-05 18:17:26 -04:00
meta-gles3.c gles3: Ensure missing_extensions is always populated 2023-01-18 10:14:39 +00:00
meta-gles3.h Fix const qualifier usage 2019-01-22 18:31:53 +01:00
meta-gpu.c output: Move output info to MetaOutputInfo struct 2020-06-10 18:54:50 +00:00
meta-gpu.h backend: Move GPU ownership from the monitor manager to the backend 2019-06-20 13:31:55 +00:00
meta-idle-manager.c backend: Set up and use ownership chains 2022-12-17 13:52:51 +00:00
meta-idle-manager.h backends: Introduce MetaIdleManager 2021-05-18 13:19:36 +00:00
meta-idle-monitor-private.h backends: Introduce MetaIdleManager 2021-05-18 13:19:36 +00:00
meta-idle-monitor.c Name unnamed sources 2022-03-04 10:10:05 +03:00
meta-input-device-private.h backend: Set up and use ownership chains 2022-12-17 13:52:51 +00:00
meta-input-device.c backend: Set up and use ownership chains 2022-12-17 13:52:51 +00:00
meta-input-mapper-private.h backend: Set up and use ownership chains 2022-12-17 13:52:51 +00:00
meta-input-mapper.c backend: Set up and use ownership chains 2022-12-17 13:52:51 +00:00
meta-input-settings-dummy.c Support selecting an acceleration profile for touchpad devices 2023-02-01 03:03:47 +00:00
meta-input-settings-dummy.h backends/x11: Add dummy input-settings implementation 2021-03-10 13:56:54 +00:00
meta-input-settings-private.h Support selecting an acceleration profile for touchpad devices 2023-02-01 03:03:47 +00:00
meta-input-settings.c Support selecting an acceleration profile for touchpad devices 2023-02-01 03:03:47 +00:00
meta-keymap-utils.c *: Fix spelling mistakes found by codespell 2020-08-29 09:10:31 +00:00
meta-keymap-utils.h compositor: use XDG_CONFIG_HOME as initial lookup path for xkb 2020-06-08 11:29:30 +00:00
meta-logical-monitor.c crtc: Move MetaCrtcConfig field to instance private 2020-06-10 18:54:50 +00:00
meta-logical-monitor.h *: Fix spelling mistakes found by codespell 2020-08-29 09:10:31 +00:00
meta-monitor-config-manager.c monitor-config-manager: Add a max_bpc field to MetaMonitorConfig 2022-08-19 17:07:12 +00:00
meta-monitor-config-manager.h monitor-config-manager: Add a max_bpc field to MetaMonitorConfig 2022-08-19 17:07:12 +00:00
meta-monitor-config-migration.c monitor-manager: Pass the Logical mode when computing the monitor scale 2021-07-22 13:14:01 +02:00
meta-monitor-config-migration.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-monitor-config-store.c monitor-config-store: Format <rate> using the C locale (. decimal point) 2022-09-02 08:43:00 +00:00
meta-monitor-config-store.h monitor-config-store: Allow changing D-Bus configuration policy 2022-01-25 16:25:48 +00:00
meta-monitor-manager-dummy.c backend: Set up and use ownership chains 2022-12-17 13:52:51 +00:00
meta-monitor-manager-dummy.h crtc: Make implementations inherit MetaCrtc 2020-06-10 18:54:51 +00:00
meta-monitor-manager-private.h monitor-manager: Restore old config in idle callback when unconfirmed 2023-03-18 13:52:10 +00:00
meta-monitor-manager.c monitor-manager: Restore old config in idle callback when unconfirmed 2023-03-18 13:52:10 +00:00
meta-monitor-transform.c monitor-transform: Add helper to transform matrices 2022-08-05 20:30:50 +02:00
meta-monitor-transform.h monitor-transform: Add helper to transform matrices 2022-08-05 20:30:50 +02:00
meta-monitor.c output: Check the EDID for HDR Static Metadata support 2023-03-04 09:30:41 +00:00
meta-monitor.h monitor-manager: Make color space and HDR metadata accessible from lg 2023-03-04 09:30:41 +00:00
meta-orientation-manager.c backends: Don't leak GSettingsSchema 2023-02-01 13:16:29 +00:00
meta-orientation-manager.h tests: Add MetaOrientationManager tests via SensorsProxy mock 2021-09-04 10:04:00 +02:00
meta-output.c output: Check the EDID for HDR Static Metadata support 2023-03-04 09:30:41 +00:00
meta-output.h output: Check the EDID for HDR Static Metadata support 2023-03-04 09:30:41 +00:00
meta-pointer-constraint.c pointer-constraints: Move min edge distance from backend to Wayland 2022-06-13 18:38:50 +00:00
meta-pointer-constraint.h pointer-constraints: Move min edge distance from backend to Wayland 2022-06-13 18:38:50 +00:00
meta-remote-access-controller-private.h Port screen cast and remote desktop to MetaDbusSessionManager 2023-02-23 17:52:08 +00:00
meta-remote-access-controller.c Port screen cast and remote desktop to MetaDbusSessionManager 2023-02-23 17:52:08 +00:00
meta-remote-desktop-session.c dbus-session: Make some properties part of the interface 2023-02-23 17:52:08 +00:00
meta-remote-desktop-session.h Port screen cast and remote desktop to MetaDbusSessionManager 2023-02-23 17:52:08 +00:00
meta-remote-desktop.c Port screen cast and remote desktop to MetaDbusSessionManager 2023-02-23 17:52:08 +00:00
meta-remote-desktop.h Port screen cast and remote desktop to MetaDbusSessionManager 2023-02-23 17:52:08 +00:00
meta-renderer-view.c backends/native: Introduce MetaRendererViewNative 2023-03-02 01:39:16 +01:00
meta-renderer-view.h backends/native: Introduce MetaRendererViewNative 2023-03-02 01:39:16 +01:00
meta-renderer.c onscreen/native: Track GAMMA_LUT invalidations here 2023-02-01 08:40:53 +01:00
meta-renderer.h onscreen/native: Track GAMMA_LUT invalidations here 2023-02-01 08:40:53 +01:00
meta-screen-cast-area-stream-src.c Port screen cast and remote desktop to MetaDbusSessionManager 2023-02-23 17:52:08 +00:00
meta-screen-cast-area-stream-src.h screen-cast: Add RecordArea for screen cast arbitrary area 2020-04-23 14:45:53 +00:00
meta-screen-cast-area-stream.c remote-desktop/session: Handle unable to transform coordinate gracefully 2021-03-12 15:09:45 +00:00
meta-screen-cast-area-stream.h screen-cast: Add screen cast flag to streams 2020-07-30 09:51:16 +02:00
meta-screen-cast-monitor-stream-src.c clutter: Pass 'ClutterFrame' in all stage update signals 2023-01-23 15:57:50 +01:00
meta-screen-cast-monitor-stream-src.h ScreenCast: Pass PipeWire stream node ID directly 2017-08-29 14:39:04 +08:00
meta-screen-cast-monitor-stream.c backend: Get 'is-stage-views-scaled' from backend 2022-12-17 13:52:51 +00:00
meta-screen-cast-monitor-stream.h screen-cast: Add screen cast flag to streams 2020-07-30 09:51:16 +02:00
meta-screen-cast-session.c dbus-session: Make some properties part of the interface 2023-02-23 17:52:08 +00:00
meta-screen-cast-session.h Port screen cast and remote desktop to MetaDbusSessionManager 2023-02-23 17:52:08 +00:00
meta-screen-cast-stream-src.c screen-cast/src: Do not close streams on error 2023-02-20 10:14:59 +00:00
meta-screen-cast-stream-src.h screencast: Implement buffer-transform support 2022-08-05 20:30:50 +02:00
meta-screen-cast-stream.c ScreenCast: Allow recording new streams on active sessions 2021-12-07 19:23:52 +00:00
meta-screen-cast-stream.h remote-desktop/session: Handle unable to transform coordinate gracefully 2021-03-12 15:09:45 +00:00
meta-screen-cast-virtual-stream-src.c clutter: Pass 'ClutterFrame' in all stage update signals 2023-01-23 15:57:50 +01:00
meta-screen-cast-virtual-stream-src.h screen-cast/session: Introduce RecordVirtual D-Bus API 2021-03-12 15:09:45 +00:00
meta-screen-cast-virtual-stream.c remote-desktop/virtual: Drop absolute events if not active 2022-03-04 18:13:45 +00:00
meta-screen-cast-virtual-stream.h screen-cast/session: Introduce RecordVirtual D-Bus API 2021-03-12 15:09:45 +00:00
meta-screen-cast-window-stream-src.c screen-cast/window/src: Fix on_prepare_frame signature 2023-01-31 02:22:49 +01:00
meta-screen-cast-window-stream-src.h screen-cast-session: Add screen-cast window mode 2018-12-14 13:26:16 +01:00
meta-screen-cast-window-stream.c screen-cast/window: Add API to check if stream-cast is active 2023-02-28 12:01:17 +01:00
meta-screen-cast-window-stream.h screen-cast: Add screen cast flag to streams 2020-07-30 09:51:16 +02:00
meta-screen-cast-window.c screen-cast/window: Add API to check if stream-cast is active 2023-02-28 12:01:17 +01:00
meta-screen-cast-window.h screen-cast/window: Add API to check if stream-cast is active 2023-02-28 12:01:17 +01:00
meta-screen-cast.c Port screen cast and remote desktop to MetaDbusSessionManager 2023-02-23 17:52:08 +00:00
meta-screen-cast.h Port screen cast and remote desktop to MetaDbusSessionManager 2023-02-23 17:52:08 +00:00
meta-settings-private.h settings: Add Xwayland byte-swapped clients 2023-01-17 11:14:19 +01:00
meta-settings.c settings: Fix spelling of endianness 2023-01-29 17:37:43 +01:00
meta-stage-impl-private.h stage-impl: Change the backend pointer to MetaBackend 2022-01-17 09:48:51 +01:00
meta-stage-impl.c stage-impl: Transform damage region before queuing 2023-02-20 10:43:31 +00:00
meta-stage-private.h stage: Implement buffer-transform support in MetaOverlay 2022-08-05 20:30:50 +02:00
meta-stage-view-private.h stage-view: Fix header include guard 2023-01-30 13:17:19 +00:00
meta-stage-view.c backends: Excise MetaStageView to its own file 2021-07-16 19:08:06 +02:00
meta-stage.c clutter: Pass 'ClutterFrame' in all stage update signals 2023-01-23 15:57:50 +01:00
meta-viewport-info.c main: Move rect related macro to util-private.h 2021-05-17 16:08:42 +00:00
meta-viewport-info.h backends: Store whether views are scaled in MetaViewportInfo 2021-04-13 10:32:14 +00:00
meta-virtual-monitor.c virtual-monitor: Add way to change virtual monitor mode 2022-03-04 18:13:45 +00:00
meta-virtual-monitor.h tests/runner: Add 'resize_monitor' metatest command 2022-08-11 11:32:42 +00:00