It will get the primary monitor if there is not monitor under the pointer. But
assert so it's clear something went wrong if this does happen. Note that there
was previously no check for the return value even though the comment claimed
there should be.
ob_debug("placing by per-app settings");
/* Find which head the pointer is on */
- if (settings->monitor == 0)
- /* this can return NULL */
+ if (settings->monitor == 0) {
screen = pick_pointer_head(client);
+ g_assert(screen);
+ }
else {
guint m = settings->monitor;
if (m < 1 || m > screen_num_monitors)