mutter/src
Jonas Ådahl 4e57e4c4f8 monitor: Use current monitor mode to check whether active
For historical reasons meta_monitor_is_active() checked whether it is
active by checking whether the main output have a CRTC assigned and
whether that CRTC has a current mode. At a later point, the MetaMonitor
got its own mode abstraction (MetaMonitorMode), but
meta_monitor_is_active() was never updated to use this.

An issue with checking the main output's CRTC state is that, if there is
some CRTC mode combination that for some reason isn't properly detected
by the MetaMonitorMode abstraction (e.g. some tiling configuration not
yet handled), meta_monitor_is_active() would return TRUE, even though no
(abstracted) mode was set. This would cause confusion here and there,
leading to NULL pointer dereferences due to the assumption that if a
monitor is active, it has an active mode.

Instead, change meta_monitor_is_active() to directly check the current
monitor mode, and log a warning if the main output still happen to have
a CRTC with a mode assigned to it. This way, when an not undrestood CRTC
mode combination is encountered, instead of dereferencing NULL pointers,
simply assume the monitor is not active, which means that it will not be
managed or rendered by mutter at all.

https://gitlab.gnome.org/GNOME/mutter/issues/130

(cherry picked from commit 4d465eac08)
2019-02-11 13:40:09 -05:00
..
backends monitor: Use current monitor mode to check whether active 2019-02-11 13:40:09 -05:00
compositor window-actor: add new signal "effects-completed" 2018-05-22 13:01:05 +02:00
core window: Explicitly exclude unmanaging window from focus again 2019-02-11 13:40:09 -05:00
meta Add remote access controller API 2019-02-11 13:40:06 -05:00
tests tests: Add "closed-transient" test 2019-02-11 13:40:09 -05:00
ui frames: Allow for unknown mouse buttons 2018-05-25 11:35:45 +02:00
wayland wayland: Clean up xwayland grabs even if surface is gone 2019-02-11 13:40:08 -05:00
x11 window: Pass flag to meta_window_update_monitor() instead of bool 2019-02-11 13:40:07 -05:00
.cvsignore
libmutter.pc.in Make libmutter and friends parallel installable 2017-02-14 11:16:45 +08:00
Makefile-tests.am tests: Add "closed-transient" test 2019-02-11 13:40:09 -05:00
Makefile.am Add remote access controller API 2019-02-11 13:40:06 -05:00
meta-enum-types.c.in Install enum types 2015-07-05 22:01:59 -07:00
meta-enum-types.h.in Install enum types 2015-07-05 22:01:59 -07:00
org.freedesktop.login1.xml MetaLauncher: Don't g_error() on failure 2015-11-06 17:03:59 -05:00
org.gnome.Mutter.DisplayConfig.xml DisplayConfig: Add 'legacy-ui-scaling-factor' property 2017-10-12 17:42:52 +08:00
org.gnome.Mutter.IdleMonitor.xml idle-monitor: Add ResetIdletime API, for testing purposes 2018-04-16 16:03:56 +02:00
org.gnome.Mutter.RemoteDesktop.xml remote-desktop, screen-cast: Add version number to D-Bus APIs 2018-02-23 19:33:31 +08:00
org.gnome.Mutter.ScreenCast.xml remote-desktop, screen-cast: Add version number to D-Bus APIs 2018-02-23 19:33:31 +08:00