TheInfiniteKind / moneydance_open

16 stars 12 forks source link

Validate saved screen locations before opening frames/dialogs and prevent 'screen freezing' #79

Closed yogi1967 closed 2 years ago

yogi1967 commented 2 years ago

This happens daily when saved locations are 'off screen'. Will fix many user issues. Especially with reconcile and split windows.

You probably know that many users (almost daily) get stuck with MD ‘freezing’ when they try to enter splits or reconcile.. What has happened is that the popup window saved settings are offscreen so they cannot see the window. I would like to propose an easy fix, which would reduce the number of support tickets that get raised….

Enhance your SecondaryFrame and SecondaryDialog .loadSizeAndLocation() methods with a check something like this: virtualBounds = Rectangle(0, 0, 0, 0) ge = GraphicsEnvironment.getLocalGraphicsEnvironment()
lstGDs = ge.getScreenDevices()
for gd in lstGDs: virtualBounds.add(gd.getDefaultConfiguration().getBounds()) Grab the saved location. Then if loc.x > virtualBounds.width or loc.y > virtualBounds.height: ** reset loc to zero, zero

As you might expect, Toolbox now detects for this and will offer the user a chance to reset. Be great if std MD validates upfront.

yogi1967 commented 2 years ago

Fixed in 4073 - thanks!