[PATCH weston 4/8] shell: Use relative layers for lock/unlock
Quentin Glidic
sardemff7+wayland at sardemff7.net
Fri May 17 07:20:40 PDT 2013
From: Quentin Glidic <sardemff7+git at sardemff7.net>
This way, other modules can safely add layers before or after the shell
layers without breaking the list on lock/unlock
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 316cfdc..1ac17c6 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -2503,19 +2503,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));
@@ -2976,12 +2973,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.3
More information about the wayland-devel
mailing list