GNOME Bugzilla – Bug 796256
Main Window stays hidden when starting after closing main window while minimized
Last modified: 2018-06-30 00:10:33 UTC
Created attachment 372209 [details] Original Bad .gcm Windows 10 1803. While testing 3.1-3 Version: 3.1 Build ID: 3.0-118-gd2ef5fd0f+ (2018-04-28) for bug 795347 (Australian (GMT+10) OFX transactions imported have previous days date), I found when starting GnuCash that after it finishes loading user data and the splash screen disappears, the main windows remains hidden and I cannot get it to display. Testing showed that after renaming the .gcm file, it would display again. However, after I slightly modified the columns showing in the Accounts tab, exited GnuCash so new .gcm was created, and restarted GnuCash, same problem recurred. Please see attached .gcm files. Note that somewhere along the way of testing various versions of 3.0/3.1, it seems most (all?) of the additional columns I usually show in the Accounts tab have been turned off.
Created attachment 372210 [details] 2nd .gcm created by GnuCash which also causes hidden main window This is the .gcm which was created by GnuCash after GnuCash was started without a .gcm file, and columns in Accounts tab were slightly modified. Upon restarting GnuCash, this .gcm also causes the main window to stay hidden.
Odd. Something causes the saved window position to become negative by a large amount (-32000). Can you try to adjust the two -32000 values to something like 50 and see if the gcm file then works normally ? That is only as a workaround of course. We need to figure out where the negative setting comes from.
Hi Geert, Changing both the -32000 values to 50 enables the window to show. I've done some testing adjusting the columns in the Accounts tab but have not been able to duplicate the problem. I'll restore data file and .gcm back to pre 3.0 and test the conversion.
Unfortunately I cannot reproduce this error at will. There seems to be no problem with the conversion from 2.6.16 to 3.1-3. Positioning the window with the left edge off the screen works OK and it doesn't seem possible to get the top of the screen above the top as it always repositions so that it is at the top. I did get the error with WindowPosition=-32000;-32000; once but I was testing something else at the time (not the conversion from a lower version) and cannot reproduce. I did see that WindowPosition=-9;-9; when exiting GnuCash when maximized which seems strange.
Happened again today. Changing both the -32000 values to 50 enables the window to show. Maybe it is something to do with a window being put in front of GnuCash at some time critical time as I remember this time I was doing something else while it was starting but I cannot reproduce, even after restoring .gcm back to exactly how it was after last GnuCash session. Maybe you could just change -32000 values to 50 when loading .gcm?
I seem to read somewhere -32000 is used as window coordinates when a windows is hidden. I don't find that back right now. Was this window minimized when you closed gnucash ? Or it may be a timing issue on quitting here on quitting gtk hides the window before we can save its state. But correcting improbable values when loading is certainly a practical workaround in code.
Hi Geert, Bingo! You're right. I can replicate the problem by closing the window using right click on the app in the task bar when it is minimised. [Book].gnucash.gcm is changed to: WindowPosition=-32000;-32000; There is WindowMaximized=true|false in the [Windows 1] section but no WindowMinimized=true|false, so I guess something is using -32000;-32000 to indicate minimized instead of recording the real position which is still valid even if minimized. Maybe code should be changed to set WindowPosition=0;0; on loading .gcm if WindowPosition=-32000;-32000; ? I have tested 0,0 works.
I'd think it better that the code that changes the WindowPosition should check for -32000,-32000 and do nothing in that case, saving the WindowPosition from when the window was last displayed.
*** Bug 796473 has been marked as a duplicate of this bug. ***
I will have a go at this if no one is working on this...
Hopefully fixed in PR 359
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.
Thanks very much Bob, John And Geert. I have found a link that shows this problem has existed since at least 2009: https://stackoverflow.com/questions/1478765/location-coordinates-on-computer-showing-x-32000-y-32000
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=796256. Please update any external references or bookmarks.