summaryrefslogtreecommitdiff
path: root/openbox/place.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2011-10-14 18:52:36 -0400
committerDana Jansens <danakj@orodu.net>2011-10-16 18:51:51 -0400
commit332280daf9a4bc410544ae7d267092a11ab8c945 (patch)
tree55dbf24bb985d23fea6456ccf6495b4ae103de62 /openbox/place.c
parentb1039d6142865e3141c831ce75cd9799ce3ceab7 (diff)
it would seem this cannot return NULL now
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.
Diffstat (limited to 'openbox/place.c')
-rw-r--r--openbox/place.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbox/place.c b/openbox/place.c
index d56adfc8..a13bc2cb 100644
--- a/openbox/place.c
+++ b/openbox/place.c
@@ -451,9 +451,10 @@ static gboolean place_per_app_setting(ObClient *client, gint *x, gint *y,
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)