From: Michael Stapelberg Date: Mon, 31 Aug 2009 18:27:44 +0000 (+0200) Subject: Bugfix: If the pointer is outside of the screen when starting, fall back to the first... X-Git-Tag: 3.d~112 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=100cc6b7175c113fe7c274e98b9cdfd66dbb18b1;p=i3%2Fi3 Bugfix: If the pointer is outside of the screen when starting, fall back to the first screen (Thanks mxf) --- 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);