desktop-shell: Invalidate saved position when output is destroyed
If the saved position for a fullscreen or maximized output view is in an output that has been unplugged, the coordinates don't make sense anymore. In that case, invalidate them and use the initial position algorithm when changing them back to the basic state. Signed-off-by: Zhang, Xiong Y <xiong.y.zhang@intel.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
54e90c7e1e
commit
31236932a1
@@ -409,6 +409,9 @@ weston_view_output_destroy_handler(struct wl_listener *listener,
|
||||
}
|
||||
|
||||
weston_view_set_position(ev, x, y);
|
||||
|
||||
if (ev->surface->output_destroyed)
|
||||
ev->surface->output_destroyed(ev->surface);
|
||||
}
|
||||
|
||||
WL_EXPORT struct weston_view *
|
||||
|
||||
@@ -885,6 +885,12 @@ struct weston_surface {
|
||||
void (*configure)(struct weston_surface *es, int32_t sx, int32_t sy);
|
||||
void *configure_private;
|
||||
|
||||
/* If non-NULL, this function will be called on surface->output::
|
||||
* destroy, after the output is removed from the compositor's
|
||||
* output list and the remaining outputs moved.
|
||||
*/
|
||||
void (*output_destroyed)(struct weston_surface *surface);
|
||||
|
||||
/* Parent's list of its sub-surfaces, weston_subsurface:parent_link.
|
||||
* Contains also the parent itself as a dummy weston_subsurface,
|
||||
* if the list is not empty.
|
||||
|
||||
Reference in New Issue
Block a user