screen_pointer_pos(&px, &py);
for (i = 0; i < screen_num_monitors; i++) {
- Rect *monitor = screen_physical_area_monitor(i);
+ Rect const *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", i);
static GSList* area_add(GSList *list, Rect *a)
{
- Rect *r = g_new(Rect, 1);
+ Rect *r = g_slice_new(Rect);
*r = *a;
return g_slist_prepend(list, r);
}
}
/* 'r' is not being added to the result list, so free it */
- g_free(r);
+ g_slice_free(Rect, r);
}
}
g_slist_free(list);
}
while (spaces) {
- g_free(spaces->data);
+ g_slice_free(Rect, spaces->data);
spaces = g_slist_delete_link(spaces, spaces);
}
}