mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 18:09:49 +01:00
pointer-constraints-v1: add cursor_hint.enabled
This allows compositors to check whether the cursor hint is set.
This commit is contained in:
parent
df27b29d49
commit
85f44f3684
2 changed files with 2 additions and 0 deletions
|
@ -33,6 +33,7 @@ struct wlr_pointer_constraint_v1_state {
|
|||
|
||||
// only valid for locked_pointer
|
||||
struct {
|
||||
bool enabled;
|
||||
double x, y;
|
||||
} cursor_hint;
|
||||
};
|
||||
|
|
|
@ -97,6 +97,7 @@ static void pointer_constraint_set_cursor_position_hint(struct wl_client *client
|
|||
return;
|
||||
}
|
||||
|
||||
constraint->pending.cursor_hint.enabled = true;
|
||||
constraint->pending.cursor_hint.x = wl_fixed_to_double(x);
|
||||
constraint->pending.cursor_hint.y = wl_fixed_to_double(y);
|
||||
constraint->pending.committed |= WLR_POINTER_CONSTRAINT_V1_STATE_CURSOR_HINT;
|
||||
|
|
Loading…
Reference in a new issue