From 100cc6b7175c113fe7c274e98b9cdfd66dbb18b1 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 31 Aug 2009 20:27:44 +0200 Subject: [PATCH] Bugfix: If the pointer is outside of the screen when starting, fall back to the first screen (Thanks mxf) --- src/mainx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mainx.c b/src/mainx.c index cde6200d..dd9c9e55 100644 --- a/src/mainx.c +++ b/src/mainx.c @@ -422,8 +422,9 @@ int main(int argc, char *argv[], char *env[]) { i3Screen *screen = get_screen_containing(reply->root_x, reply->root_y); if (screen == NULL) { - LOG("ERROR: No screen at %d x %d\n", reply->root_x, reply->root_y); - return 0; + LOG("ERROR: No screen at %d x %d, starting on the first screen\n", + reply->root_x, reply->root_y); + screen = TAILQ_FIRST(virtual_screens); } LOG("Starting on %d\n", screen->current_workspace); -- 2.39.5