kean has asked for the wisdom of the Perl Monks concerning the following question:

I know how to retrieve the cursor position in a canvas. But how can i get the position without a canvas in a Tk MainWindow??

Replies are listed 'Best First'.
Re: Getting cursor position withour canvas
by Anonymous Monk on Feb 27, 2012 at 11:27 UTC
Re: Getting cursor position withour canvas
by webmind (Acolyte) on Feb 27, 2012 at 12:14 UTC
    use X11::GUITest qw/GetMousePos/; my ($x, $y, $scr_num) = GetMousePos();
    Should work.