Git GUI window is getting smaller and smaller

348 views
Skip to first unread message

Arkadiusz Piekarz

unread,
Aug 2, 2009, 10:17:29 AM8/2/09
to msysGit
Each time I open Git GUI and select some repository, the height of the
window that appears is smaller than the previous state.

For instance, I open a repository, the window has ~780 pixels in
height. I close it, open it again, but now it has ~750 pixels. I close
it and open yet again and now it has only 730 pixels. It is quite
annoying.

How can I fix it? Or at least configure Git GUI repository window to
always start in maximized mode?

Thanks in advance.

Christian MICHON

unread,
Aug 4, 2009, 7:13:38 AM8/4/09
to Arkadiusz Piekarz, msysGit
On Sun, Aug 2, 2009 at 4:17 PM, Arkadiusz
Piekarz<piekarza...@gmail.com> wrote:
>
> Each time I open Git GUI and select some repository, the height of the
> window that appears is smaller than the previous state.

it does not happen to me

>
> For instance, I open a repository, the window has ~780 pixels in
> height. I close it, open it again, but now it has ~750 pixels. I close
> it and open yet again and now it has only 730 pixels. It is quite
> annoying.
>
> How can I fix it? Or at least configure Git GUI repository window to
> always start in maximized mode?

you can tweak git gui to maximise itself (1), or always open with the
same dimensions at the same location on the screen (2).

I attached a quick patch for you to try scenario 1. You can change the
info around window dimensions (screenwidth & screenheight) to
constants to perform scenario 2.

Rgds,

--
Christian
--
http://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside !

git-gui-max.patch

Pat Thoyts

unread,
Aug 4, 2009, 8:02:14 AM8/4/09
to Arkadiusz Piekarz, msysGit
2009/8/2 Arkadiusz Piekarz <piekarza...@gmail.com>:

The window geometry for the selected project is saved in the as a
gui.geometry property in the git config file (you can read it with git
config --get gui.geometry). When this is read and applied all is ok
but shortly after something affects the size of the window and it gets
reduced. Most likely it is to do with packing in another control or
changing the font size or something similar. You can evade the issue
with the following modification which delays the geometry change until
everything else has completed. This solves the problem on my system.

