On 03/07/2014 10:27 AM, Xiong Zhang wrote:
The geometry for visible views will keep unchanged,
weston_view_set_position() doesn't mark these views
as dirty. So there is no chance for them to reassign output, then
these views will disappear.

Signed-off-by: Xiong Zhang <[email protected]>
---
  desktop-shell/shell.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index fd9ead0..bee1b0b 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -5556,9 +5556,11 @@ shell_reposition_view_on_output_destroy(struct 
weston_view *view)

                x = first_output->x + first_output->width / 4;
                y = first_output->y + first_output->height / 4;
-       }

-       weston_view_set_position(view, x, y);
+               weston_view_set_position(view, x, y);
+       } else
+               weston_view_geometry_dirty(view);
+

So we need that so that view->output will be properly updated. Looks good to me.

Just a comment on our coding style. If we brace one part of an if statement, we brace the other part two.

Cheers,
Ander



        shsurf = get_shell_surface(view->surface);



_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to