]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: If the pointer is outside of the screen when starting, fall back to the first...
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 31 Aug 2009 18:27:44 +0000 (20:27 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 31 Aug 2009 18:27:44 +0000 (20:27 +0200)
src/mainx.c

index cde6200d7c92265917aeb87052a4550b999b1f2c..dd9c9e556a8386adc26c53e3b106a57cbc1f2e84 100644 (file)
@@ -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);