window manager that supports multiple workspaces: switching workspaces
sometimes caused an error to be signalled by X-WINDOW-SET-INPUT-FOCUS.
The problem is that the workspace switch caused all of Edwin's windows
to be unmapped. Depending on the order in which the unmap events
arrived, Edwin might have queued a request to select another screen.
But since all of the screens were unmapped at the time the request was
processed, the attempt to set the input focus to one of these unmapped
screens always generated an error.
The fix eliminates the code that tried to select another screen.
Instead we depend on the window manager to tell us when another screen
needs to be selected.
;;; -*-Scheme-*-
;;;
-;;; $Id: xterm.scm,v 1.62 2000/10/26 17:55:04 cph Exp $
+;;; $Id: xterm.scm,v 1.63 2000/10/26 18:03:15 cph Exp $
;;;
;;; Copyright (c) 1989-2000 Massachusetts Institute of Technology
;;;
(define-event-handler event-type:unmap
(lambda (screen event)
event
- (and (not (screen-deleted? screen))
- (begin
- (%set-screen-visibility! screen 'UNMAPPED)
- (and (selected-screen? screen)
- (let ((screen (other-screen screen 1 #f)))
- (and screen
- (make-input-event 'SELECT-SCREEN
- select-screen
- screen))))))))
+ (if (not (screen-deleted? screen))
+ (%set-screen-visibility! screen 'UNMAPPED))
+ #f))
(define-event-handler event-type:visibility
(lambda (screen event)