mirror of
https://github.com/brl/mutter.git
synced 2025-07-21 09:06:55 +00:00
output: Tie the output to the monitor it's part of
Outputs correspond to active connectors, that we translate into monitors. Make this association more real by adding a pointer back to the monitor from the output. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>
This commit is contained in:
@ -45,6 +45,8 @@ typedef struct _MetaOutputPrivate
|
||||
|
||||
MetaOutputInfo *info;
|
||||
|
||||
MetaMonitor *monitor;
|
||||
|
||||
/* The CRTC driving this output, NULL if the output is not enabled */
|
||||
MetaCrtc *crtc;
|
||||
|
||||
@ -112,6 +114,27 @@ meta_output_get_gpu (MetaOutput *output)
|
||||
return priv->gpu;
|
||||
}
|
||||
|
||||
MetaMonitor *
|
||||
meta_output_get_monitor (MetaOutput *output)
|
||||
{
|
||||
MetaOutputPrivate *priv = meta_output_get_instance_private (output);
|
||||
|
||||
g_warn_if_fail (priv->monitor);
|
||||
|
||||
return priv->monitor;
|
||||
}
|
||||
|
||||
void
|
||||
meta_output_set_monitor (MetaOutput *output,
|
||||
MetaMonitor *monitor)
|
||||
{
|
||||
MetaOutputPrivate *priv = meta_output_get_instance_private (output);
|
||||
|
||||
g_warn_if_fail (!priv->monitor);
|
||||
|
||||
priv->monitor = monitor;
|
||||
}
|
||||
|
||||
const char *
|
||||
meta_output_get_name (MetaOutput *output)
|
||||
{
|
||||
|
Reference in New Issue
Block a user