summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/screen.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/screen.c b/src/screen.c
index cfcf2f8..2c36a6b 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -655,18 +655,21 @@ screen_add (int rr_output)
void
screen_del (rp_screen *s)
{
- if (screen_count () == 1)
- {
- hide_screen_windows (s);
- rp_current_screen = NULL;
- }
- else if (s == rp_current_screen)
+ if (s == rp_current_screen)
{
- /*
- * The deleted screen cannot be the current screen anymore,
- * focus the next one.
- */
- screen_remove_current ();
+ if (screen_count () == 1)
+ {
+ hide_screen_windows (s);
+ rp_current_screen = NULL;
+ }
+ else
+ {
+ /*
+ * The deleted screen cannot be the current screen anymore,
+ * focus the next one.
+ */
+ screen_remove_current ();
+ }
}
else
{