You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GUI Window stops appearing due to odd geometry values in config #4
Using version 0.21 Windows 64:
In one of my repositories GitGUI window stopped appearing (just showed a taskbar icon ). In other repositories it was alright.
Found no problems in repository with git bash and TortoiseGit
Then found that the issue was caused by odd values in the config file:
[gui]
wmstate = normal
geometry = 144x1+-32000+-32000 0 0
After I replaced geometry values with the screen coordinates from a "healthy" repository, window appeared.
Suppose this is a bug and such numbers should not be written in the config at all or should be checked on load.
I encounter the same issue, It seems that the weird geometry values get written to the config when I work on a setup with several screens. When I disconnect the other screens from my laptop, the gui still goes to wherever it was on the multiple screens, which is outside of the current screen.
On windows 10, I could shift+right-click on the program in the task bar to maximize the gui and it would reappear. They removed this option in windows 11, so now I'm stuck
I cannot test the situation. A possible solution could be to ignore any excessive position values. But what is excessive? May be it is sufficient to only reject the position +-32000+-32000? The geometry is queried in function do_quit, around line 2360 in git-gui.sh.
I don't know. But if we catch bad values before they are written into the config and if these bad values are easy to identify, we are good. +-32000+-32000 would be easy to identify. Of course, I assume that these are values that are actually seen, and not something made up.
I don't know. But if we catch bad values before they are written into the config and if these bad values are easy to identify, we are good. +-32000+-32000 would be easy to identify. Of course, I assume that these are values that are actually seen, and not something made up.
I confirm the values were actually seen (copy-pasted from the broken config file). Also I was not using any additional displays - all on one laptop. So yes, it seems like some special numbers and may be it is enough to filter them.
I asked ChatGPT where 32000 may come from and its reply was:
The -32000 values you're seeing are commonly associated with a window being minimized on Windows. Here's why and how this happens:
What’s Happening
Windows Coordinates for Minimized Windows:
When a window is minimized in Windows, its coordinates are often set to -32000, -32000. This is a convention used by the operating system to indicate that the window is minimized and doesn't have a visible position on the screen.
Application Behavior:
If the program saves its geometry when closing and it happens to be minimized at that moment, it will record those minimized coordinates instead of the actual screen position.
I confirm the values were actually seen (copy-pasted from the broken config file). Also I was not using any additional displays - all on one laptop. So yes, it seems like some special numbers and may be it is enough to filter them.
I tested on my Windows box (Window 10), but the geometry is stored correctly when I close a minimized git gui application. No -32000. Can you reproduce this?
I confirm the values were actually seen (copy-pasted from the broken config file). Also I was not using any additional displays - all on one laptop. So yes, it seems like some special numbers and may be it is enough to filter them.
I tested on my Windows box (Window 10), but the geometry is stored correctly when I close a minimized git gui application. No -32000. Can you reproduce this?
I cannot reproduce - it was single time I observed this behavior. Sometimes I have many GUI windows open, maybe it matters somehow, but I tried multi windows (minimized and not), but still was unable to reproduce.
But something surely works different when a minimized window is closed:
Closing I:
Maximize GUI window.
Close with top right button
Open GUI again - it appears maximized
Closing II:
Maximize GUI window.
Minimize it
Close from right click tray menu
Open GUI again - it appears having the size of the screen but not in the corner (not maximized)
Also I noted when performing Cllosing I - before closing the window for a short time becomes not maximized and shifted - seems in the same way as it would appear after Closing II
Activity
AdamCooman commentedon Nov 11, 2024
I encounter the same issue, It seems that the weird geometry values get written to the config when I work on a setup with several screens. When I disconnect the other screens from my laptop, the gui still goes to wherever it was on the multiple screens, which is outside of the current screen.
On windows 10, I could shift+right-click on the program in the task bar to maximize the gui and it would reappear. They removed this option in windows 11, so now I'm stuck
j6t commentedon Nov 28, 2024
I cannot test the situation. A possible solution could be to ignore any excessive position values. But what is excessive? May be it is sufficient to only reject the position
+-32000+-32000? The geometry is queried in functiondo_quit, around line 2360 ingit-gui.sh.AdamCooman commentedon Nov 29, 2024
is there no way to check whether the current position is at least on one of the screens?
j6t commentedon Nov 29, 2024
I don't know. But if we catch bad values before they are written into the config and if these bad values are easy to identify, we are good.
+-32000+-32000would be easy to identify. Of course, I assume that these are values that are actually seen, and not something made up.kotoezh commentedon Nov 29, 2024
I confirm the values were actually seen (copy-pasted from the broken config file). Also I was not using any additional displays - all on one laptop. So yes, it seems like some special numbers and may be it is enough to filter them.
kotoezh commentedon Nov 29, 2024
I asked ChatGPT where 32000 may come from and its reply was:
j6t commentedon Nov 29, 2024
I tested on my Windows box (Window 10), but the geometry is stored correctly when I close a minimized git gui application. No -32000. Can you reproduce this?
kotoezh commentedon Nov 30, 2024
I cannot reproduce - it was single time I observed this behavior. Sometimes I have many GUI windows open, maybe it matters somehow, but I tried multi windows (minimized and not), but still was unable to reproduce.
kotoezh commentedon Nov 30, 2024
May be just filtering -32000 will be alright
kotoezh commentedon Nov 30, 2024
But something surely works different when a minimized window is closed:
Closing I:
Closing II:
Also I noted when performing Cllosing I - before closing the window for a short time becomes not maximized and shifted - seems in the same way as it would appear after Closing II
j6t commentedon Nov 30, 2024
Here are the guidelines for a patch that I would accept: