From 3c38171fde2e134f93eef137d7a816338e6fd0f2 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 16 Sep 2003 06:59:48 +0000 Subject: [PATCH] fallback when nothing is focused and we switch desktops! --- openbox/screen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openbox/screen.c b/openbox/screen.c index e5640256..1295ccaa 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -434,6 +434,9 @@ void screen_set_desktop(guint num) frame_hide(c->frame); } } + + if (!focus_client) + focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS); } static void get_row_col(guint d, guint *r, guint *c) @@ -725,7 +728,7 @@ void screen_update_layout() if (rows * cols >= screen_num_desktops + cols) rows--; } else if (rows == 0) { - rows = screen_num_desktops / rows; + rows = screen_num_desktops / cols; if (cols * rows < screen_num_desktops) rows++; if (cols * rows >= screen_num_desktops + rows) -- 2.45.2