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