[PATCH v2] shell: Fix crash when an input panel is hiding

Jan Arne Petersen jpetersen at openismus.com
Mon Sep 24 05:50:39 PDT 2012


From: Jan Arne Petersen <jpetersen at openismus.com>

Do not unset the output of the input panel surfaces when hiding.
---
 src/shell.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/shell.c b/src/shell.c
index 2afa1b3..10b9822 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -2782,8 +2782,13 @@ hide_input_panels(struct wl_listener *listener, void *data)
 	wl_list_remove(&shell->input_panel_layer.link);
 
 	wl_list_for_each_safe(surface, next,
-			      &shell->input_panel_layer.surface_list, layer_link)
+			      &shell->input_panel_layer.surface_list, layer_link) {
+		/* Unmap surface but restore old output which was set in
+		 * input_panel_set_surface */
+		struct weston_output *output = surface->output;
 		weston_surface_unmap(surface);
+		surface->output = output;
+	}
 }
 
 static void
-- 
1.7.11.4



More information about the wayland-devel mailing list