home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _9ebaeae6f866a3a91c72bb3cf64fe881 < prev    next >
Encoding:
Text File  |  2004-06-01  |  753 b   |  28 lines

  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 657 "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.  return unless $w;
  21.  my $Ev = $w->XEvent;
  22.  my $d  = $Ev->d;
  23.  $w->Tk::focus() if ($d eq 'NotifyAncestor' ||  $d eq 'NotifyNonlinear' ||  $d eq 'NotifyInferior');
  24. }
  25.  
  26. # end of Tk::EnterFocus
  27. 1;
  28.