Menu

#1162 ButtonRelease on Grab Window

obsolete: 8.3.4
open
69. Events (88)
5
2003-07-17
2002-03-19
Anonymous
No

I have a problem with the ButtonRelease bind on a
window that has the grab if I move off the window with
the button depressed and then release it.
Platform: Windows 2000

Steps to reproduce:
1. Create a window:

toplevel .testWindow -class Toplevel
wm focusmodel .testWindow passive
wm geometry .testWindow 406x312+254+250
wm title .testWindow "Login"
entry .testWindow.userId
place .testWindow.userId -in .testWindow \
-x 145 -y 80
grab .testWindow
# Done

NOTE: You must make sure the window has the grab.

2. Place the cursor in the entry widget and type
the "123456789"

3. Hold down the LMB and highlight what you just typed.
Without releasing the LMB, move the mouse over
to the Windows Desktop and then release the LMB.

4. Move the mouse back over the .testWindow. TK acts
like the LMB is still depressed. If you start
typing with everything highlight, input appears to
the left because it acts like you have the first
character highlighted.

Discussion

  • Slaven Rezic

    Slaven Rezic - 2002-08-26

    Logged In: YES
    user_id=54935

    Here's an even simpler example for this problem (tested on
    FreeBSD):

    wm geometry . 200x200
    button .b
    bind .b <ButtonPress-1> {puts "press"; grab .}
    bind .b <ButtonRelease-1> {puts "release";grab release .}
    pack .b

    Click on the button (you see "press" on stdout), move the
    mouse away, and release the mouse button (you do _not_ see
    "release" on stdout). If you go back to the button and
    press-release the mouse, then the button stays depressed.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-07-17
    • labels: 104334 --> 69. Events
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2004-09-10

    Logged In: YES
    user_id=72656

    Related to patch #611615 that addressed this for dialogs.

     
MongoDB Logo MongoDB