1
0
Fork 0
Commit graph

10 commits

Author SHA1 Message Date
Jonas Ådahl
a393a614a1 monitor-manager: Remove 'scale' from MetaOutput
Replace the 'scale' of an output with a vfunc on the MetaMonitorManager
class that takes a monitor and a monitor mode which calculates the
scale. On X11 this always returns 1, on KMS, the old formula is used.
On the dummy and test backends, the already configured values are
returned.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-04-07 22:30:46 +08:00
Jonas Ådahl
753e9c65a1 meta-monitor-config: Pass logical monitor scale via config
The default (calculated) scale is derived from the output, but
ultimately set via the monitor scale. This will enable config files to
override the scale. Yet to be done is handling when a scale is not
supported by a backend (i.e. the X11 backend).

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-04-07 22:30:46 +08:00
Jonas Ådahl
e8197e8e05 monitor-config-manager: Add underscanning to MetaMonitorConfig
Set the underscanning state via the monitor config struct so that it
can be configured.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
9b4e1903e1 monitor-config-manager: Prefer to use stored config
If not explicitly set by the backend, prefer to use the stored config
instead of creating a new one, if available.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
1ad386bc28 Introduce MetaMonitorConfigStore
MetaMonitorConfigStore provides an XML storage mechanism for
MetaMonitorConfigManager. It stores configuration files defined in the
same level as the MetaMonitorsConfig format, i.e. refers to high level
"monitors" and "monitor modes" instead of connectors and CRTCs.

Only reading custom files are implemented and so far unused.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
3f994646f2 monitor-config-manager: Handle headless setup gracefully
Handle headless setup gracefully by having no logical monitors. This
commit only makes the monitor management code deal with it; other areas
may still not be able to handle it.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:56 +08:00
Jonas Ådahl
4b33f05eda monitor-config-manager: Add MetaMonitorsConfig creation helper
Add a meta_monitors_config_new() helper. It's exposed outside of
meta-monitor-config-manager.c already, as it'll be used externally in a
later commit.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
f19cb6a610 monitor-config-manager: Handle laptop lid being closed
Handle configuring when the laptop lid is closed. This is so far
handled by creating a linear configuration while ignoring the laptop
panel. Changing the current configuration will come later.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
a0af7e94a6 monitor-config-manager: Add support for suggested configuration
Create a suggested configuration, if such configuration is provided.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00
Jonas Ådahl
644ee666f6 Introduce new monitor configuration system
The new monitor configuration system (MetaMonitorConfigManager) aims to
replace the current MetaMonitorConfig. The main difference between the
two is that MetaMonitorConfigManager works with higher level input
(MetaMonitor, MetaMonitorMode) instead of directly looking at the CRTC
and connector state. It still produces CRTC and connector configuration
later applied by the respective backends.

Other difference the new system aims to introduce is that the
configuration system doesn't manipulate the monitor manager state; that
responsibility is left for the monitor manager to handle (it only
manages configuration and creates CRTC/connector assignments, it
doesn't apply anything).

The new configuration system allows backends to not rely on deriving the
current configuration from the CRTC/connector state, as this may no longer be
possible (i.e. when using KMS and multiple framebuffers).

The MetaMonitorConfigManager system is so far disabled by default, as
it does not yet have all the features of the old system, but eventually
it will replace MetaMonitorConfig which will at that point be removed.
This will make it possible to remove old hacks introduced due to
limitations in the old system.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-01-25 16:28:55 +08:00