Skip to content

Commit

Permalink
[PATCH] gitk: Enable selected patch text on Windows
Browse files Browse the repository at this point in the history
On windows, mouse input follows the keyboard focus, so to allow selecting
text from the patch canvas we must not shift focus back to the top level.
This change has no negative impact on X, so we don't explicitly test
for Win32 on this change. This provides similar selection capability
as already available using X-Windows.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Mark Levedahl authored and Paul Mackerras committed Aug 12, 2007
1 parent 67a4f1a commit bd441de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,8 @@ proc bindkey {ev script} {
# set the focus back to the toplevel for any click outside
# the entry widgets
proc click {w} {
global entries
foreach e $entries {
global ctext entries
foreach e [concat $entries $ctext] {
if {$w == $e} return
}
focus .
Expand Down Expand Up @@ -4600,6 +4600,7 @@ proc sellastline {} {

proc selnextline {dir} {
global selectedline
focus .
if {![info exists selectedline]} return
set l [expr {$selectedline + $dir}]
unmarkmatches
Expand Down Expand Up @@ -4680,6 +4681,7 @@ proc godo {elt} {

proc goback {} {
global history historyindex
focus .

if {$historyindex > 1} {
incr historyindex -1
Expand All @@ -4693,6 +4695,7 @@ proc goback {} {

proc goforw {} {
global history historyindex
focus .

if {$historyindex < [llength $history]} {
set cmd [lindex $history $historyindex]
Expand Down

0 comments on commit bd441de

Please sign in to comment.