Bugfix: If the pointer is outside of the screen when starting, fall back to the first screen (Thanks mxf)

This commit is contained in:
Michael Stapelberg 2009-08-31 20:27:44 +02:00
parent 2b49c6086d
commit 100cc6b717
1 changed files with 3 additions and 2 deletions

View File

@ -422,8 +422,9 @@ int main(int argc, char *argv[], char *env[]) {
i3Screen *screen = get_screen_containing(reply->root_x, reply->root_y); i3Screen *screen = get_screen_containing(reply->root_x, reply->root_y);
if (screen == NULL) { if (screen == NULL) {
LOG("ERROR: No screen at %d x %d\n", reply->root_x, reply->root_y); LOG("ERROR: No screen at %d x %d, starting on the first screen\n",
return 0; reply->root_x, reply->root_y);
screen = TAILQ_FIRST(virtual_screens);
} }
LOG("Starting on %d\n", screen->current_workspace); LOG("Starting on %d\n", screen->current_workspace);