mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-11 19:06:33 +00:00
libs: wayland: display: only handle the first output
Right now, all outputs are handled. The means that the registry object for all but the last are leaked. As a result the sizes are not used correctly. With two outputs, at first the mode and physical size of the second output are used. If the first output changes the mode, then the physical size of the second output is used in combination with the resolution of the first output. The resulting pixel aspect ratio is incorrect. There seems to be no way to determine on which output the window is shown, so just use the first one to get consistent results. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/341>
This commit is contained in:
parent
72c4a161c0
commit
4b2f7a188d
1 changed files with 4 additions and 2 deletions
|
@ -122,9 +122,11 @@ registry_handle_global (void *data,
|
||||||
wl_registry_bind (registry, id, &xdg_wm_base_interface, 1);
|
wl_registry_bind (registry, id, &xdg_wm_base_interface, 1);
|
||||||
xdg_wm_base_add_listener (priv->xdg_wm_base, &xdg_wm_base_listener, priv);
|
xdg_wm_base_add_listener (priv->xdg_wm_base, &xdg_wm_base_listener, priv);
|
||||||
} else if (strcmp (interface, "wl_output") == 0) {
|
} else if (strcmp (interface, "wl_output") == 0) {
|
||||||
|
if (!priv->output) {
|
||||||
priv->output = wl_registry_bind (registry, id, &wl_output_interface, 1);
|
priv->output = wl_registry_bind (registry, id, &wl_output_interface, 1);
|
||||||
wl_output_add_listener (priv->output, &output_listener, priv);
|
wl_output_add_listener (priv->output, &output_listener, priv);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_registry_listener registry_listener = {
|
static const struct wl_registry_listener registry_listener = {
|
||||||
|
|
Loading…
Reference in a new issue