main window positioned off-screen on startup
|Reported by:||blakew||Owned by:|
The Padre main window wasn't appearing on my desktop although running normally. Minimizing/maximizing from the tray didn't work.
I found that the fields main_top and main_left in the host_config table in config.db were set to arbitrary negative numbers (-320000 I think) - changing these to sane numbers (0) positioned the frame as expected and solved the problem. I don't know what caused the problem.
A patch is attached which adds an additional check in Padre/Wx/Main?.pm - apparently the inherited wxwidgets method IsShownOnScreen? doesn't have this check. With this the frame is restored to the center of the screen and the database updates the proper values.
I've also found applying really large numbers in main_top and main_left cause the same issue, which won't be caught with this patch as I don't know how to access the screen dimensions.
Wx Version=(0.96) wxWidgets 2.8.10 unicode=(1)
Wx::Demo - ok
Strawberry Perl 5.10.1 (Windows XP 32-bit)