mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-29 07:58:01 -04:00
wayland: register xdg-output interface on pre-existing output objects
The XDG output manager object may arrive *after* output objects. In this case, we need to register the pre-existing output objects with the XDG output manager. This fixes an issue with some monitors having a DPI value of 0 on Gnome/mutter, which resulted in incorrect font sizes.
This commit is contained in:
parent
bb8d9378c9
commit
f2c59f8608
1 changed files with 7 additions and 0 deletions
|
|
@ -796,6 +796,13 @@ handle_global(void *data, struct wl_registry *registry,
|
||||||
wayl->xdg_output_manager = wl_registry_bind(
|
wayl->xdg_output_manager = wl_registry_bind(
|
||||||
wayl->registry, name, &zxdg_output_manager_v1_interface,
|
wayl->registry, name, &zxdg_output_manager_v1_interface,
|
||||||
min(version, 2));
|
min(version, 2));
|
||||||
|
|
||||||
|
tll_foreach(wayl->monitors, it) {
|
||||||
|
struct monitor *mon = &it->item;
|
||||||
|
mon->xdg = zxdg_output_manager_v1_get_xdg_output(
|
||||||
|
wayl->xdg_output_manager, mon->output);
|
||||||
|
zxdg_output_v1_add_listener(mon->xdg, &xdg_output_listener, mon);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (strcmp(interface, wl_output_interface.name) == 0) {
|
else if (strcmp(interface, wl_output_interface.name) == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue