A weird one - misguided mouse clicks and all that 
Author Message
 A weird one - misguided mouse clicks and all that
It appears that Tk is picking up mouse clicks it shouldn't.  I'm running
ActivePerl build 623 with Tk 800.022 under NT 4.0 SP6a.

A simple Tk app with a single button.  Have the button exit the program.
Now open another program (Notepad will work).  Position the other program so
that the menu button in the upper left is over the Exit button in the Tk
app.  Double-click on that button so as to close the other program (i.e.
Notepad).  Voila - Tk picks up the second mouse click, thus triggering the
Exit button.  How weird!

--Toby Everett

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the




Sun, 10 Aug 2003 09:06:40 GMT  
 A weird one - misguided mouse clicks and all that
This happens on Unix as well.

I ?think? it is doing what it is 'supposed' to do. i.e. invoking the button
upon a 'ButtonRelease' event. Using Win95..I see that any window will
disappear on a double ButtonPress event in the top left hand corner. So
after the second button press the Tk window takes focus (not sure why) and
records a 'ButtonRelease' event over the button.

Jack

Quote:
-----Original Message-----

Sent: Tuesday, February 20, 2001 5:33 PM

Subject: A weird one - misguided mouse clicks and all that

It appears that Tk is picking up mouse clicks it shouldn't.  I'm running
ActivePerl build 623 with Tk 800.022 under NT 4.0 SP6a.

A simple Tk app with a single button.  Have the button exit the program.
Now open another program (Notepad will work).  Position the other program so
that the menu button in the upper left is over the Exit button in the Tk
app.  Double-click on that button so as to close the other program (i.e.
Notepad).  Voila - Tk picks up the second mouse click, thus triggering the
Exit button.  How weird!

--Toby Everett

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the




Mon, 11 Aug 2003 01:43:10 GMT  
 A weird one - misguided mouse clicks and all that
But this is _not_ what it is supposed to do, at least according to normal
GUI guidelines.  Tk shouldn't even see that ButtonRelease event.  Both
mouse-clicks of the double-click are intended for the window that is being
closed.  Tk shouldn't even get the focus unless it was the window that had
the focus _directly_ prior to the other window getting focussed (which isn't
the case, for instance, if the other window was activated via the Task Bar -
in that case, the Task Bar should get the focus).  If all apps behaved like
Tk is behaving, closing windows by double-clicking on the upper-left button
would be an activity fraught with peril.

--Toby Everett

Quote:
                -----Original Message-----

                Sent:   Wednesday, February 21, 2001 7:59 AM

                Subject:        RE: A weird one - misguided mouse clicks and

all that

                This happens on Unix as well.

                I ?think? it is doing what it is 'supposed' to do. i.e.
invoking the button
                upon a 'ButtonRelease' event. Using Win95..I see that any
window will
                disappear on a double ButtonPress event in the top left hand
corner. So
                after the second button press the Tk window takes focus (not
sure why) and
                records a 'ButtonRelease' event over the button.

                Jack

                -----Original Message-----

                Sent: Tuesday, February 20, 2001 5:33 PM

                Subject: A weird one - misguided mouse clicks and all that

                It appears that Tk is picking up mouse clicks it shouldn't.
I'm running
                ActivePerl build 623 with Tk 800.022 under NT 4.0 SP6a.

                A simple Tk app with a single button.  Have the button exit
the program.
                Now open another program (Notepad will work).  Position the
other program so
                that the menu button in the upper left is over the Exit
button in the Tk
                app.  Double-click on that button so as to close the other
program (i.e.
                Notepad).  Voila - Tk picks up the second mouse click, thus
triggering the
                Exit button.  How weird!

                --Toby Everett

                -++**==--++**==--++**==--++**==--++**==--++**==--++**==
                This message was posted through the Stanford campus mailing
list
                server.  If you wish to unsubscribe from this mailing list,
send the
                message body of "unsubscribe ptk" to

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the




Mon, 11 Aug 2003 02:27:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. simulating a mouse click?

2. Sending keystrokes and mouse click under WinPerl

3. anyone know how to simulate a mouse click?

4. Mouse click location on a scrolled canvas

5. Mouse Click Bind for an Entry Widget

6. Simulating mouse clicks on other GUI programs

7. binding mouse clicks to Tk::Columns

8. left mouse click on HList throws messages when empty

9. mouse right click

10. Please help: Binding mouse click to tree entry.

11. binding right mouse button click to all buttons

12. one click and execute on many boxes

 

 
Powered by phpBB® Forum Software