X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fplace.c;h=2d14f5bd30ed9c7b54779aff2d59308fdfb42f1f;hb=9586e3bf1482a30e29f230a1a987386fcdcec2c9;hp=661226aeec05aaf71f9ea6d42b0cc7a312d5117d;hpb=7a6a516b8e3d8ad6b15379eabf6652a6f43eab27;p=chaz%2Fopenbox diff --git a/openbox/place.c b/openbox/place.c index 661226ae..2d14f5bd 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -45,10 +45,12 @@ static Rect *pick_pointer_head(ObClient *c) screen_pointer_pos(&px, &py); - for (i = 0; i < screen_num_monitors; ++i) { - if (RECT_CONTAINS(*screen_physical_area_monitor(i), px, py)) { + for (i = 0; i < screen_num_monitors; ++i) { + Rect *monitor = screen_physical_area_monitor(i); + gboolean contain = RECT_CONTAINS(*monitor, px, py); + g_free(monitor); + if (contain) return screen_area_monitor(c->desktop, i, NULL); - } } g_assert_not_reached(); } @@ -111,7 +113,10 @@ static Rect **pick_head(ObClient *c) screen_pointer_pos(&px, &py); for (i = 0; i < screen_num_monitors; i++) - if (RECT_CONTAINS(*screen_physical_area_monitor(i), px, py)) { + Rect *monitor = screen_physical_area_monitor(i); + gboolean contain = RECT_CONTAINS(*monitor, px, py); + g_free(monitor); + if (contain) add_choice(choice, i); ob_debug("placement adding choice %d for mouse pointer\n", i); break;