diff options
author | Zhang, Xiong Y <xiong.y.zhang@intel.com> | 2013-12-13 22:10:51 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-12-16 16:20:51 -0800 |
commit | a4b54c0b791b33bb0f44cd9aacd65f0b530c1b0c (patch) | |
tree | bcd553d0fc7eb5299b0b71cbd963a4928588574b /src/compositor-x11.c | |
parent | f749fc37820ff7339d623b628b5b425f2205d68e (diff) | |
download | weston-a4b54c0b791b33bb0f44cd9aacd65f0b530c1b0c.tar.gz |
compositor: Move the logic of moving outputs into the core
Instead of having the backends move the remaining outputs when one is
destroyed, let the core compositor deal with that.
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-x11.c')
-rw-r--r-- | src/compositor-x11.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 9a36b59d..2ef1b5d7 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -918,24 +918,10 @@ x11_compositor_find_output(struct x11_compositor *c, xcb_window_t window) static void x11_compositor_delete_window(struct x11_compositor *c, xcb_window_t window) { - struct x11_output *deleted_output, *output, *next; - int x_offset = 0; - - deleted_output = x11_compositor_find_output(c, window); - - wl_list_for_each_safe(output, next, &c->base.output_list, base.link) { - if (x_offset != 0) { - weston_output_move(&output->base, - output->base.x - x_offset, - output->base.y); - weston_output_damage(&output->base); - } + struct x11_output *output; - if (output == deleted_output) { - x_offset += output->base.width; - x11_output_destroy(&output->base); - } - } + output = x11_compositor_find_output(c, window); + x11_output_destroy(&output->base); xcb_flush(c->conn); |