]> Dogcows Code - chaz/openbox/commitdiff
it would seem this cannot return NULL now
authorDana Jansens <danakj@orodu.net>
Fri, 14 Oct 2011 22:52:36 +0000 (18:52 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 16 Oct 2011 22:51:51 +0000 (18:51 -0400)
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.

openbox/place.c

index d56adfc89005e4627b54df5adf9947b594fc51b1..a13bc2cbdbff41cdc7e3fe27994ad4ea4656e56a 100644 (file)
@@ -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)
This page took 0.024784 seconds and 4 git commands to generate.