1
0
Fork 0
mutter-performance-source/src/backends/native
Jonas Ådahl 237cdeef4c seat-impl: Destroy libinput objects on input thread on tear down
We didn't tear down the libinput objects in the right thread when
exiting, but did so after the input thread exited.

We also tried to destroy the libinput devices after the libinput context
was destroyed, which isn't allowed.

Fix these two issues by tearing down the libinput objects in a input
thread task that when done exits the input thread. This effectively
"flushes" the input thread tasks while destroying the libinput objects
just before the thread exits.

While it might fine to tear down libinput objects in an arbitrary (main
in this case) thread while making sure nothing pokes at it in parallel
(e.g. the input thread is gone), libinput is by definition single
threaded, and could theoretically make assumptions about this, and we
shouldn't cause any possible surprises here, so make sure to destroy it
all in the right thread.

This fixes an abort() on exit caused by an assert about invalid object
destruction in libinput.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1663>
2021-01-11 17:17:39 +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 Fix incorrect 'is' in gen_default_modes 2020-02-10 20:35:05 +01:00
meta-backend-native-private.h backends/native: Implement support for pointer barriers 2015-01-19 02:27:59 -08:00
meta-backend-native-types.h backends/native: Add distinct meta-input-thread.h header 2020-11-27 15:14:34 +00:00
meta-backend-native.c backends/native: Destruct udev after kms 2020-12-16 09:17:20 +01:00
meta-backend-native.h native: Implement ClutterSeat 2020-01-30 17:59:41 +01:00
meta-barrier-native.c backends/native: Add a bunch of "_in_impl" suffixes to functions 2020-11-27 15:14:34 +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 backends/native: Add missing seat finalization paths 2020-11-27 15:14:34 +00:00
meta-clutter-backend-native.h clutter: Remove 'eglnative' backend layer 2020-08-13 17:51:56 +02:00
meta-cogl-utils.c backends/native: Move pixel format helper to separate file 2020-09-01 13:05:24 -03:00
meta-cogl-utils.h backends/native: Move pixel format helper to separate file 2020-09-01 13:05:24 -03:00
meta-crtc-kms.c backends/native: Fall back to compositing if direct scanout failed 2020-09-17 12:17:35 +00:00
meta-crtc-kms.h backends/native: Fall back to compositing if direct scanout failed 2020-09-17 12:17:35 +00:00
meta-crtc-mode-kms.c crtc-kms: Make KMS CRTC mode a type inheriting MetaCrtcMode 2020-06-11 09:20:16 +00:00
meta-crtc-mode-kms.h crtc-kms: Make KMS CRTC mode a type inheriting MetaCrtcMode 2020-06-11 09:20:16 +00:00
meta-cursor-renderer-native.c backends: Move HW cursor inhibitors to MetaBackend 2020-11-27 15:14:33 +00:00
meta-cursor-renderer-native.h backends: Add ::device property to MetaCursorRenderer 2020-11-27 15:14:33 +00:00
meta-drm-buffer-dumb.c drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-drm-buffer-dumb.h drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-drm-buffer-gbm.c drm-buffer-gbm: Clear framebuffer with g_clear_object 2020-10-27 14:32:45 +00:00
meta-drm-buffer-gbm.h drm-buffer/gbm: Support both surface and standalone buffers 2020-04-16 14:08:19 +02:00
meta-drm-buffer-import.c renderer/native: Import primary buffer to 2nd GPU 2020-01-16 20:19:29 +00:00
meta-drm-buffer-import.h renderer/native: Import primary buffer to 2nd GPU 2020-01-16 20:19:29 +00:00
meta-drm-buffer.c drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-drm-buffer.h drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-gpu-kms.c backends: force enable modifiers on tagged devices 2020-09-28 14:00:44 +02:00
meta-gpu-kms.h backends: force enable modifiers on tagged devices 2020-09-28 14:00:44 +02:00
meta-input-device-native.c seat-impl: Destroy libinput objects on input thread on tear down 2021-01-11 17:17:39 +00:00
meta-input-device-native.h backends/native: Dispose the libinput device in the input thread 2020-12-16 17:09:58 +01: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 backend/native: Check libinput_device in async call 2020-12-16 19:14:54 +01: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 backends/native: Pass xkb_state directly when updating MetaKeymapNative 2020-11-27 17:34:55 +00:00
meta-keymap-native.h backends/native: Pass xkb_state directly when updating MetaKeymapNative 2020-11-27 17:34:55 +00:00
meta-kms-connector-private.h kms: Predict state changes when processing update 2019-10-07 14:59:18 +00:00
meta-kms-connector.c kms: Skip displays with 'non-desktop' property set 2020-08-05 06:09:36 +00:00
meta-kms-connector.h kms: Skip displays with 'non-desktop' property set 2020-08-05 06:09:36 +00:00
meta-kms-crtc-private.h kms: Predict state changes when processing update 2019-10-07 14:59:18 +00:00
meta-kms-crtc.c kms/crtc: Always consider gamma state valid 2020-09-15 11:31:57 +00:00
meta-kms-crtc.h kms: Remove unused fields from MetaKmsCrtcState struct 2019-08-15 20:38:28 +00:00
meta-kms-device-private.h kms-impl-simple: Add fake cursor planes if no real ones 2020-03-07 21:40:50 +00:00
meta-kms-device.c kms/device: Provide driver name and description 2020-08-29 10:32:20 +00:00
meta-kms-device.h kms/device: Provide driver name and description 2020-08-29 10:32:20 +00:00
meta-kms-impl-device.c kms/device: Provide driver name and description 2020-08-29 10:32:20 +00:00
meta-kms-impl-device.h kms/device: Provide driver name and description 2020-08-29 10:32:20 +00:00
meta-kms-impl-simple.c backends/native: Fall back to compositing if direct scanout failed 2020-09-17 12:17:35 +00:00
meta-kms-impl-simple.h backends/native: Add basic KMS abstraction building blocks 2019-06-20 13:31:55 +00:00
meta-kms-impl.c kms-impl-simple: Add fake cursor planes if no real ones 2020-03-07 21:40:50 +00:00
meta-kms-impl.h kms-impl-simple: Add fake cursor planes if no real ones 2020-03-07 21:40:50 +00:00
meta-kms-page-flip-private.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-page-flip.c backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-plane-private.h kms-impl-simple: Add fake cursor planes if no real ones 2020-03-07 21:40:50 +00:00
meta-kms-plane.c kms-impl-simple: Add fake cursor planes if no real ones 2020-03-07 21:40:50 +00:00
meta-kms-plane.h kms-impl-simple: Add fake cursor planes if no real ones 2020-03-07 21:40:50 +00:00
meta-kms-private.h backends/native: Remove unused meta_gpu_kms_wait_for_flip and more 2020-08-04 08:57:06 +00:00
meta-kms-types.h renderer/native: Add udev rule to select primary GPU 2020-11-16 16:00:33 +00:00
meta-kms-update-private.h backends/native: Fall back to compositing if direct scanout failed 2020-09-17 12:17:35 +00:00
meta-kms-update.c backends/native: Fall back to compositing if direct scanout failed 2020-09-17 12:17:35 +00:00
meta-kms-update.h backends/native: Fall back to compositing if direct scanout failed 2020-09-17 12:17:35 +00:00
meta-kms-utils.c backend/native: Move some KMS utilities to its own file 2019-06-20 13:31:56 +00:00
meta-kms-utils.h backend/native: Move some KMS utilities to its own file 2019-06-20 13:31:56 +00:00
meta-kms.c backends/native: Remove unused meta_gpu_kms_wait_for_flip and more 2020-08-04 08:57:06 +00:00
meta-kms.h kms: Make update processing return direct feedback 2020-02-11 18:32:07 +01:00
meta-launcher.c backends/native: Add distinct meta-input-thread.h header 2020-11-27 15:14:34 +00:00
meta-launcher.h backends/native: Replace tabs with spaces 2020-02-19 18:28:29 +00:00
meta-monitor-manager-kms.c monitor-manager-kms: Disable CRTCs if there is no monitor 2020-12-22 17:03:53 +08:00
meta-monitor-manager-kms.h backends/native: Move primary_gpu into MetaRendererNative 2019-01-13 10:30:44 +00:00
meta-output-kms.c crtc-kms: Make KMS CRTC mode a type inheriting MetaCrtcMode 2020-06-11 09:20:16 +00:00
meta-output-kms.h output: Make implementations inherit MetaOutput 2020-06-10 18:54:51 +00:00
meta-pointer-constraint-native.c clutter: Drop clutter_input_device_get_coords() method 2020-11-27 15:14:33 +00:00
meta-pointer-constraint-native.h backends: Delegate pointer confinements to an impl object 2020-11-27 15:14:33 +00: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.c monitor-manager-kms: Disable CRTCs if there is no monitor 2020-12-22 17:03:53 +08:00
meta-renderer-native.h monitor-manager-kms: Disable CRTCs if there is no monitor 2020-12-22 17:03:53 +08:00
meta-seat-impl.c seat-impl: Destroy libinput objects on input thread on tear down 2021-01-11 17:17:39 +00:00
meta-seat-impl.h backends/native: Add distinct meta-input-thread.h header 2020-11-27 15:14:34 +00:00
meta-seat-native.c clutter: Do not poke backend code for motion compression 2020-12-08 15:37:38 +00:00
meta-seat-native.h backends/native: Add distinct meta-input-thread.h header 2020-11-27 15:14:34 +00:00
meta-stage-native.c clutter: Paint views with individual frame clocks 2020-07-02 19:36:51 +02:00
meta-stage-native.h backends/native: Stop supporting stage views being disabled 2017-10-05 18:08:09 -04:00
meta-udev.c renderer/native: Add udev rule to select primary GPU 2020-11-16 16:00:33 +00:00
meta-udev.h renderer/native: Add udev rule to select primary GPU 2020-11-16 16:00:33 +00:00
meta-virtual-input-device-native.c backends/native: Add distinct meta-input-thread.h header 2020-11-27 15:14:34 +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-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