mutter/src/backends
Marco Trevisan (Treviño) 17491bae06 monitor-config-manager: Fallback to closed laptop lid configuration
When closing the lid of a laptop, we reconfigure all the monitors in order
to update the CRTCs and (if enabled) the global UI scaling factor.

To do this, we try first to reuse the current configuration for the usable
monitors, but if we have only monitor enabled and this one is on the laptop
lid we just end up creating a new configuration where the primary monitor is
the laptop one (as per find_primary_monitor() in MetaMonitorConfigManager),
but ignoring the user parameters.

In case the user selected a different resolution / scaling compared to the
default one, while the laptop lid is closed we might change the monitors
layout, causing applications to rescale or reposition.

To avoid this, when creating the monitors configuration from the current
current state, in case we have only one monitor available and that one is
the laptop panel, let's just reuse this configuration.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1200


(cherry picked from commit e48516679c)
2020-04-16 16:09:38 +00:00
..
native cursor-renderer-native: Take CRTC transform into account 2020-04-15 17:53:50 +02:00
x11 backends/x11: Fix access to WacomDevice 2020-04-07 17:48:09 +00:00
edid-parse.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
edid.h
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 MetaInputDevice derivable class 2020-03-24 18:07:31 +00:00
meta-backend-types.h screen-cast: Add getters to fetch object owners 2019-01-16 17:09:51 +00:00
meta-backend.c backends: Add MetaInputDevice derivable class 2020-03-24 18:07:31 +00:00
meta-barrier-private.h Use G_DECLARE_DERIVABLE/FINAL_TYPE on some types 2018-12-21 19:48:50 +00:00
meta-barrier.c cleanup: Don't use G_TYPE_INSTANCE_GET_PRIVATE() 2019-07-18 11:01:09 +02:00
meta-crtc.c crtc: Don't leak MetaCrtcConfig 2020-02-27 20:35:07 +00:00
meta-crtc.h crtc: Move logical monitor pointer to MetaMonitor 2020-02-25 18:39:51 +01:00
meta-cursor-renderer.c Replace ClutterRect by graphene_rect_t 2019-10-16 11:38:14 +00:00
meta-cursor-renderer.h Replace ClutterRect by graphene_rect_t 2019-10-16 11:38:14 +00:00
meta-cursor-sprite-xcursor.c cursor-sprite-xcursor: Emulate Wayland hotspot limitations 2020-03-26 08:47:37 +00:00
meta-cursor-sprite-xcursor.h cursor-renderer: Fetch instead of pass Xcursor image when realizing 2018-06-15 19:09:52 +00:00
meta-cursor-tracker-private.h Use G_DECLARE_DERIVABLE/FINAL_TYPE on some types 2018-12-21 19:48:50 +00:00
meta-cursor-tracker.c backends: Replace ClutterDeviceManager usage in favor of ClutterSeat 2020-01-30 18:11:23 +01:00
meta-cursor.c cursor-sprite: Add API to get dimension 2020-03-26 16:18:28 +00:00
meta-cursor.h cursor-sprite: Add API to get dimension 2020-03-26 16:18:28 +00:00
meta-dbus-session-watcher.c dbus-session-watcher: Chain up to parent finalize() 2019-10-14 09:09:01 +02:00
meta-dbus-session-watcher.h
meta-display-config-shared.h Use a consistent style for enum braces 2019-02-28 09:31:01 +01:00
meta-dnd-private.h compositor: Move out X11 compositing code into sub type 2019-08-19 08:44:58 +00:00
meta-egl-ext.h EGL: Include EGL/eglmesaext.h 2019-10-21 14:04:30 +00:00
meta-egl.c EGL: Include EGL/eglmesaext.h 2019-10-21 14:04:30 +00:00
meta-egl.h EGL: Include EGL/eglmesaext.h 2019-10-21 14:04:30 +00:00
meta-gles3-table.h backends: Add OpenGL ES 3 abstraction layer 2017-10-05 18:17:26 -04:00
meta-gles3.c Fix const qualifier usage 2019-01-22 18:31:53 +01:00
meta-gles3.h Fix const qualifier usage 2019-01-22 18:31:53 +01:00
meta-gpu.c backend: Move GPU ownership from the monitor manager to the backend 2019-06-20 13:31:55 +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-monitor-dbus.c backends: Drop per-device idle monitors 2020-02-12 22:07:55 +00:00
meta-idle-monitor-dbus.h
meta-idle-monitor-private.h backends: Do not use device IDs on idle monitors 2020-01-30 18:11:23 +01:00
meta-idle-monitor.c backends: Drop meta_idle_monitor_get_for_device() 2020-02-12 22:07:55 +00:00
meta-input-device-private.h backends: Add MetaInputDevice derivable class 2020-03-24 18:07:31 +00:00
meta-input-device.c backends: Add MetaInputDevice derivable class 2020-03-24 18:07:31 +00:00
meta-input-mapper-private.h backends: Check both input settings and mapper for tablet monitors 2020-03-25 19:09:32 +00:00
meta-input-mapper.c backends: Check both input settings and mapper for tablet monitors 2020-03-25 19:09:32 +00:00
meta-input-settings-private.h backends: Drop internal WacomDevice in MetaInputSettings 2020-03-24 18:07:31 +00:00
meta-input-settings.c input-settings: fix device list iteration 2020-04-12 23:43:01 +02:00
meta-logical-monitor.c crtc: Move logical monitor pointer to MetaMonitor 2020-02-25 18:39:51 +01:00
meta-logical-monitor.h logical-monitor: Pass monitor in the for each CRTC helper callback 2020-02-25 18:39:51 +01:00
meta-monitor-config-manager.c monitor-config-manager: Fallback to closed laptop lid configuration 2020-04-16 16:09:38 +00:00
meta-monitor-config-manager.h monitor-config-store: Read system wide config files 2019-02-26 21:04:27 +00:00
meta-monitor-config-migration.c
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: Read system wide config files 2019-02-26 21:04:27 +00:00
meta-monitor-config-store.h meta: Hide libmutter symbols by default and selectively export them 2019-01-23 14:18:13 +01:00
meta-monitor-manager-dummy.c monitor-manager: Remove 'mirror' capability 2020-03-18 00:46:20 +00:00
meta-monitor-manager-dummy.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-monitor-manager-private.h monitor-manager: Remove 'mirror' capability 2020-03-18 00:46:20 +00:00
meta-monitor-manager.c monitor-manager: Remove 'mirror' capability 2020-03-18 00:46:20 +00:00
meta-monitor-transform.c monitor-transform: Add API to transform point 2020-03-26 16:18:28 +00:00
meta-monitor-transform.h monitor-transform: Add API to transform point 2020-03-26 16:18:28 +00:00
meta-monitor.c monitor: Fix tile coordinate calculation 2020-04-15 17:53:50 +02:00
meta-monitor.h crtc: Move logical monitor pointer to MetaMonitor 2020-02-25 18:39:51 +01:00
meta-orientation-manager.c orientation-manager: Do not change current orientation when locked 2020-02-07 13:46:45 +01:00
meta-orientation-manager.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-output.c monitor: Move logical <-> CRTC transform helpers to MetaOutput 2020-02-27 09:47:22 +01:00
meta-output.h monitor: Move logical <-> CRTC transform helpers to MetaOutput 2020-02-27 09:47:22 +01:00
meta-pointer-constraint.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-pointer-constraint.h Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-profiler.c cogl: Install cogl-trace.h and include from cogl.h 2020-03-26 09:05:38 +01:00
meta-profiler.h profile: Add a Sysprof-based profiler 2019-05-31 11:57:07 -03:00
meta-remote-access-controller-private.h remote-access-handle: Expose disable-animations property 2020-02-20 10:40:42 +00:00
meta-remote-access-controller.c remote-access-handle: Expose disable-animations property 2020-02-20 10:40:42 +00:00
meta-remote-desktop-session.c clutter: Move virtual device management to ClutterSeat 2020-01-30 18:02:14 +01:00
meta-remote-desktop-session.h Add remote access controller API 2018-07-20 16:49:49 +02:00
meta-remote-desktop.c clutter: Move virtual device management to ClutterSeat 2020-01-30 18:02:14 +01:00
meta-remote-desktop.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-renderer-view.c renderer-native: Draw stage separately per CRTC 2020-02-25 18:39:51 +01:00
meta-renderer-view.h renderer-native: Draw stage separately per CRTC 2020-02-25 18:39:51 +01:00
meta-renderer.c renderer-native: Draw stage separately per CRTC 2020-02-25 18:39:51 +01:00
meta-renderer.h renderer-native: Draw stage separately per CRTC 2020-02-25 18:39:51 +01:00
meta-screen-cast-monitor-stream-src.c monitor-stream-src: Use cogl_framebuffer_finish() 2020-02-28 15:52:19 -03:00
meta-screen-cast-monitor-stream-src.h
meta-screen-cast-monitor-stream.c backend: Move GPU ownership from the monitor manager to the backend 2019-06-20 13:31:55 +00:00
meta-screen-cast-monitor-stream.h screen-cast: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +00:00
meta-screen-cast-session.c remote-access-handle: Expose disable-animations property 2020-02-20 10:40:42 +00:00
meta-screen-cast-session.h screen-cast-session: Add 'disable-animations' property 2020-02-20 10:40:42 +00:00
meta-screen-cast-stream-src.c screen-cast-stream-src: Don't leak GSource 2020-03-09 17:31:23 +00:00
meta-screen-cast-stream-src.h screen-cast-stream-src: Support DMA buffer sharing 2020-02-28 15:29:03 -03:00
meta-screen-cast-stream.c screen-cast-stream: Don't broadcast PipeWireStreamAdded signal 2019-01-30 17:14:47 +00:00
meta-screen-cast-stream.h screen-cast: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +00:00
meta-screen-cast-window-stream-src.c window-stream-src: Finish framebuffer after blitting 2020-03-27 23:29:58 +00: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: Fix window recording on HiDPI 2019-12-18 18:41:44 +01:00
meta-screen-cast-window-stream.h screen-cast-window-stream: Add support for cursor modes 2019-02-26 13:39:11 +00:00
meta-screen-cast-window.c window-stream-source: Draw into DMA buffer image 2020-02-28 15:52:19 -03:00
meta-screen-cast-window.h window-stream-source: Draw into DMA buffer image 2020-02-28 15:52:19 -03:00
meta-screen-cast.c screen-cast-session: Add 'disable-animations' property 2020-02-20 10:40:42 +00:00
meta-screen-cast.h screen-cast: Add 'cursor-mode' to allow decoupled cursor updates 2019-01-16 17:09:51 +00:00
meta-settings-private.h wayland: Add setting/api to check the policy to set up the X11 display 2019-08-06 00:41:36 +00:00
meta-settings.c settings: Improve logging of enabled experimental features 2020-02-17 17:08:21 +00:00
meta-stage-private.h Replace ClutterRect by graphene_rect_t 2019-10-16 11:38:14 +00:00
meta-stage.c clutter/stage: Pass redraw clip instead of extents when painting view 2020-02-25 19:18:54 +01:00