[PATCH weston] shell: Use relative layers for lock/unlock

Quentin Glidic sardemff7+wayland at sardemff7.net
Sun May 12 01:53:57 PDT 2013


From: Quentin Glidic <sardemff7+git at sardemff7.net>

Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
 src/shell.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index 135eaa5..456e911 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -2501,19 +2501,16 @@ resume_desktop(struct desktop_shell *shell)
 
 	terminate_screensaver(shell);
 
-	wl_list_remove(&shell->lock_layer.link);
-	wl_list_insert(&shell->compositor->cursor_layer.link,
+	wl_list_insert(&shell->lock_layer.link,
 		       &shell->fullscreen_layer.link);
+	wl_list_remove(&shell->lock_layer.link);
 	wl_list_insert(&shell->fullscreen_layer.link,
 		       &shell->panel_layer.link);
-	if (shell->showing_input_panels) {
+	wl_list_insert(&shell->panel_layer.link,
+		       &ws->layer.link);
+	if (shell->showing_input_panels)
 		wl_list_insert(&shell->panel_layer.link,
 			       &shell->input_panel_layer.link);
-		wl_list_insert(&shell->input_panel_layer.link,
-			       &ws->layer.link);
-	} else {
-		wl_list_insert(&shell->panel_layer.link, &ws->layer.link);
-	}
 
 	restore_focus_state(shell, get_current_workspace(shell));
 
@@ -2983,12 +2980,12 @@ lock(struct desktop_shell *shell)
 	 * input events while we are locked. */
 
 	wl_list_remove(&shell->panel_layer.link);
-	wl_list_remove(&shell->fullscreen_layer.link);
 	if (shell->showing_input_panels)
 		wl_list_remove(&shell->input_panel_layer.link);
 	wl_list_remove(&ws->layer.link);
-	wl_list_insert(&shell->compositor->cursor_layer.link,
+	wl_list_insert(&shell->fullscreen_layer.link,
 		       &shell->lock_layer.link);
+	wl_list_remove(&shell->fullscreen_layer.link);
 
 	launch_screensaver(shell);
 
-- 
1.8.2.1



More information about the wayland-devel mailing list