diff --git a/fvwm/icons.c b/fvwm/icons.c index 676229522..ab427706f 100644 --- a/fvwm/icons.c +++ b/fvwm/icons.c @@ -1812,8 +1812,16 @@ void AutoPlaceIcon( break; } /* get the screen dimensions for the icon box */ - FScreenGetScrRect(fscr, FSCREEN_CURRENT, + if (strcmp(icon_boxes_ptr->IconScreen, "global") == 0) { + ref.x = 0; + ref.y = 0; + ref.width = monitor_get_all_widths(); + ref.height = monitor_get_all_heights(); + } else { + fscr->name = icon_boxes_ptr->IconScreen; + FScreenGetScrRect(fscr, FSCREEN_BY_NAME, &ref.x, &ref.y, &ref.width, &ref.height); + } dim[1].screen_offset = ref.y; dim[1].screen_dimension = ref.height; dim[2].screen_offset = ref.x;