summaryrefslogtreecommitdiff
path: root/clients/desktop-shell.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-11-15 16:39:55 -0500
committerKristian Høgsberg <krh@bitplanet.net>2011-11-15 16:43:25 -0500
commit1ec0c3159621afc473d0eb5d267f4d3cb844830e (patch)
treea396d89a756992953d18267201baf7a21b64e94f /clients/desktop-shell.c
parentbfbb26bdb2da32a5753133ef3692291da8aa440f (diff)
compositor: Hide surfaces by setting surface->output to NULL
This way we can still use surface->link when a surface is not in the main compositor surface list and don't need the hidden_surface wrapper object. Also, setting surface->output to NULL will block the surface frame callback until we put the surface back into the main list. This has the effect of blocking animations while a surface isn't visible.
Diffstat (limited to 'clients/desktop-shell.c')
-rw-r--r--clients/desktop-shell.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index 2ba4fcd..adf3a5c 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -398,8 +398,9 @@ unlock_dialog_item_focus_handler(struct window *window,
}
static struct unlock_dialog *
-unlock_dialog_create(struct display *display)
+unlock_dialog_create(struct desktop *desktop)
{
+ struct display *display = desktop->display;
struct unlock_dialog *dialog;
dialog = malloc(sizeof *dialog);
@@ -419,6 +420,9 @@ unlock_dialog_create(struct display *display)
unlock_dialog_item_focus_handler);
dialog->button = window_add_item(dialog->window, NULL);
+ desktop_shell_set_lock_surface(desktop->shell,
+ window_get_wl_surface(dialog->window));
+
unlock_dialog_draw(dialog);
return dialog;
@@ -467,13 +471,9 @@ desktop_shell_prepare_lock_surface(void *data,
struct desktop *desktop = data;
if (!desktop->unlock_dialog) {
- desktop->unlock_dialog =
- unlock_dialog_create(desktop->display);
+ desktop->unlock_dialog = unlock_dialog_create(desktop);
desktop->unlock_dialog->desktop = desktop;
}
-
- desktop_shell_set_lock_surface(desktop_shell,
- window_get_wl_surface(desktop->unlock_dialog->window));
}
static const struct desktop_shell_listener listener = {