Skip to content

Commit

Permalink
screenx and screeny should only consider width and height
Browse files Browse the repository at this point in the history
On a multi head display, screen can be positioned on e.g. x pos 1000 and have
width of 1000 which makes screenx 0. This makes defx negative.
  • Loading branch information
tobiolo committed Nov 5, 2024
1 parent 6e9b297 commit 712a608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/myframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,8 @@ struct MyFrame : wxFrame {

int display_id = wxDisplay::GetFromWindow(this);
wxRect disprect = wxDisplay(display_id == wxNOT_FOUND ? 0 : display_id).GetClientArea();
const int screenx = disprect.width - disprect.x;
const int screeny = disprect.height - disprect.y;
const int screenx = disprect.width;
const int screeny = disprect.height;

const int boundary = 64;
const int defx = screenx - 2 * boundary;
Expand Down

0 comments on commit 712a608

Please sign in to comment.