wl_pointer.frame events sent incorrectly on X11
The wl_pointer.button
event doesn't get a corresponding frame. Together with something that looks like a GTK oversight, this results in events arriving 1 event late, when tested in phoc-over-X.
WAYLAND_DEBUG=1 yad --gdk-debug=events --color
- Move cursor over the Cancel button
- Click-release without moving the pointer (the button receives down-event, changes colors)
- Move the mouse (the application receives release-event, closes)
The log doesn't capture application-level events, but it shows that GTK inserts fake frames, and that's why the down-event appears at all.
@guido.gunther could you confirm that this happens? I would guess you'd have seen it long ago, so I'm questioning my sanity right now.
[108097.929] wl_pointer@3.frame()
Gdk-Message: 19:15:24.118: frame, seat 0x55d6d8a12040
[108989.266] wl_pointer@3.button(376, 301324768, 272, 1)
Gdk-Message: 19:15:25.010: button 1 press, seat 0x55d6d8a12040 state 0
[109149.843] wl_pointer@3.button(377, 301324932, 272, 0)
Gdk-Message: 19:15:25.170: button 1 release, seat 0x55d6d8a12040 state 256
[109156.498] -> wl_surface@25.attach(wl_buffer@34, 0, 0)
[109156.586] -> wl_surface@25.set_buffer_scale(1)
[109156.606] -> wl_surface@25.damage(2, 37, 178, 178)
[109156.660] -> wl_surface@25.damage(511, 467, 91, 34)
[109156.711] -> xdg_toplevel@27.set_min_size(692, 289)
[109156.739] -> xdg_toplevel@27.set_max_size(0, 0)
[109156.771] -> xdg_surface@26.set_window_geometry(0, 0, 692, 501)
[109156.860] -> wl_surface@25.frame(new id wl_callback@31)
[109156.893] -> wl_surface@25.commit()
[109157.371] wl_buffer@34.release()
[109169.518] wl_display@1.delete_id(31)
[109169.546] wl_callback@31.done(301324953)
Gdk-Message: 19:15:25.190: frame 0x55d6d89ee330