Tk Source Code

Ticket Change Details
Login
Overview

Artifact ID: d16d5e40e735c67f2e8655b8151294111298933e
Ticket: a53a902ac6e179ab41a650f8d97c5124f99f37db
overrideredirect on linux/mac prevents certain binds from working
User & Date: anonymous 2016-08-25 18:02:52
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Keypress and other bindings do not work in a window with overrideredirect on mac and linux.
    
    See:
    
    http://stackoverflow.com/questions/34582637/tkinters-overrideredirect-prevents-certain-events-in-mac-and-linux
    
    If I comment out the overrideredirect in the code below, and use the following
    configuration with the devilspie program to create an undecorated window, then the keypress bindings work:
    I have only tested on Linux.
    
    (if (is (application_name) "t.tcl")
       (begin (undecorate)(below)(geometry "+100+100")))
    
    #!/usr/bin/env wish
    wm title . t.tcl
    wm overrideredirect . True
    wm geometry . "399x25+100+300"
    bind . <KeyPress> {+puts "<KeyPress %K>"}
    bind . <Button-1> {puts "<Button-1>"}
    bind . <Enter> {puts "<Enter>"}
    bind . <Leave> {puts "<Leave>"}
    bind . <FocusIn> {puts "<FocusIn>"}
    bind . <FocusOut> {puts "<FocusOut>"}
    
  5. foundin changed to: "8.6.1, 8.6.6"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "e755306c9ef019bc4ca35d69adcf001dece786ff"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "01. Bindings"
  15. title changed to:
    overrideredirect on linux/mac prevents certain binds from working
    
  16. type changed to: "Bug"