Skip to content

Commit

Permalink
IconBox: reference screen correctly
Browse files Browse the repository at this point in the history
When the IconBox style is used to specify a particular screen, use the
existing API to reference that screen.

Fixes #40
  • Loading branch information
ThomasAdam committed Jun 7, 2020
1 parent ee5eae8 commit 5e46f4c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fvwm/icons.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e46f4c

Please sign in to comment.