summaryrefslogtreecommitdiff
path: root/src/backends/meta-logical-monitor.c
Commit message (Collapse)AuthorAgeFilesLines
* mutter: Cleanup gi-docgen annotationsbilelmoussaoui/mutter-docsBilal Elmoussaoui2023-05-171-6/+6
|
* crtc: Move MetaCrtcConfig field to instance privateJonas Ådahl2020-06-101-1/+5
| | | | | | Last piece before MetCrtc can be made a derivable type. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1287
* output: Move configureable state to instance privateJonas Ådahl2020-06-101-1/+2
| | | | | | | | | | That is is_presentation, is_primary, is_underscanning and backlight. The first three are set during CRTC assignment as they are only valid when active. The other is set separately, as it is untied to monitor configuration. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1287
* output: Move winsys_id into instance private and rename to idJonas Ådahl2020-06-101-2/+2
| | | | https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1287
* crtc: Move logical monitor pointer to MetaMonitorJonas Ådahl2020-02-251-4/+2
| | | | | | | | Since the last code fetching the logical monitor state directly from the CRTC has been removed, we can move the logical monitor pointer to a more natural place. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
* crtc: Move configured state to separate structJonas Ådahl2020-02-251-1/+1
| | | | | | | | | | | | | To make it more reliable to distinguish between values that are read from the backend implementation (which is likely to be irrelevant for anything but the backend implementation), split out those values (e.g. layout). This changes the meaning of what was MetaCrtc::rect, to a MetaCrtcConfig::layout which is the layout the CRTC has in the global coordinate space. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
* logical-monitor: Pass monitor in the for each CRTC helper callbackJonas Ådahl2020-02-251-0/+1
| | | | | | Will be used in later commits. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
* logical-monitor: Pass output when iterating over CRTCsJonas Ådahl2019-06-201-0/+1
| | | | | | | | While not currently used by any users, it'll be useful in future commits. https://gitlab.gnome.org/GNOME/mutter/issues/548 https://gitlab.gnome.org/GNOME/mutter/merge_requests/525
* Add some gtk-doc comments.Niels De Graef2019-01-061-0/+19
|
* Move monitor management API to MetaDisplayArmin Krezović2018-07-061-7/+7
| | | | | | | This includes changing various users to use MetaDisplay directly, who used MetaScreen only for this before. https://bugzilla.gnome.org/show_bug.cgi?id=759538
* backends: Add logical monitor -> monitor -> output -> crtc ref chainJonas Ådahl2018-06-281-5/+9
| | | | | | | | | | | Make it so that each logical monitor has a reference to all the monitors that are assigned to it. All monitors has a reference to each output that belongs to it. Each output has a reference to any CRTC it has been assigned. https://bugzilla.gnome.org/show_bug.cgi?id=786929
* backends: Move MetaOutput::crtc field into private structJonas Ådahl2018-06-281-5/+8
| | | | | | | No functional changes. This is only done so that changes to reference counting can done more reliably. https://bugzilla.gnome.org/show_bug.cgi?id=786929
* monitor-manager: Take drm-connector panel-orientation property into accountHans de Goede2017-12-251-1/+2
| | | | | | | | | | | | | | | | | | Some x86 clamshell design devices use portrait tablet LCD panels while they should use a landscape panel, resoluting in a 90 degree rotated picture. Newer kernels detect this and rotate the fb console in software to compensate. These kernels also export their knowledge of the LCD panel orientation vs the casing in a "panel orientation" drm_connector property. This commit adds support to mutter for reading the "panel orientation" and transparently (from a mutter consumer's pov) fixing this by applying a (hidden) rotation transform to compensate for the panel orientation. Related: https://bugs.freedesktop.org/show_bug.cgi?id=94894 https://bugzilla.gnome.org/show_bug.cgi?id=782294
* MetaLogicalMonitor: free the monitors list on finalizeMarco Trevisan (Treviño)2017-10-201-0/+13
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=789227
* monitor-manager: Make MetaCrtc a GObjectJonas Ådahl2017-10-051-0/+1
| | | | | | | | Turn MetaCrtc into a GObject and move it to a separate file. This changes the storage format, resulting in changing the API for accessing MetaCrtcs from using an array, to using a GList. https://bugzilla.gnome.org/show_bug.cgi?id=785381
* logical-monitor: Add helper for iterating over active CRTCsJonas Ådahl2017-10-051-0/+45
| | | | | | | | Add meta_logical_monitor_foreach_crtc() helper to iterate over all the active CRTCs driving the monitors associated with the specified logical monitor. https://bugzilla.gnome.org/show_bug.cgi?id=785381
* Make MetaOutput a GObjectJonas Ådahl2017-10-051-1/+3
| | | | | | | | Turn MetaOutput into a GObject and move it to a separate file. This changes the storage format, resulting in changing the API for accessing MetaOutputs from using an array, to using a GList. https://bugzilla.gnome.org/show_bug.cgi?id=785381
* cursor-renderer-native: Don't use HW cursor on transformed logical monitorJonas Ådahl2017-08-211-0/+12
| | | | | | | | | | | | The HW cursor plane can't do any transformations, and as we still don't pre-transform any buffer before uploading to the cursor plane, we must disable the HW cursor when a logical monitor is transformed. This worked previously because the transform of a MetaCrtc did not correspond to the transform of a CRTC, but the transform of the logical monitor the CRTC was assigned to. https://bugzilla.gnome.org/show_bug.cgi?id=786023
* logical-monitor: Make scale a floatJonas Ådahl2017-07-141-2/+2
| | | | | | | To support fractional scaling, the logical monitor scale must be stored as a float. No other functional changes is part of this commit. https://bugzilla.gnome.org/show_bug.cgi?id=765011
* monitor-manager/xrandr: Allow configuring scales on X11 tooJonas Ådahl2017-05-261-7/+1
| | | | | | | | | | | | | This commit makes it possible to configure logical monitor scale also when running on top of an X11 server using Xrandr. An extra property 'requires-globla-scale' is added to the D-Bus API is added to instruct a configuration application to only allow setting a global logical monitor scale. This is needed to let gsd-xsettings use the configured state to set a XSettings state that respects the explicit monitor configuration. https://bugzilla.gnome.org/show_bug.cgi?id=777732
* monitor-config-manager: Support logical monitor transformsJonas Ådahl2017-04-071-0/+1
| | | | | | | | | | | Add support for rotated monitors. This is done per logical monitor, as every monitor assigned to a logical monitor must be transformed in the same way. This includes being transformed on the same level; e.g. if the backend does not support transforming any monitor of a logical monitor natively, then all monitors will be transformed using the offscreen intermediate framebuffer. https://bugzilla.gnome.org/show_bug.cgi?id=777732
* logical-monitor: Track whether the logical monitor is transformedJonas Ådahl2017-04-071-0/+14
| | | | | | | | | | | | | | | | Keep track of the logical monitor transform. When a logical monitor is transformed, all of its monitors are also transformed in the same way. A logical monitor can either be transformed on the CRTC level, or using an offscreen intermediate buffer. In both cases will the logical monitor be transformed, but only in the latter will the view be transformed. MetaCrtcs::transform currently does not represent whether the CRTC is configured to be transformed or not; only when the backend can handle it does it correctly correspond to the actual CRTC configuration. This is intended to change with MetaMonitorConfigManager. https://bugzilla.gnome.org/show_bug.cgi?id=777732
* Add support for scaled logical monitor framebuffersJonas Ådahl2017-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for rendering onto enlarged per logical monitor framebuffers, using the scaled clutter stage views, for HiDPI enabled logical monitors. This works by scaling the mode of the monitors in a logical monitors by the scale, no longer relying on scaling the window actors and window geometry for making windows have the correct size on HiDPI monitors. It is disabled by default, as in automatically created configurations will still use the old mode. This is partly because Xwayland clients will not yet work good enough to make it feasible. To enable, add the 'scale-monitor-framebuffer' keyword to the org.gnome.mutter.experimental-features gsettings array. It is still possible to specify the mode via the new D-Bus API, which has been adapted. The adaptations to the D-Bus API means the caller need to be aware of how to position logical monitors on the stage grid. This depends on the 'layout-mode' property that is used (see the DisplayConfig D-Bus documentation). https://bugzilla.gnome.org/show_bug.cgi?id=777732
* monitor-manager: Remove 'scale' from MetaOutputJonas Ådahl2017-04-071-1/+8
| | | | | | | | | | 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
* meta-monitor-config: Pass logical monitor scale via configJonas Ådahl2017-04-071-1/+1
| | | | | | | | | 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
* backends: Refactor MetaScreenDirection guessing into separate functionCarlos Garnacho2017-03-271-0/+40
| | | | | | | Make it a helper MetaLogicalMonitor API, and use it on the MetaMonitorManager. https://bugzilla.gnome.org/show_bug.cgi?id=778119
* monitor-manager: Split logical monitor creationJonas Ådahl2017-03-091-28/+71
| | | | | | | | | Split up logical monitor cration into derived (when derived from current underlying configuration) and non-derived (when creating from a logical monitor configuration). This avoids that type of logic in the logical monitor creation function. https://bugzilla.gnome.org/show_bug.cgi?id=779745
* monitor-tiled: Generate non-tiled monitor modesJonas Ådahl2017-03-091-1/+2
| | | | | | | | Add support for non-tiled monitor modes on tiled monitors. This is done by adding all the other supported modes, except the modes with the same resolution as the tile dimensions. https://bugzilla.gnome.org/show_bug.cgi?id=779745
* logical-monitor: Don't set the CRTC logical monitor if not assignedJonas Ådahl2017-03-091-1/+2
| | | | | | | | | When adding a monitor and all its outputs, don't try to set the logical monitor of the outputs CRTC if none was assigned. This might happen if a tiled monitor only uses a subset of the connectors it are connected via. https://bugzilla.gnome.org/show_bug.cgi?id=779745
* wayland/output: Operate on monitors instead of outputsJonas Ådahl2017-01-251-0/+6
| | | | | | | | Operate on MetaMonitor's instead of MetaOutput's, as the latter may be only a subset of an actual "monitor" when referring to the physical computer equipment. https://bugzilla.gnome.org/show_bug.cgi?id=777732
* logical-monitor: Don't mirror refresh rateJonas Ådahl2017-01-251-1/+0
| | | | | | | Let the callers figure out how to associate a logical monitor with a refresh rate, instead of exposing an arbitrary one. https://bugzilla.gnome.org/show_bug.cgi?id=777732
* logical-monitor: Don't mirror physical dimensionsJonas Ådahl2017-01-251-2/+0
| | | | | | | | Don't try to mirror the physical dimension, since that's a property of one of the monitors, not of the logical monitor. Callers are changed to deal with choosing the monitor to represent the logical monitor. https://bugzilla.gnome.org/show_bug.cgi?id=777732
* logical-monitor: Don't duplicate output listJonas Ådahl2017-01-251-23/+22
| | | | | | Just use the monitor list and the output lists of each monitor. https://bugzilla.gnome.org/show_bug.cgi?id=777732
* monitor-manager: Generate logical monitors from monitorsJonas Ådahl2017-01-251-0/+99
| | | | | | | | Instead of using crtcs and outputs to generate logical monitors, use the ready made monitor abstraction that hides irrelevant things such as monitor tiling etc. https://bugzilla.gnome.org/show_bug.cgi?id=777732
* monitor-manager: Move logical monitor into its own fileJonas Ådahl2017-01-251-0/+36
https://bugzilla.gnome.org/show_bug.cgi?id=777732