added some window-exists? checks
This commit is contained in:
parent
dcbf6b7bbb
commit
cdc6803b7d
|
@ -40,11 +40,11 @@
|
||||||
(let loop ((state 'up))
|
(let loop ((state 'up))
|
||||||
(let ((e (receive event-channel)))
|
(let ((e (receive event-channel)))
|
||||||
(cond
|
(cond
|
||||||
((expose-event? e)
|
((and (expose-event? e) (window-exists? dpy window))
|
||||||
(draw-button button gc state)
|
(draw-button button gc state)
|
||||||
(loop state))
|
(loop state))
|
||||||
((destroy-window-event? e) 'destroyed)
|
((destroy-window-event? e) 'destroyed)
|
||||||
((button-event? e)
|
((and (button-event? e) (window-exists? dpy window))
|
||||||
(if (eq? (event-type button-press)
|
(if (eq? (event-type button-press)
|
||||||
(button-event-type e))
|
(button-event-type e))
|
||||||
(begin
|
(begin
|
||||||
|
|
Loading…
Reference in New Issue