Skip to content

wayland: fix mouse ungrab in server mode

Michael Scherle requested to merge z0Kng/spice-gtk:mouse_ungrab into master

In remote-viewer when pressing shift+12 the mouse should be ungrabed. However, it's not working under wayland if SPICE_MOUSE_MODE_SERVER is used. The problem seems to be that remote-viewer fist ungrabs the keyboardtry_keyboard_ungrab and then the mouse try_mouse_ungrab. Due to what, I assume, is an error in ungrab_pointer in spice-widget.c

if (d->mouse_mode == SPICE_MOUSE_MODE_SERVER) {
    spice_wayland_extensions_disable_relative_pointer(widget);
    spice_wayland_extensions_unlock_pointer(widget);
}

never gets called if the keyboard is already ungrabed.

Related issue: #185 but I now created it as a merge request since my account is now unlocked.

Probably related issues from virt-viewer: https://gitlab.com/virt-viewer/virt-viewer/-/issues/140, https://gitlab.com/virt-viewer/virt-viewer/-/issues/132

Merge request reports

Loading