summaryrefslogtreecommitdiff
path: root/src/compositor.h
diff options
context:
space:
mode:
authorZhang, Xiong Y <xiong.y.zhang@intel.com>2013-12-13 22:10:57 +0200
committerKristian Høgsberg <krh@bitplanet.net>2013-12-16 17:23:08 -0800
commit31236932a1adb5e8eddd5a769b8a63b814bb4107 (patch)
tree345336ade6397d0f26d2656a2a8990fc1efa0dd4 /src/compositor.h
parent54e90c7e1e20d9d51f516b42b4c846d26a8cfb5e (diff)
downloadweston-31236932a1adb5e8eddd5a769b8a63b814bb4107.tar.gz
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>
Diffstat (limited to 'src/compositor.h')
-rw-r--r--src/compositor.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compositor.h b/src/compositor.h
index d344e37e..f5a0ba42 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -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.