--- msysgit\git\git-gui\git-gui.tcl Sun Jun 21 10:58:40 2009
+++ msysgit\libexec\git-core\git-gui.tcl Tue Aug 04 12:58:06 2009
@@ -3239,7 +3239,7 @@
#
catch {
set gm $repo_config(gui.geometry)
-wm geometry . [lindex $gm 0]
+after idle [list wm geometry . [lindex $gm 0]]
.vpane sash place 0 \
[lindex $gm 1] \
[lindex [.vpane sash coord 0] 1]

Arkadiusz Piekarz

unread,
Aug 4, 2009, 8:29:50 AM8/4/09
to msysGit
I understand I have to uninstall my current MsysGit (which come from a
normal full installer) and install the version for hacking, right?
Then, what steps should I make to apply this or the previous patch?

Thanks in advance.

Johannes Schindelin

unread,
Aug 4, 2009, 9:31:08 AM8/4/09
to Arkadiusz Piekarz, msysGit
Hi,

note that this is the last mail you will get from me unless you start
to Cc: the people you are replying to.

No, you do not need msysGit, as you can "apply the patch manually", i.e.
edit the file in your Git installation by hand to reflect the changes the
person you replied to proposed.

Ciao,
Dscho

Pat Thoyts

unread,
Aug 4, 2009, 10:32:07 AM8/4/09
to Arkadiusz Piekarz, msysGit
2009/8/4 Arkadiusz Piekarz <piekarza...@gmail.com>:

>
> I understand I have to uninstall my current MsysGit (which come from a
> normal full installer) and install the version for hacking, right?
> Then, what steps should I make to apply this or the previous patch?

In this case I would just open up the installed file in "\Program
Files\Git\libexec\git-core\git-gui.tcl" or wherever you have installed
it and modify the right line in place. If it works we can push the
patch to the upstream maintainer. I don't know if this is a windows
specific issue or not at the moment.

Arkadiusz Piekarz

unread,
Aug 4, 2009, 10:43:03 AM8/4/09
to Pat Thoyts, msysGit
Please see http://groups.google.com/group/msysgit/browse_thread/thread/6546bd306b73c61e#
I already managed to fixed this problem, thanks!

2009/8/4 Pat Thoyts <patt...@googlemail.com>:

Johannes Schindelin

unread,
Aug 5, 2009, 10:08:39 AM8/5/09
to Arkadiusz Piekarz, Pat Thoyts, msysGit
Hi,

On Tue, 4 Aug 2009, Arkadiusz Piekarz wrote:

> Please see http://groups.google.com/group/msysgit/browse_thread/thread/6546bd306b73c61e#
> I already managed to fixed this problem, thanks!

I think your winfo reports a wrong screen size. Possible?

Ciao,
Dscho

Arkadiusz Piekarz

unread,
Aug 6, 2009, 8:07:50 AM8/6/09
to Johannes Schindelin, Pat Thoyts, msysGit
2009/8/5 Johannes Schindelin <Johannes....@gmx.de>:

Looks like my previous reply to Johannes Schindelin hasn't been
included in this public discussion, so I'll paste it below:

"I've managed to solve this problem with Christian Michon's patch. I
edited git-gui.tcl file in E:\Program Files\Git\libexec\git-core and
used

wm geometry . 1277x737+0+0

instead of

wm geometry . [winfo screenwidth .]x[winfo screenheight .]+0+0

because the latter made the window so high that its bottom was hidden
behind the taskbar.

And hey, I'm sorry about an improper way of replying, but it is my
first time talking on a discussion group (mailing list).

I wrote my message in the web interface and hit "Reply" - is that not an
intended way of doing it? I checked in the Help section of this
discussion group how should I answer to people's messages and it says to
use "Reply" button -
http://groups.google.com/support/bin/answer.py?hl=en&answer=46247 . This
time I used "Reply to author" button, is that a correct way?

I also checked what "Cc" means on wikipedia and found
http://en.wikipedia.org/wiki/Carbon_copy, but I don't know how to add
more recipients from the web interface. Should I use "Forward"? Or
should I use Gmail interface instead of this site?"

As for the "wrong" dimensions set by screenheight - they aren't wrong,
they just report the screen height (800 in this case), but not the
available height (because menu bar takes around 50-60 pixels). They
also don't take frame border into consideration, so that might be the
cause of the problem. In width, it looks quite alright, except a small
part of the "close" button in the upper right corner is beyond the
screen.

Pat Thoyts

unread,
Aug 6, 2009, 8:57:26 AM8/6/09
to Arkadiusz Piekarz, Johannes Schindelin, msysGit
2009/8/6 Arkadiusz Piekarz <piekarza...@gmail.com>:

> "I've managed to solve this problem with Christian Michon's patch. I
> edited git-gui.tcl file in E:\Program Files\Git\libexec\git-core and
> used
>
> wm geometry . 1277x737+0+0
>
> instead of
>
> wm geometry . [winfo screenwidth .]x[winfo screenheight .]+0+0
>
> because the latter made the window so high that its bottom was hidden
> behind the taskbar.

If you want a maximized window then calling [wm state . zoomed] is
equivalent to clicking the maximize button.

[snip]

> As for the "wrong" dimensions set by screenheight - they aren't wrong,
> they just report the screen height (800 in this case), but not the
> available height (because menu bar takes around 50-60 pixels). They
> also don't take frame border into consideration, so that might be the
> cause of the problem. In width, it looks quite alright, except a small
> part of the "close" button in the upper right corner is beyond the
> screen.

winfo screenheight is the full height of the primary desktop and
includes the area taken up by the windows taskbar. You can calculate
the size of this by making a zoomed window and retrieving its
geometry/size and the difference between this and the screenheight is
the size of the taskbar.

Christian MICHON

unread,
Aug 6, 2009, 11:32:43 AM8/6/09
to Pat Thoyts, Arkadiusz Piekarz, Johannes Schindelin, msysGit
On Thu, Aug 6, 2009 at 2:57 PM, Pat Thoyts<patt...@googlemail.com> wrote:
>
> 2009/8/6 Arkadiusz Piekarz <piekarza...@gmail.com>:
>> "I've managed to solve this problem with Christian Michon's patch. I
>> edited git-gui.tcl file in E:\Program Files\Git\libexec\git-core and
>> used
>>
>> wm geometry . 1277x737+0+0
>>
>> instead of
>>
>> wm geometry . [winfo screenwidth .]x[winfo screenheight .]+0+0
>>
>> because the latter made the window so high that its bottom was hidden
>> behind the taskbar.
>
> If you want a maximized window then calling [wm state . zoomed] is
> equivalent to clicking the maximize button.
>
> [snip]

nice! :-)

I could not get it to work (I missed the state actually).

Reply all
Reply to author
Forward
0 new messages