Avoid private Qt usage : expose lastInputSerial / lastInputDevice from QtWayland
Open, Needs TriagePublic

Description

Fixes appmenu private usage

davidedmundson assigned this task to davidre.
davidre added a comment.EditedMar 5 2022, 8:23 PM

kwayland-integration to get a seat for a window:

auto seat = waylandWindow ? waylandWindow->display()->defaultInputDevice()->wl_seat() : nullptr;

I guess that would be also available via nativeResource* or a future NativeInterface.

Also fetch the he serial

return waylandWindow->display()->lastInputSerial();

plasma-workspace/appmenu:

const auto device = waylandWindow->display()->currentInputDevice();
waylandWindow->display()->setLastInputDevice(device, device->pointer()->mEnterSerial, waylandWindow);

to force Qt into creating a XdgPopup

Native resources used:

wl_display
wl_seat
wl_surface

layer-shell qt
wl_output from a QScreen

I remember also once wanting to access xdg_surface which you can do in Qt6 but what I can't remember in which context