diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index e9f74087..d6d307b7 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -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: diff --git a/libweston/compositor.c b/libweston/compositor.c index 69ac2362..ae6b3a98 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -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; diff --git a/libweston/input.c b/libweston/input.c index c84b3803..acd6579d 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -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. */