mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
monitor: Add API to compare with old instance
When monitors changed, previous monitor instances are defunct, and any reference holder should drop its reference. Sometimes they will want to continue having a reference to the same monitor, so add this function to make it possible to find it. Currently the output and crtc references are invalid, as they are not yet reference counted, so this can only look at cached fields. https://bugzilla.gnome.org/show_bug.cgi?id=784199
This commit is contained in:
parent
3005a400ca
commit
3ce3a5a952
@ -248,6 +248,18 @@ meta_monitor_is_laptop_panel (MetaMonitor *monitor)
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_monitor_is_same_as (MetaMonitor *monitor,
|
||||
MetaMonitor *other_monitor)
|
||||
{
|
||||
MetaMonitorPrivate *priv =
|
||||
meta_monitor_get_instance_private (monitor);
|
||||
MetaMonitorPrivate *other_priv =
|
||||
meta_monitor_get_instance_private (other_monitor);
|
||||
|
||||
return priv->winsys_id == other_priv->winsys_id;
|
||||
}
|
||||
|
||||
void
|
||||
meta_monitor_get_current_resolution (MetaMonitor *monitor,
|
||||
int *width,
|
||||
|
@ -111,6 +111,9 @@ gboolean meta_monitor_is_underscanning (MetaMonitor *monitor);
|
||||
|
||||
gboolean meta_monitor_is_laptop_panel (MetaMonitor *monitor);
|
||||
|
||||
gboolean meta_monitor_is_same_as (MetaMonitor *monitor,
|
||||
MetaMonitor *other_monitor);
|
||||
|
||||
GList * meta_monitor_get_outputs (MetaMonitor *monitor);
|
||||
|
||||
void meta_monitor_get_current_resolution (MetaMonitor *monitor,
|
||||
|
Loading…
Reference in New Issue
Block a user