From: Mark Levedahl <mdl123@verizon.net>
To: Paul Mackerras <paulus@samba.org>
Cc: Git Mailing List <git@vger.kernel.org>,
Mark Levedahl <mdl123@verizon.net>
Subject: [PATCH] gitk - enable selected patch text on Windows
Date: Tue, 07 Aug 2007 21:40:34 -0400 [thread overview]
Message-ID: <11865372352543-git-send-email-mdl123@verizon.net> (raw)
In-Reply-To: <1186440352826-git-send-email-mdl123@verizon.net>
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>
---
This version enforces setting focus to the top level window whenever a
scrolling command is issued. The first version lacked that and could allow
some letters to erroneously appear in the patch window. This was purely
cosmetic but annoying to one co-worker on a very slow machine.
gitk | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gitk b/gitk
index f74ce51..84f5ee4 100755
--- a/gitk
+++ b/gitk
@@ -955,8 +955,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 .
@@ -4565,6 +4565,7 @@ proc sellastline {} {
proc selnextline {dir} {
global selectedline
+ focus .
if {![info exists selectedline]} return
set l [expr {$selectedline + $dir}]
unmarkmatches
@@ -4645,6 +4646,7 @@ proc godo {elt} {
proc goback {} {
global history historyindex
+ focus .
if {$historyindex > 1} {
incr historyindex -1
@@ -4658,6 +4660,7 @@ proc goback {} {
proc goforw {} {
global history historyindex
+ focus .
if {$historyindex < [llength $history]} {
set cmd [lindex $history $historyindex]
--
1.5.3.rc4.25.gade7b9
next prev parent reply other threads:[~2007-08-08 1:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-06 22:45 [PATCH] gitk - enable selected patch text on Windows Mark Levedahl
2007-08-06 22:45 ` [PATCH] gitk - Handle MouseWheel events " Mark Levedahl
2007-08-08 1:40 ` Mark Levedahl [this message]
2007-08-08 1:40 ` Mark Levedahl
2007-08-11 12:23 ` Mark Levedahl
2007-08-11 16:58 ` Steffen Prohaska
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11865372352543-git-send-email-mdl123@verizon.net \
--to=mdl123@verizon.net \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).