Skip to content

Commit

Permalink
Remove position correction
Browse files Browse the repository at this point in the history
On multi-monitor setup, this resets the saved coordiates on a secondary display.
  • Loading branch information
tobiolo committed Dec 19, 2024
1 parent 9dfc4fb commit 51fd9ca
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/myframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -695,17 +695,6 @@ struct MyFrame : wxFrame {
sys->cfg->Read(L"resy", &resy, defy);
sys->cfg->Read(L"posx", &posx, boundary + disprect.x);
sys->cfg->Read(L"posy", &posy, boundary + disprect.y);
if (resx > disprect.width || resy > disprect.height || posx < disprect.x ||
posy < disprect.y || posx + resx > disprect.width + disprect.x ||
posy + resy > disprect.height + disprect.y) {
// Screen res has been resized since we last ran, set sizes to default to avoid being
// off-screen.
resx = defx;
resy = defy;
posx = posy = boundary;
posx += disprect.x;
posy += disprect.y;
}
SetSize(resx, resy);
SetPosition(wxPoint(posx, posy));

Expand Down

0 comments on commit 51fd9ca

Please sign in to comment.