1
0
Fork 0
Commit graph

11 commits

Author SHA1 Message Date
Jasper St. Pierre
9710c013c5 config: Rename ret to config
We don't return this configuration, so don't name it ret.
2014-10-22 15:49:47 -07:00
Jasper St. Pierre
05f8d79323 config: Fix the memory and other management for MetaMonitorConfig
The code in MetaMonitorConfig was really complex and was trying to do
way too much, using multiple different variables to determine where
things were stored, and trying to do fancy tricks to transfer
ownership.

Add a refcounting system to help simplify this, and clean up the logic.
Simply along the way, this fixes multiple bugs in the monitor config
logic, most notably bug #734889, which was my original goal to fix.
2014-10-22 15:25:12 -07:00
Jasper St. Pierre
f2546dfeea config: Refactor the check for the lid special-case out
This also fixes the case where current_is_for_laptop_lid wasn't properly
set in the default case.
2014-10-22 15:04:34 -07:00
Rui Matos
b3821c4f90 monitor-manager: Don't try to match the outputs on hotplug
meta_monitor_config_match_current() only matches the number of outputs
and if the output connector, vendor, product and serial match.

In the X backend, this means that we can't use it to bypass doing any
work because it won't detect cases where we actually want to update
ourselves like e.g. an output being turned off either by us or by
another X client (e.g. xrandr).

In the native backend, unlike the xrandr backend, we only get called
on real hotplug events and thus should always trigger the common
hotplug code to (possibly) apply a new mode so the check is pointless
anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=738630
2014-10-16 20:39:16 +02:00
Jasper St. Pierre
037c3438a3 meta-monitor-config: Fix small whitespace issue 2014-09-05 09:50:37 -07:00
Jasper St. Pierre
eb952819c2 monitor: Don't use wl_output_transform in our APIs
Invent our own API so we can build without Wayland headers.
2014-07-13 11:35:01 -04:00
Giovanni Campagna
2ca2c18c2a MetaMonitorConfig: don't always restore the previous config when opening the laptop lid
Only do it if the current configuration was actually created
as the result of closing the laptop lid.

https://bugzilla.gnome.org/show_bug.cgi?id=725637
2014-05-06 21:28:41 +02:00
Giovanni Campagna
01cd4b2ba0 MetaMonitorConfig: don't keep a previous config with the wrong outputs
We can only apply a configuration if its outputs match the connected
ones, so discard the current configuration if the set of output changes
(for example for hotplug), otherwise we will crash trying to apply
the bogus previous configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=725637
2014-05-06 21:27:50 +02:00
Jasper St. Pierre
25a16c3379 Remove trailing whitespace 2014-05-02 09:34:48 -04:00
Giovanni Campagna
e215f3f5eb monitor-config: prevent assert that at least one output is connected
Apparently some connector technologies don't distinguish between
on and off, and there might be valid use cases for running without
any connected monitor.
In that case, just avoid any configuration at all.

https://bugzilla.gnome.org/show_bug.cgi?id=709009
2014-04-09 12:13:32 -07:00
Jasper St. Pierre
229360b248 Start molding out a new src/backends/ dir
Right now this just has all of the files in one directory. We'll
be introducing more structure to this in the future, and build
a proper backend system.
2014-03-31 22:11:00 -04:00
Renamed from src/core/meta-monitor-config.c (Browse further)