added check for other windowmanagers

This commit is contained in:
frese 2003-04-16 14:59:05 +00:00
parent 84bbfcaec2
commit 0d05a7c0e3
1 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,16 @@
(let ((dpy (open-display)))
(synchronize dpy #t)
(init-sync-x-events dpy)
;; first try if there is already a window-manager
(with-handler
(lambda (condition punt)
(mdisplay "Another window manager is already running on this screen\nTerminate it before running Orion.\n")
(exit))
(lambda ()
(display-select-input dpy (default-root-window dpy)
(event-mask substructure-redirect))
(display-sync dpy #f)))
;; for debugging:
; (spawn (lambda ()
; (let loop ((se (most-recent-sync-x-event)))