Commits on Source (8)
-
Make this into its own function so we can use it for sanity checks later. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
e2e0a733 -
Not all callers of weston_pointer_set_focus use weston_compositor_pick_view to get their coordinate, so let's log something if the coordinate doesn't make sense. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2995bc98 -
0, 0 doesn't make much sense, since we're not warping the cursor. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
fe0292d2 -
We're always passing pointer->x, y converted to surface coordinates, or garbage if view is NULL. Let's just stop passing those coordinates entirely and calculate them in the function. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
eed00f67 -
sx and sy are meaningless (-1000000) when view is NULL. The case this is meant to catch is when the surface coordinates change while the global coordinate doesn't, (eg: max/unmax a window with a keyboard shortcut) - in that case view will always be set. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
9409ce70 -
Sometimes callers don't want them, and sometimes (when view is NULL) the coordinate is invalid. Waste a tiny bit of time calculating them as needed in the callers instead. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
4d141a78 -
Whether these coordinates are "invalid" (set to an unlikely sentinel value) or not is based purely on whether pointer->view is valid. Check pointer->view before using these values every time, and stop using an "invalid" value entirely. The reason for this is that in the future we're reworking how 2D coordinates are handled, and removing the dubious conecept of an invalid coordinate simplifies things a little. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
9b5a525a -
We're just going to crash at weston_view_from_global_fixed() anyway if this is untrue, but we have a similar assertion elsewhere already. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
de306e46