mirror of
https://github.com/brl/mutter.git
synced 2025-07-14 22:30:29 +00:00
virtual-monitor: Add way to change virtual monitor mode
This can be used to change the size of the virtual monitor without recreating it. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2270>
This commit is contained in:
@ -541,3 +541,21 @@ meta_tile_info_equal (MetaTileInfo *a,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
meta_output_update_modes (MetaOutput *output,
|
||||
MetaCrtcMode *preferred_mode,
|
||||
MetaCrtcMode **modes,
|
||||
int n_modes)
|
||||
{
|
||||
MetaOutputPrivate *priv = meta_output_get_instance_private (output);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < priv->info->n_modes; i++)
|
||||
g_object_unref (priv->info->modes[i]);
|
||||
g_free (priv->info->modes);
|
||||
|
||||
priv->info->preferred_mode = preferred_mode;
|
||||
priv->info->modes = modes;
|
||||
priv->info->n_modes = n_modes;
|
||||
}
|
||||
|
Reference in New Issue
Block a user