Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Tk::Error: Failed to AUTOLOAD `TK::Widget::EnterFocus'

by Discipulus (Canon)
on May 16, 2023 at 08:10 UTC ( [id://11152216] : note . print w/replies, xml ) Need Help??


in reply to Re: Tk::Error: Failed to AUTOLOAD `TK::Widget::EnterFocus'
in thread Tk::Error: Failed to AUTOLOAD `TK::Widget::EnterFocus'

Hello choroba,

I have the file EnterFocus.al under perl5.26.64bit\perl\site\lib\auto\Tk and it contains:

# NOTE: Derived from blib\lib\Tk.pm. # Changes made here will be lost when autosplit is run again. # See AutoSplit.pm. package Tk; #line 693 "blib\lib\Tk.pm (autosplit into blib\lib\auto\Tk\EnterFocus. +al)" # focusFollowsMouse # # If this procedure is invoked, Tk will enter "focus-follows-mouse" # mode, where the focus is always on whatever window contains the # mouse. If this procedure isn't invoked, then the user typically # has to click on a window to give it the focus. # # Arguments: # None. sub EnterFocus { my $w = shift; return unless $w; my $Ev = $w->XEvent; my $d = $Ev->d; $w->Tk::focus() if ($d eq 'NotifyAncestor' || $d eq 'NotifyNonlinear +' || $d eq 'NotifyInferior'); } # end of Tk::EnterFocus 1;

I also see this comment in Tk.pm source

PS $widget->focusFollowsMouse is described here

PPS perhaps I misread/misunderstood your answer :)

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.