mutter/src/backends/native
Jonas Ådahl 81b28a1d97 kms: Notify about privacy screen changes via predictions
When we change the privacy screen, we added a result listener to the KMS
update object to notify the upper layer about the privacy screen state
change. This was slightly awkward as one might have changed the state
multiple times for a single update, thus it was necessary to remove any
old result listeners to an update before adding a new one.

Doing this will not be possible when updates are fully async and managed
by the KMS impl device.

To handle this, instead make the post-commit prediction notify about
changes that happens in response to a successfully committed update. We
already predicted the new privacy screen state, so the necessary change
was to plumb the actual change into a callback which emits the signal if
there actually was a privacy screen change.

This will then be communicated via the same signal listener that already
listens to the 'resources-changed' signal.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2340>
2022-07-25 11:02:35 +00:00
..
dbus-utils.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
dbus-utils.h launcher: Replace mutter-launch with logind integration 2014-05-19 15:09:23 -04:00
gen-default-modes.py gen_default_modes: Add more refresh rates to fallback modes 2022-01-03 10:48:29 +00:00
meta-backend-native-private.h tests: Add some basic MetaKmsUpdate unit tests 2022-01-25 15:47:03 +00:00
meta-backend-native-types.h Add rudimentary mode setting test 2022-01-14 09:16:09 +00:00
meta-backend-native.c pointer-constraints: Move min edge distance from backend to Wayland 2022-06-13 18:38:50 +00:00
meta-backend-native.h tests: Add some basic MetaKmsUpdate unit tests 2022-01-25 15:47:03 +00:00
meta-barrier-native.c barrier: Remove _ prefix in various places 2022-04-29 18:58:38 +00:00
meta-barrier-native.h backends/native: Add a bunch of "_in_impl" suffixes to functions 2020-11-27 15:14:34 +00:00
meta-clutter-backend-native.c stage-impl: Change the backend pointer to MetaBackend 2022-01-17 09:48:51 +01:00
meta-clutter-backend-native.h clutter/backend/native: Keep a pointer to the actual backend 2021-10-18 14:36:15 +00:00
meta-cogl-utils.c native/cogl-utils: Add 10 bpc format support 2022-01-17 10:39:13 +00:00
meta-cogl-utils.h native/cogl-utils: Minor macro cleanup 2021-01-28 20:33:01 +00:00
meta-crtc-kms.c crtc/kms: Don't add gamma to the update if unsupported by the CRTC 2022-04-19 07:58:31 +00:00
meta-crtc-kms.h tests/kms/render: Add direct scanout test case 2022-06-02 08:59:13 +00:00
meta-crtc-mode-kms.c output/kms: Replace common mode bandwidth check with clock check 2022-07-01 16:13:18 +02:00
meta-crtc-mode-kms.h crtc-mode-kms: Wrap MetaKmsMode instead of drmModeModeInfo 2021-01-22 16:47:08 +00:00
meta-crtc-mode-virtual.c virtual-monitor: Split out mode info into separate struct 2022-03-04 18:13:45 +00:00
meta-crtc-mode-virtual.h virtual-monitor: Split out mode info into separate struct 2022-03-04 18:13:45 +00:00
meta-crtc-native.c crtc/native: Add API to check whether the CRTC supports hardware cursors 2021-11-26 14:30:27 +00:00
meta-crtc-native.h crtc/native: Add API to check whether the CRTC supports hardware cursors 2021-11-26 14:30:27 +00:00
meta-crtc-virtual.c crtc/native: Add API to check whether the CRTC supports hardware cursors 2021-11-26 14:30:27 +00:00
meta-crtc-virtual.h Introduce virtual monitors 2021-03-12 15:09:45 +00:00
meta-cursor-renderer-native.c cursor-renderer/native: Fix type in unset_crtc_cursor_renderer_privates 2022-07-21 21:03:18 +00:00
meta-cursor-renderer-native.h cursor-renderer/native: Clear GPU state before closing device 2021-12-22 16:22:08 +00:00
meta-device-pool-private.h native: Add device pool for tracking device file descriptors 2021-07-07 21:03:25 +02:00
meta-device-pool.c device-pool: Remove duplicate include macro 2022-01-03 19:24:36 +01:00
meta-device-pool.h tests/kms/render: Add direct scanout test case 2022-06-02 08:59:13 +00:00
meta-drm-buffer-dumb.c drm-buffer: Keep track of handle as well 2022-04-29 19:35:35 +00:00
meta-drm-buffer-dumb.h tests: Add some basic MetaKmsUpdate unit tests 2022-01-25 15:47:03 +00:00
meta-drm-buffer-gbm.c drm-buffer: Keep track of handle as well 2022-04-29 19:35:35 +00:00
meta-drm-buffer-gbm.h drm-buffer: Replace 'use-modifier' boolean with flags 2021-10-18 17:33:33 +02:00
meta-drm-buffer-import.c drm-buffer: Keep track of handle as well 2022-04-29 19:35:35 +00:00
meta-drm-buffer-import.h drm-buffer: Create from MetaDeviceFile instead of MetaKmsDevice 2021-07-07 21:03:26 +02:00
meta-drm-buffer-private.h drm-buffer: Keep track of handle as well 2022-04-29 19:35:35 +00:00
meta-drm-buffer.c drm-buffer: Keep track of handle as well 2022-04-29 19:35:35 +00:00
meta-drm-buffer.h tests/kms/render: Add direct scanout test case 2022-06-02 08:59:13 +00:00
meta-gpu-kms.c kms: Remove now unused API to get file descriptor 2021-07-07 21:03:26 +02:00
meta-gpu-kms.h kms: Only emit resources-changed signal if we recorded a change 2021-09-20 15:37:59 +00:00
meta-input-device-native.c backends/native: Assign capabilities to input devices 2022-03-30 12:06:52 +00:00
meta-input-device-native.h backends/native: Migrate discrete scroll 2022-07-14 22:29:56 +00:00
meta-input-device-tool-native.c backends/native: Add distinct meta-input-thread.h header 2020-11-27 15:14:34 +00:00
meta-input-device-tool-native.h backends/native: Add distinct meta-input-thread.h header 2020-11-27 15:14:34 +00:00
meta-input-settings-native.c input-settings/native: Fix switch fallthrough warning 2022-03-04 23:12:24 +00:00
meta-input-settings-native.h backends/native: Add distinct meta-input-thread.h header 2020-11-27 15:14:34 +00:00
meta-input-thread.h backends/native: Add distinct meta-input-thread.h header 2020-11-27 15:14:34 +00:00
meta-keymap-native.c clutter/keymap: Make caps and num lock state properties 2021-03-04 17:39:08 +00:00
meta-keymap-native.h clutter/keymap: Make caps and num lock state properties 2021-03-04 17:39:08 +00:00
meta-kms-connector-private.h kms: Notify about privacy screen changes via predictions 2022-07-25 11:02:35 +00:00
meta-kms-connector.c kms: Notify about privacy screen changes via predictions 2022-07-25 11:02:35 +00:00
meta-kms-connector.h kms/connector: Add getter for preferred mode 2022-01-25 15:47:03 +00:00
meta-kms-crtc-private.h kms: Notify about privacy screen changes via predictions 2022-07-25 11:02:35 +00:00
meta-kms-crtc.c kms: Notify about privacy screen changes via predictions 2022-07-25 11:02:35 +00:00
meta-kms-crtc.h kms/crtc: Add function meta_kms_crtc_has_gamma 2022-04-19 07:58:31 +00:00
meta-kms-device-private.h kms: Rename MetaKmsUpdateChanges to MetaKmsResourceChanges 2022-07-25 11:02:35 +00:00
meta-kms-device.c kms: Rename MetaKmsUpdateChanges to MetaKmsResourceChanges 2022-07-25 11:02:35 +00:00
meta-kms-device.h kms: Don't enter power saving via updates 2022-01-25 15:47:03 +00:00
meta-kms-impl-device-atomic.c backends/native: Use MetaKmsPlaneRotation in plane updates 2022-06-10 17:49:07 +00:00
meta-kms-impl-device-atomic.h kms: Add atomic MetaKmsImplDevice backend 2021-01-22 16:47:08 +00:00
meta-kms-impl-device-dummy.c kms: Have the device impl open device files themself 2021-07-07 21:03:25 +02:00
meta-kms-impl-device-dummy.h kms: Add way to run without mode setting 2021-03-12 15:09:45 +00:00
meta-kms-impl-device-simple.c kms/impl/simple: Make sure cursor buffers have fb ids 2022-05-03 21:45:19 +00:00
meta-kms-impl-device-simple.h kms: Move impl backend inherit MetaKmsImplDevice instead of MetaKmsImpl 2021-01-22 16:47:08 +00:00
meta-kms-impl-device.c kms: Notify about privacy screen changes via predictions 2022-07-25 11:02:35 +00:00
meta-kms-impl-device.h kms: Rename MetaKmsUpdateChanges to MetaKmsResourceChanges 2022-07-25 11:02:35 +00:00
meta-kms-impl.c kms: Concentrate update processing in MetaKmsDevice 2022-01-25 15:47:03 +00:00
meta-kms-impl.h kms: Concentrate update processing in MetaKmsDevice 2022-01-25 15:47:03 +00:00
meta-kms-mode-private.h tests/kms: Check predicted state is correctly predicted 2022-01-25 15:47:03 +00:00
meta-kms-mode.c tests/kms: Check predicted state is correctly predicted 2022-01-25 15:47:03 +00:00
meta-kms-mode.h tests/kms: Check predicted state is correctly predicted 2022-01-25 15:47:03 +00:00
meta-kms-page-flip-private.h kms/page-flip: Pass ownership of listener user data along with closure 2021-01-22 16:47:08 +00:00
meta-kms-page-flip.c kms/page-flip: Add a debug print with page flip event timings 2022-06-03 06:55:28 +00:00
meta-kms-plane-private.h backends/native: Use MetaKmsPlaneRotation in plane updates 2022-06-10 17:49:07 +00:00
meta-kms-plane.c kms: Rename MetaKmsUpdateChanges to MetaKmsResourceChanges 2022-07-25 11:02:35 +00:00
meta-kms-plane.h tests: Add KMS device tests 2022-01-25 15:47:03 +00:00
meta-kms-private.h kms: Notify about privacy screen changes via predictions 2022-07-25 11:02:35 +00:00
meta-kms-types.h kms: Rename MetaKmsUpdateChanges to MetaKmsResourceChanges 2022-07-25 11:02:35 +00:00
meta-kms-update-private.h backends/native: Use MetaKmsPlaneRotation in plane updates 2022-06-10 17:49:07 +00:00
meta-kms-update.c backends/native: Use MetaKmsPlaneRotation in plane updates 2022-06-10 17:49:07 +00:00
meta-kms-update.h tests/kms: Check predicted state is correctly predicted 2022-01-25 15:47:03 +00:00
meta-kms-utils.c backends/native: Add meta_calculate_drm_mode_vblank_duration_us() 2021-07-13 08:09:42 +00:00
meta-kms-utils.h backends/native: Add meta_calculate_drm_mode_vblank_duration_us() 2021-07-13 08:09:42 +00:00
meta-kms.c kms: Notify about privacy screen changes via predictions 2022-07-25 11:02:35 +00:00
meta-kms.h kms: Concentrate update processing in MetaKmsDevice 2022-01-25 15:47:03 +00:00
meta-launcher.c launcher: Use $XDG_SESSION_ID if available 2022-01-24 18:09:44 +01:00
meta-launcher.h launcher: Pass fallback session/seat ID when in test mode 2022-01-14 09:16:09 +00:00
meta-monitor-manager-native.c kms: Notify about privacy screen changes via predictions 2022-07-25 11:02:35 +00:00
meta-monitor-manager-native.h native: Rename MetaMonitorManagerKms to MetaMonitorManagerNative 2021-03-12 15:09:45 +00:00
meta-onscreen-native.c onscreen/native: Fix typo in log message "the the" 2022-04-04 17:36:37 +08:00
meta-onscreen-native.h tests/kms/render: Add direct scanout test case 2022-06-02 08:59:13 +00:00
meta-output-kms.c kms: Notify about privacy screen changes via predictions 2022-07-25 11:02:35 +00:00
meta-output-kms.h output/kms: Make EDID be read via MetaOutputNative object 2021-03-12 15:09:45 +00:00
meta-output-native.c output/kms: Make EDID be read via MetaOutputNative object 2021-03-12 15:09:45 +00:00
meta-output-native.h output/kms: Make EDID be read via MetaOutputNative object 2021-03-12 15:09:45 +00:00
meta-output-virtual.c Introduce virtual monitors 2021-03-12 15:09:45 +00:00
meta-output-virtual.h Introduce virtual monitors 2021-03-12 15:09:45 +00:00
meta-pointer-constraint-native.c pointer-constraints/native: Fix borders array memory leaks 2022-07-06 19:27:20 +00:00
meta-pointer-constraint-native.h pointer-constraints: Move min edge distance from backend to Wayland 2022-06-13 18:38:50 +00:00
meta-render-device-egl-stream.c Introduce MetaRenderDevice{Gbm,EglStream,Surfaceless} 2021-10-18 17:33:32 +02:00
meta-render-device-egl-stream.h Introduce MetaRenderDevice{Gbm,EglStream,Surfaceless} 2021-10-18 17:33:32 +02:00
meta-render-device-gbm.c render-device: Add API to import other buffers 2021-10-18 17:35:26 +02:00
meta-render-device-gbm.h render-device/gbm: Add getter for gbm_device 2021-10-18 17:33:33 +02:00
meta-render-device-private.h render-device: Add API to import other buffers 2021-10-18 17:35:26 +02:00
meta-render-device-surfaceless.c Introduce MetaRenderDevice{Gbm,EglStream,Surfaceless} 2021-10-18 17:33:32 +02:00
meta-render-device-surfaceless.h Introduce MetaRenderDevice{Gbm,EglStream,Surfaceless} 2021-10-18 17:33:32 +02:00
meta-render-device.c render-device: Add API to allocate dumb buffers 2021-10-18 17:36:17 +02:00
meta-render-device.h render-device: Add API to allocate dumb buffers 2021-10-18 17:36:17 +02:00
meta-renderer-native-gles3.c *: Fix spelling mistakes found by codespell 2020-08-29 09:10:31 +00:00
meta-renderer-native-gles3.h renderer/native: remove meta_renderer_native_gles3_read_pixels 2018-11-19 22:53:13 +00:00
meta-renderer-native-private.h cursor-renderer/native: Clear GPU state before closing device 2021-12-22 16:22:08 +00:00
meta-renderer-native.c renderer/native: Restore EGL state after creating secondary GPU state 2022-04-20 09:30:04 +00:00
meta-renderer-native.h wayland: Only init EGLStream controller if we didn't end up with gbm 2021-10-20 13:08:06 +00:00
meta-seat-impl.c backends/native: Migrate discrete scroll 2022-07-14 22:29:56 +00:00
meta-seat-impl.h backends/native: Migrate discrete scroll 2022-07-14 22:29:56 +00:00
meta-seat-native.c backends/native: Fix cursor renderer assignment for tablet devices 2022-02-08 14:34:47 +00:00
meta-seat-native.h backends/native: Remove unused includes 2021-09-20 15:37:59 +00:00
meta-stage-native.c backends: Rename ClutterStage[View]Cogl API and types 2021-07-16 19:08:06 +02:00
meta-stage-native.h backends: Rename ClutterStage[View]Cogl API and types 2021-07-16 19:08:06 +02:00
meta-udev.c Add rudimentary mode setting test 2022-01-14 09:16:09 +00:00
meta-udev.h Add rudimentary mode setting test 2022-01-14 09:16:09 +00:00
meta-virtual-input-device-native.c backends/native: Migrate discrete scroll 2022-07-14 22:29:56 +00:00
meta-virtual-input-device-native.h clutter: Move evdev input to src/backends/native 2019-08-24 08:59:08 +00:00
meta-virtual-monitor-native.c virtual-monitor: Add way to change virtual monitor mode 2022-03-04 18:13:45 +00:00
meta-virtual-monitor-native.h Introduce virtual monitors 2021-03-12 15:09:45 +00:00
meta-xkb-utils.c backends/native: Update keyboard a11y status in seat impl 2020-11-27 15:14:34 +00:00
meta-xkb-utils.h backends/native: Update keyboard a11y status in seat impl 2020-11-27 15:14:34 +00:00