Cursor: don't hide while pointer constraint active
Fixes: https://codeberg.org/river/river/issues/1053
This commit is contained in:
parent
e29d66f1de
commit
f66eec9248
@ -769,6 +769,14 @@ fn handleRequestSetCursor(
|
|||||||
|
|
||||||
pub fn hide(cursor: *Cursor) void {
|
pub fn hide(cursor: *Cursor) void {
|
||||||
if (cursor.pressed_count > 0) return;
|
if (cursor.pressed_count > 0) return;
|
||||||
|
|
||||||
|
// Hiding the cursor and sending wl_pointer.leave whlie a pointer constraint
|
||||||
|
// is active does not make much sense. In particular, doing so seems to interact
|
||||||
|
// poorly with Xwayland's pointer constraints implementation.
|
||||||
|
if (cursor.constraint) |constraint| {
|
||||||
|
if (constraint.state == .active) return;
|
||||||
|
}
|
||||||
|
|
||||||
cursor.hidden = true;
|
cursor.hidden = true;
|
||||||
cursor.wlr_cursor.unsetImage();
|
cursor.wlr_cursor.unsetImage();
|
||||||
cursor.xcursor_name = null;
|
cursor.xcursor_name = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user