My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 301: git-gui and children cannot be minimized any more
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  patthoyts
Closed:  Nov 18
Type-Defect
Component-GitGUI
OpSys-Windows


Sign in to add a comment
 
Reported by durocort...@yahoo.fr, Aug 05, 2009
What steps will reproduce the problem?
1. open git-gui interface on a repository
2. try to minimize the window

What is the expected output? What do you see instead?
expected: the window disappear from the screen
instead: no effect

What version of the product are you using? On what operating system?
OS is Windows XP sp2, git from "Git-1.6.4-preview20090730.exe"

Please provide any additional information below.
None of the following minimizing ways work:
 - clicking the button at the top-right of the window,
 - right-clicking in thee taskbar and choosing "minimize",
 - clicking on the window top-left icon and choosing "minimize",
 - right-clicking the window title bar and choosing "minimize".
More data:
 - This is for git-gui and its related windows ("File Browser", "File
Viewer"), but gitk is not affected,
 - Maximize / close buttons work fine,
 - This is new: It affects "Git-1.6.4-preview20090730.exe", not older 
versions: "Git-1.6.2.2-preview20090408.exe",
"Git-1.6.3-preview20090507-2.exe" and "Git-1.6.3.2-preview20090608.exe" are
fine,
 - config is installer default except for asking no quick-launch and
desktop icons, and setting line endings to "leave as they are" (the last
option, I do not remember the exact text).
Comment 1 by durocort...@yahoo.fr, Aug 05, 2009
The following is not intended as a workaround, just an ugly test:

If I overwrite the tcl85.dll and tk85.dll with those of the last working version
(1.6.3.2) and then change the version number from 8.5.7 to 8.5.5 in lines saying
  package require -exact Tcl  8.5.7
and
  package require -exact Tk  8.5.7
of files
  C:\Program Files\Git\lib\tcl8.5\init.tcl
and
  C:\Program Files\Git\lib\tk8.5\tk.tcl

I have a git-gui which I can minimise...

Comment 2 by patthoyts, Oct 07, 2009
I cannot reproduce this fault using msysGit 1.6.4.msysgit.0.
If you want to change the version of Tcl/Tk used a better plan is to install
ActiveTcl and change git.cmd to launch wish from the ActiveTcl directory or if you
use Git bash to change Git\libexec\git-core\git-gui and again replace the 'wish' with
the full path to another installation.
Comment 3 by durocort...@yahoo.fr, Oct 23, 2009
I have just tested Git-1.6.5.1-preview20091022.exe
No change, it's still impossible to minimize the git-gui window.
Comment 4 by johannes.schindelin, Oct 23, 2009
Thank you for being so responsive!

I could imagine that one of three things could be responsible for the behavior you 
observe:

1) Maybe your pre-existing installation was overwritten only partially due to in-
use files

2) Maybe the way you call git gui is different than mine?  I started git gui from 
the command line

3) A repository-specific setting (think CR/LF in the config or some such) could 
confuse git gui.

I am sorry that I cannot help more than to take a stab in the dark...
Comment 5 by durocort...@yahoo.fr, Oct 23, 2009
I have tried reinstalling 1.6.5.1 after deleting the .gitconfig, .gitk and a
.gitSafeconfig from my home directory but that make no change. Also, this
reinstallation was done with the "windows line endings" (the default) instead of the
"do not change anything" setting that I usually use.

I tried creating new repositories from directories that were not already tracked by
git, and I still cannot minimize git gui (gitk is still working fine)

Launching git-gui from the shortcut in start menu or from git bash ("git gui") does
not change the problem either.

Also note that before reinstalling, I checked that the "C:\Program Files\Git" was
totally removed. I also chacjed the "Local Settings\Application data" and
"Application Data" folders and found no git files there

I have checked for tcl/tk, and the other potential users of the toolkit installed on
the machine are Maxima, Scilab and (perhaps) MikTeX. I'll try uninstalling the 2
first ones (deinstalling MikTeX would be to much work) and see if it makes any
difference.
Comment 6 by durocort...@yahoo.fr, Oct 23, 2009
Update:
No changes after uninstalling Maxima & Scilab, and running CCleaner to remove
registry keys & other old stuff that I could identify as obsolete.
Comment 7 by patthoyts, Oct 23, 2009
I updated my machine to msysgit 1.6.5.1 and checked this again. No problem minimizing
git gui again.
Rather than delete a number of programs to try ensure a specific version of Tcl/Tk
you can instead just modify the git.cmd batch script and feed it a specific
executable path. For instance, if you download a tclkit executable (a standalone
single-file Tcl/Tk executable) you can modify the last line in git.cmd (in the
Program Files\Git\cmd folder) so that it looks like:

:gui
@if "%2"=="citool" @goto default
@start c:\opt\bin\tclkit.exe "%git_install_root%\libexec\git-core\git-gui" -- %2 %3
%4 %5 %6 %7 %8 %9

Tclkit will absolutely not look outside itself for any tcl/tk related files. It is a
Tcl and Tk runtime with a virtual filesystem bound onto the executable and it will
only look inside this virtual filesystem for files needed by the runtime. I use this
approach to test tcl 8.6 versions with git-gui and gitk. This also makes it easier to
check different versions of Tcl/Tk to see if your issue is related to a particular
release.
Likewise you can install ActiveTcl and provide the path to the ActiveTcl wish.exe file.
The other thing you could try is to edit the libexec/git-core/git-gui.tcl script and
add the following line near the top (maybe after the 'evil concept' comment:

console show

This will cause the Tk console to be shown and you can enter commands into this while
git-gui is running. You can then use the introspection commands (info, winfo, wm and
bind) to look at the state of the system. If I was to try and prevent minimization I
think I'd have to hook up the Visibility event. We can check what events are bound
using 'bind .' which returns a list of all the bound events for the main window.
Nothing suspicious on my version (<Configure>,<Map> and <Visibility> would be
suspicious IMO).


Comment 8 by durocort...@yahoo.fr, Oct 25, 2009
The edit of the git.cmd script did not change anything, but I guess it's because this
cmd batch is not used by me (I think you install git with the "command" option and I
use "bash".
I could however get a working minimize button by editing the git-gui shortcut with
the tclkit, but this works only for git-gui launched by the shortcut (which represent
fortunately 100% of my use).
I used the 8.5.2 downloaded from
http://www.equi4.com/tclkit/download.html
Thanks for the workaround. I think however that should not close the bug.
Comment 9 by sschuberth, Nov 02, 2009
I can reproduce the problem. Oddly, it seems to be important if you launch Git GUI
from a valid working tree or not. Only if the current directory does not contain a
working tree (no matter whether I launch Git GUI via the Start Menu shortcut, Windows
Explorer context menu or command line), minimizing does not work, else it does. What
does this tell a Tcl/Tk expert?
Comment 10 by pareja.mario, Nov 02, 2009
I am also experiencing the same issue as @sschuberth.  If I modify the "Start in" 
folder of my "Git GUI" shortcut to be a valid working tree, git gui loads that 
repository immediately (rather than showing a pick list) and I am able to minimize the 
application.
Comment 11 by durocort...@yahoo.fr, Nov 03, 2009
Yep, I confirm pattern of comment 9 too.
Comment 12 by patthoyts, Nov 03, 2009
OK. The issue is caused by a grab being set in the initial dialog where you choose
the repository to manage. The grab means that input should be directed to the grabbed
window and its children and no other toplevels (so useful on dialogs). But grabs
should be released and in this case the grab is not released. This dialog is then
morphed into the main application window leaving the grab still in place.
A change in 8.5 to prevent bypassing grabs via the taskbar is responsible for
preventing the minimization. Because there is a grab in effect, the WM_ACTIVATE
message is ignored. One solution is to add a 'grab release $top' to the
choose_repository.tcl file. However, I think this will need a fix to Tk for 8.5.8 as
the application should be able to operate normally if the grab is set on the
application window tree (ie: grab .)
I think this comes in as needing to wait for Tk 8.5.8 
Status: Accepted
Owner: patthoyts
Labels: Type-Defect Component-GitGUI OpSys-Windows
Comment 13 by patthoyts, Nov 03, 2009
I noticed a work-around while you wait for a new release of Tk for this -- if you
open any of the dialogs from git-gui (for instance the Help->About dialog) then close
the dialog window - the grab will have been release and the main window will become
minimizable again.
Comment 14 by patthoyts, Nov 18, 2009
Fixed with tk 8.5.8
Status: Fixed
Sign in to add a comment

Hosted by Google Code