Bugfix: If the pointer is outside of the screen when starting, fall back to the first screen (Thanks mxf)
This commit is contained in:
parent
2b49c6086d
commit
100cc6b717
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue