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_type == OB_APP_SETTINGS_MONITOR_PRIMARY) {
+ guint m = screen_monitor_primary(TRUE);
+ screen = screen_area(client->desktop, m, NULL);
+ }
+ else if (settings->monitor_type == OB_APP_SETTINGS_MONITOR_ACTIVE) {
+ guint m = screen_monitor_active();
+ screen = screen_area(client->desktop, m, NULL);
+ }
+ else if (settings->monitor_type == OB_APP_SETTINGS_MONITOR_MOUSE) {
screen = pick_pointer_head(client);
+ g_assert(screen);
+ }
else {
guint m = settings->monitor;
if (m < 1 || m > screen_num_monitors)