summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 120ea89)
raw | patch | inline | side by side (parent: 120ea89)
author | Stefan Haller <stefan@haller-berlin.de> | |
Sun, 14 Nov 2010 12:22:56 +0000 (13:22 +0100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sun, 12 Dec 2010 04:24:09 +0000 (15:24 +1100) |
Stolen from git-gui, 23effa79f7 (original log message by
Shawn O. Pearce <spearce@spearce.org> follows):
git-gui: Force focus to the diff viewer on mouse click.
Apparently a "feature" of Tcl/Tk on Mac OS X is that a disabled text
widget cannot receive focus or receive a selection within it. This
makes the diff viewer almost useless on that platform as you cannot
select individual parts of the buffer.
Now we force focus into the diff viewer when its clicked on with
button 1. This works around the feature and allows selection to
work within the viewer just like it does on other less sane systems,
like Microsoft Windows.
Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Shawn O. Pearce <spearce@spearce.org> follows):
git-gui: Force focus to the diff viewer on mouse click.
Apparently a "feature" of Tcl/Tk on Mac OS X is that a disabled text
widget cannot receive focus or receive a selection within it. This
makes the diff viewer almost useless on that platform as you cannot
select individual parts of the buffer.
Now we force focus into the diff viewer when its clicked on with
button 1. This works around the feature and allows selection to
work within the viewer just like it does on other less sane systems,
like Microsoft Windows.
Signed-off-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 8f65900763b4878da98f6e6d37d87efa047c36b4..e82c6bfedea5fb9a3d768c0fa1759346c6e5e603 100755 (executable)
--- a/gitk
+++ b/gitk
global ctxbut
bind $cflist $ctxbut {pop_flist_menu %W %X %Y %x %y}
bind $ctext $ctxbut {pop_diff_menu %W %X %Y %x %y}
+ bind $ctext <Button-1> {focus %W}
set maincursor [. cget -cursor]
set textcursor [$ctext cget -cursor]