summaryrefslogtreecommitdiff
path: root/desktop-shell/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-shell/shell.c')
-rw-r--r--desktop-shell/shell.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index f72c248a..13ad7f6a 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2305,15 +2305,8 @@ surface_start_inhibiting_notify(struct wl_listener *listener, void *data)
wl_container_of(listener, shsurf, start_inhibiting_listener);
struct weston_surface *surface =
weston_desktop_surface_get_surface(shsurf->desktop_surface);
- struct weston_compositor *compositor = shsurf->shell->compositor;
- if (compositor->state == WESTON_COMPOSITOR_IDLE
- || compositor->state == WESTON_COMPOSITOR_OFFSCREEN
- || compositor->state == WESTON_COMPOSITOR_SLEEPING)
- {
- surface->inhibit_idling = false;
- shell_fade(shsurf->shell, FADE_OUT);
- }
+ surface->inhibit_idling = true;
}
static void
@@ -2323,8 +2316,15 @@ surface_stop_inhibiting_notify(struct wl_listener *listener, void *data)
wl_container_of(listener, shsurf, stop_inhibiting_listener);
struct weston_surface *surface =
weston_desktop_surface_get_surface(shsurf->desktop_surface);
+ struct weston_compositor *compositor = shsurf->shell->compositor;
- surface->inhibit_idling = true;
+ if (compositor->state == WESTON_COMPOSITOR_IDLE
+ || compositor->state == WESTON_COMPOSITOR_OFFSCREEN
+ || compositor->state == WESTON_COMPOSITOR_SLEEPING)
+ {
+ surface->inhibit_idling = false;
+ shell_fade(shsurf->shell, FADE_OUT);
+ }
}
static void