diff options
author | Mathieu OTHACEHE <m.othacehe@gmail.com> | 2016-12-28 14:41:25 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2016-12-28 20:46:38 +0100 |
commit | 2bda8bc2933dc3be318fbb7d1e290cd6ff4b1262 (patch) | |
tree | ab8250feb65299beebb32f5e998c6b50c1778b4f | |
parent | 399bdf758d11bc812ff958bfacba9720f3d95d84 (diff) | |
download | ratpoison-2bda8bc2933dc3be318fbb7d1e290cd6ff4b1262.zip |
screen: rewrite screen_del conditions
Rewrite screen_del conditional imbrications for a better readability.
No functional changes here.
-rw-r--r-- | src/screen.c | 25 |
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 { |