FOCUS-IN events must not cause X-WINDOW-SET-INPUT-FOCUS to be called.
authorChris Hanson <org/chris-hanson/cph>
Thu, 30 Nov 2000 06:27:01 +0000 (06:27 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 30 Nov 2000 06:27:01 +0000 (06:27 +0000)
Use dynamic binding to prevent this from happening.

v7/src/edwin/xterm.scm

index 8ca820701df840e499142176e4d679648e25a188..b861a97e1a92a938f93efa9f54b5851c3a5a9e83 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: xterm.scm,v 1.63 2000/10/26 18:03:15 cph Exp $
+;;; $Id: xterm.scm,v 1.64 2000/11/30 06:27:01 cph Exp $
 ;;;
 ;;; Copyright (c) 1989-2000 Massachusetts Institute of Technology
 ;;;
     (if x-screen-ignore-focus-button?
        (set! ignore-button-state 'IGNORE-BUTTON-DOWN))
     (and (not (selected-screen? screen))
-        (make-input-event 'SELECT-SCREEN select-screen screen))))
+        (make-input-event 'SELECT-SCREEN
+                          (lambda (screen)
+                            (fluid-let ((last-focus-time #f))
+                              (select-screen screen)))
+                          screen))))
 
 (define-event-handler event-type:delete-window
   (lambda (screen event)