From: Chris Hanson Date: Thu, 26 Oct 2000 18:03:15 +0000 (+0000) Subject: Fix long-standing bug that occurred when using multiple screens with a X-Git-Tag: 20090517-FFI~3215 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=bbede59ca0c3ea7efb42ffdeb0b71158d8600b95;p=mit-scheme.git Fix long-standing bug that occurred when using multiple screens with a 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. --- diff --git a/v7/src/edwin/xterm.scm b/v7/src/edwin/xterm.scm index 298ae17f6..8ca820701 100644 --- a/v7/src/edwin/xterm.scm +++ b/v7/src/edwin/xterm.scm @@ -1,6 +1,6 @@ ;;; -*-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 ;;; @@ -736,15 +736,9 @@ (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)