Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | # NOTE: Derived from blib/lib/Tk.pm. |
2 | # Changes made here will be lost when autosplit is run again. | |
3 | # See AutoSplit.pm. | |
4 | package Tk; | |
5 | ||
6 | #line 568 "blib/lib/Tk.pm (autosplit into blib/lib/auto/Tk/EnterFocus.al)" | |
7 | # focusFollowsMouse | |
8 | # | |
9 | # If this procedure is invoked, Tk will enter "focus-follows-mouse" | |
10 | # mode, where the focus is always on whatever window contains the | |
11 | # mouse. If this procedure isn't invoked, then the user typically | |
12 | # has to click on a window to give it the focus. | |
13 | # | |
14 | # Arguments: | |
15 | # None. | |
16 | ||
17 | sub EnterFocus | |
18 | { | |
19 | my $w = shift; | |
20 | my $Ev = $w->XEvent; | |
21 | my $d = $Ev->d; | |
22 | $w->Tk::focus() if ($d eq 'NotifyAncestor' || $d eq 'NotifyNonlinear' || $d eq 'NotifyInferior'); | |
23 | } | |
24 | ||
25 | # end of Tk::EnterFocus | |
26 | 1; |