Skip to content

Commit

Permalink
Remove some checks leading to default values
Browse files Browse the repository at this point in the history
Large TreeSheets window on a secondary screen satisifes
`posx + resx > disprect.width + disprect.x` on X11
because `disprect` only refers to the primary screen.

Example:
```
(gdb) p posx
$6 = 2688
(gdb) p resx
$7 = 2432
(gdb) p disprect.width
$8 = 2560
(gdb) p disprect.x
$9 = 0
```
  • Loading branch information
tobiolo committed Dec 19, 2024
1 parent 9dfc4fb commit fed9829
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/myframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,7 @@ struct MyFrame : wxFrame {
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) {
posy < disprect.y) {
// Screen res has been resized since we last ran, set sizes to default to avoid being
// off-screen.
resx = defx;
Expand Down

0 comments on commit fed9829

Please sign in to comment.