libweston: Update view transforms more often
These places all eventually lead to calling weston_view_to_global_float() or weston_view_from_global_float() on a view with a dirty transform. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
d3b74daabd
commit
d611ab24fd
|
@ -2101,6 +2101,8 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
|
|||
}
|
||||
}
|
||||
|
||||
weston_view_update_transform(shsurf->view);
|
||||
|
||||
if (shsurf->state.fullscreen) {
|
||||
shell_configure_fullscreen(shsurf);
|
||||
} else if (shsurf->state.maximized) {
|
||||
|
@ -2614,6 +2616,11 @@ panel_committed(struct weston_surface *es, int32_t sx, int32_t sy)
|
|||
|
||||
view = container_of(es->views.next, struct weston_view, surface_link);
|
||||
|
||||
/* XXX delete me eventually - it would be better if we didn't get here
|
||||
* with a dirty transform at all, but for now just make sure the
|
||||
* transform is updated here. */
|
||||
weston_view_update_transform(view);
|
||||
|
||||
get_panel_size(shell, view, &width, &height);
|
||||
switch (shell->panel_position) {
|
||||
case WESTON_DESKTOP_SHELL_PANEL_POSITION_TOP:
|
||||
|
|
|
@ -425,6 +425,7 @@ weston_view_create(struct weston_surface *surface)
|
|||
pixman_region32_init(&view->geometry.scissor);
|
||||
pixman_region32_init(&view->transform.boundingbox);
|
||||
view->transform.dirty = 1;
|
||||
weston_view_update_transform(view);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
@ -1961,6 +1962,8 @@ weston_compositor_pick_view(struct weston_compositor *compositor,
|
|||
|
||||
/* Can't use paint node list: occlusion by input regions, not opaque. */
|
||||
wl_list_for_each(view, &compositor->view_list, link) {
|
||||
weston_view_update_transform(view);
|
||||
|
||||
if (!pixman_region32_contains_point(
|
||||
&view->transform.boundingbox, ix, iy, NULL))
|
||||
continue;
|
||||
|
|
|
@ -465,6 +465,7 @@ default_grab_pointer_focus(struct weston_pointer_grab *grab)
|
|||
pointer->x, pointer->y);
|
||||
|
||||
if (view && view == pointer->focus) {
|
||||
weston_view_update_transform(view);
|
||||
weston_view_from_global_fixed(view, pointer->x, pointer->y,
|
||||
&sx, &sy);
|
||||
if (pointer->sx != sx || pointer->sy != sy)
|
||||
|
@ -549,6 +550,7 @@ weston_pointer_send_motion(struct weston_pointer *pointer,
|
|||
weston_pointer_motion_to_abs(pointer, event, &x, &y);
|
||||
old_sx = pointer->sx;
|
||||
old_sy = pointer->sy;
|
||||
weston_view_update_transform(pointer->focus);
|
||||
weston_view_from_global_fixed(pointer->focus, x, y,
|
||||
&pointer->sx, &pointer->sy);
|
||||
}
|
||||
|
@ -3769,6 +3771,7 @@ maybe_enable_pointer_constraint(struct weston_pointer_constraint *constraint)
|
|||
if (!keyboard || keyboard->focus != surface)
|
||||
return;
|
||||
|
||||
weston_view_update_transform(view);
|
||||
/* Postpone constraint if the pointer is not within the
|
||||
* constraint region.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue