Closed Bug 1466015 Opened 5 years ago Closed 2 years ago

[wayland] duplicate seat registration / keyboard events

Categories

(Core :: Widget: Gtk, defect, P5)

60 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1706624

People

(Reporter: mzfhrobnzmnq.f, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180525140700

Steps to reproduce:

This is more a nitpick than a bug (or rather, made me notice we don't send events to all seats in https://github.com/swaywm/wlroots ), but firefox seems to register to wl_seat twice for some reason with two keyboards and one pointer.

Starting firefox with WAYLAND_DEBUG=1 shows this.


Actual results:

[1920287.748]  -> wl_registry@2.bind(11, "wl_seat", 5, new id [unknown]@9)
[1920290.544]  -> wl_data_device_manager@6.get_data_device(new id wl_data_device@11, wl_seat@9)
[1920291.297] wl_seat@9.capabilities(3)
[1920291.301]  -> wl_seat@9.get_pointer(new id wl_pointer@3)
[1920291.324]  -> wl_seat@9.get_keyboard(new id wl_keyboard@16)
[1920291.342] wl_seat@9.name("default")
[1920360.141] wl_keyboard@16.repeat_info(40, 400)
[1920360.147] wl_keyboard@16.keymap(1, fd 35, 48409)
[1920363.196] wl_registry@13.global(11, "wl_seat", 5)
[1920363.204]  -> wl_registry@13.bind(11, "wl_seat", 1, new id [unknown]@19)
[1920363.452] wl_seat@19.capabilities(3)
[1920363.470]  -> wl_seat@19.get_keyboard(new id wl_keyboard@20)
[1920363.481]  -> wl_data_device_manager@18.get_data_device(new id wl_data_device@17, wl_seat@19)
[1920363.617] wl_keyboard@20.keymap(1, fd 35, 48409)
...
[1927724.557] wl_keyboard@20.modifiers(63, 0, 0, 0, 0)
[1927724.566] wl_keyboard@20.enter(63, wl_surface@40, array)
[1927724.572] wl_keyboard@16.modifiers(63, 0, 0, 0, 0)
[1927724.608] wl_keyboard@16.enter(63, wl_surface@40, array)
..
[1930557.768] wl_keyboard@20.key(72, 83125, 50, 1)
[1930557.881] wl_keyboard@16.key(72, 83125, 50, 1)
[1930753.905] wl_keyboard@20.key(73, 83321, 50, 0)
[1930753.983] wl_keyboard@16.key(73, 83321, 50, 0)
[1930937.010] wl_keyboard@20.key(74, 83504, 24, 1)
[1930937.105] wl_keyboard@16.key(74, 83504, 24, 1)
[1931013.276] wl_keyboard@20.key(75, 83580, 24, 0)
[1931013.358] wl_keyboard@16.key(75, 83580, 24, 0)
..


Expected results:

Probably should set up hooks on the first wl_keyboard instead of creating a new one, if possible.


On a similar topic, I see many calls to wl_display.get_registry that are used for a single wl_registry.wl_subcompositor ; this works but leaks memory everytime so it might be better to keep a reference around to the registry.
Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Should be fixed by bug 1706624

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.