Skip to content

[Wayland] Add support for pointer-warp-v1 protocol#795

Open
Sunderland93 wants to merge 4 commits intolinuxmint:masterfrom
Sunderland93:pointer_warp
Open

[Wayland] Add support for pointer-warp-v1 protocol#795
Sunderland93 wants to merge 4 commits intolinuxmint:masterfrom
Sunderland93:pointer_warp

Conversation

@Sunderland93
Copy link
Contributor

Only allow this while an implicit grab is held, so that it is not assumed to be a generic warping mechanism.

Only allow this while an implicit grab is held, so that it is not
assumed to be a generic warping mechanism.
Comment on lines +70 to +71
x < 0 || x > clutter_actor_get_width (CLUTTER_ACTOR (surface_actor)) ||
y < 0 || y > clutter_actor_get_height (CLUTTER_ACTOR (surface_actor)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use coords.x, coords.y here instead of x, y?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using x and y is correct because the bounds check must happen in the surface-local coordinate space, before any transformation is applied.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, you can't can't compare wl_fixed_t this way, you have to extract the value first (with wl_fixed_to_double()) - you could use the values you initialized coords to since this is before the transform below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants