{"thread":{"id":"10790","subject":"gitk/git-gui misfeature: saving the geometry can the window out of reach","startedAt":"2007-11-10T21:48:05Z","lastAt":"2007-11-11T10:44:08Z","messageCount":3,"participants":["Benoit Sigoure","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"59243","messageId":"63F7323C-D90A-4F5E-AE3C-8937455972FD@lrde.epita.fr","threadId":"10790","inReplyTo":null,"subject":"gitk/git-gui misfeature: saving the geometry can the window out of reach","fromName":"Benoit Sigoure","fromEmail":"tsuna@lrde.epita.fr","sentAt":"2007-11-10T21:48:05Z","receivedAt":"2007-11-10T21:48:05Z","isPatch":false,"sender":{"key":"tsunanet@gmail.com","avatar":"https://avatars.githubusercontent.com/u/128281?v=4"},"body":"Hello list,\n\ngitk (and I think git-gui too) save their \"geometry\" (which includes  \nX/Y position) in ~/.gitk.  So far so good.  The problem is that I  \noften use 2 screens at work (one is the screen of my laptop, the  \nother one is above) and I happen to put my gitk/git-gui windows on  \nthe 2nd screen.  When I go back home, I don't have a second screen  \nand gitk/git-gui open their windows out of reach.  This could well be  \nan ugly wart in Apple's port of Tcl/Tk (I have a MacBook with OSX  \n10.4.10) or a more general problem (didn't try with other OSes).\n\ngit-gui version 0.8.4\ngit version 1.5.3.5.654.gdd5ec (tonight's master's HEAD)\nTcl/Tk version 8.4.7 (Apple's)\n(gitk doesn't support --version!)\n\nFor those struggling with the same problem, here is a quick workaround:\n   gnused -i /geometry/d ~/.gitk\n\nCheers,\n\n-- \nBenoit Sigoure aka Tsuna\nEPITA Research and Development Laboratory\n\n\n"},{"id":"59264","messageId":"20071111051128.GS14735@spearce.org","threadId":"10790","inReplyTo":"63F7323C-D90A-4F5E-AE3C-8937455972FD@lrde.epita.fr","subject":"Re: gitk/git-gui misfeature: saving the geometry can the window out of reach","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-11-11T05:11:29Z","receivedAt":"2007-11-11T05:11:29Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Benoit Sigoure <tsuna@lrde.epita.fr> wrote:\n> gitk (and I think git-gui too) save their \"geometry\" (which includes  \n> X/Y position) in ~/.gitk.  So far so good.  The problem is that I  \n> often use 2 screens at work (one is the screen of my laptop, the  \n> other one is above) and I happen to put my gitk/git-gui windows on  \n> the 2nd screen.  When I go back home, I don't have a second screen  \n> and gitk/git-gui open their windows out of reach.  This could well be  \n> an ugly wart in Apple's port of Tcl/Tk (I have a MacBook with OSX  \n> 10.4.10) or a more general problem (didn't try with other OSes).\n> \n> git-gui version 0.8.4\n> git version 1.5.3.5.654.gdd5ec (tonight's master's HEAD)\n> Tcl/Tk version 8.4.7 (Apple's)\n> (gitk doesn't support --version!)\n> \n> For those struggling with the same problem, here is a quick workaround:\n>   gnused -i /geometry/d ~/.gitk\n\nActually git-gui saves the geometry to .git/config so I'm not sure\nwhy the sed line above would correct git-gui's display issues.  But I\nhave also noticed this problem on my Mac OS X laptop when running\nagain after leaving either git-gui or gitk on the external display.\n\nI once started working on a fix for git-gui but put it aside as I\ndidn't have an external monitor handy.  I haven't hooked one up to\nmy laptop in months so it would be a bit of work for me to test\nand debug.\n\n-- \nShawn.\n"},{"id":"59306","messageId":"20071111104407.GY14735@spearce.org","threadId":"10790","inReplyTo":"8700373A-4878-4EBD-BA27-D4F31BE44907@lrde.epita.fr","subject":"Re: gitk/git-gui misfeature: saving the geometry can the window out of reach","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-11-11T10:44:08Z","receivedAt":"2007-11-11T10:44:08Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Benoit Sigoure <tsuna@lrde.epita.fr> wrote:\n> On Nov 11, 2007, at 6:11 AM, Shawn O. Pearce wrote:\n> >Benoit Sigoure <tsuna@lrde.epita.fr> wrote:\n> >>gitk (and I think git-gui too) save their \"geometry\" (which includes\n> >>X/Y position) in ~/.gitk.  So far so good.  The problem is that I\n> >>often use 2 screens at work (one is the screen of my laptop, the\n> >>other one is above) and I happen to put my gitk/git-gui windows on\n> >>the 2nd screen.  When I go back home, I don't have a second screen\n> >>and gitk/git-gui open their windows out of reach.\n> >\n> >Actually git-gui saves the geometry to .git/config so I'm not sure\n> >why the sed line above would correct git-gui's display issues.  But I\n> >have also noticed this problem on my Mac OS X laptop when running\n> >again after leaving either git-gui or gitk on the external display.\n> \n> it's been a long time since I last used Tcl/Tk but if you give me a  \n> hint as to where to look / what should be done, I can give it a try.\n\nLook in git-gui.sh for \"-- Load geometry\"; in my current master\nit is on line 2625.  This is the block where we have taken the\ngeometry data back in from .git/config and are trying to update\nthe UI to match what it says.  Unfortunately we set a coordinate\nthat is off the desktop using a standard X geometry string in the\n\"wm geometry . [lindex $gm 0]\" call...\n\n-- \nShawn.\n"}]}