- changed error signalling from raising an error to returning #f in
some functions.
This commit is contained in:
parent
093edeb064
commit
a0ac2ea56b
scheme/xlib
|
@ -109,7 +109,8 @@
|
|||
"scx_Set_Text_Property")
|
||||
|
||||
;; get-wm-protocols function returns the list of atoms stored in the
|
||||
;; WM_PROTOCOLS property on the specified window. These atoms describe
|
||||
;; WM_PROTOCOLS property on the specified window, or #f if this
|
||||
;; property does not exist or has a bas format. These atoms describe
|
||||
;; window manager protocols in which the owner of this window is
|
||||
;; willing to participate. See XGetWMProtocols.
|
||||
|
||||
|
@ -119,7 +120,7 @@
|
|||
(if res
|
||||
(map make-atom
|
||||
(vector->list res))
|
||||
(error "cannot get WM protocols"))))
|
||||
#f)))
|
||||
|
||||
(import-lambda-definition %wm-protocols (Xdisplay Xwindow)
|
||||
"scx_Wm_Protocols")
|
||||
|
@ -133,20 +134,17 @@
|
|||
(list->vector (map atom-Xatom protocols)))))
|
||||
(if res
|
||||
res
|
||||
(error "cannot set WM protocols" protocols))))
|
||||
(error "cannot set WM protocols" window protocols))))
|
||||
|
||||
(import-lambda-definition %set-wm-protocols! (Xdisplay Xwindow protocols)
|
||||
"scx_Set_Wm_Protocols")
|
||||
|
||||
;; get-wm-class returns the class hint for the specified window. See
|
||||
;; XGetClassHint.
|
||||
;; get-wm-class returns the class hint for the specified window or #f
|
||||
;; if it does not exists or has a bad format. See XGetClassHint.
|
||||
|
||||
(define (get-wm-class window)
|
||||
(let ((res (%wm-class (display-Xdisplay (window-display window))
|
||||
(window-Xwindow window))))
|
||||
(if res
|
||||
res
|
||||
(error "cannot get WM class hint"))))
|
||||
(%wm-class (display-Xdisplay (window-display window))
|
||||
(window-Xwindow window)))
|
||||
|
||||
(import-lambda-definition %wm-class (Xdisplay Xwindow)
|
||||
"scx_Wm_Class")
|
||||
|
@ -245,8 +243,9 @@
|
|||
(define (get-wm-hints window)
|
||||
(let ((res (%wm-hints (display-Xdisplay (window-display window))
|
||||
(window-Xwindow window))))
|
||||
(filter (lambda (x) (not (null? (cdr x))))
|
||||
((integer+vector->wm-hint-alist (window-display window)) res))))
|
||||
(if res
|
||||
((integer+vector->wm-hint-alist (window-display window)) res)
|
||||
#f)))
|
||||
|
||||
(import-lambda-definition %wm-hints (Xdisplay Xwindow)
|
||||
"scx_Wm_Hints")
|
||||
|
@ -268,10 +267,13 @@
|
|||
;; XGetTransientForHint.
|
||||
|
||||
(define (get-transient-for window)
|
||||
(make-window (%transient-for (display-Xdisplay (window-display window))
|
||||
(window-Xwindow window))
|
||||
(window-display window)
|
||||
#f))
|
||||
(let ((Xwindow (%transient-for (display-Xdisplay (window-display window))
|
||||
(window-Xwindow window))))
|
||||
(if (= 0 Xwindow)
|
||||
#f
|
||||
(make-window Xwindow
|
||||
(window-display window)
|
||||
#f))))
|
||||
|
||||
(import-lambda-definition %transient-for (Xdisplay Xwindow)
|
||||
"scx_Transient_For")
|
||||
|
|
Loading…
Reference in New Issue