Commit 51f9f157 authored by Philippe Brochard's avatar Philippe Brochard
Browse files

Set expose windows and gcontexts to nil when done in expose-mode

parent 544f93c4
......@@ -88,6 +88,7 @@
(expose-child-string ex-child))
(copy-pixmap-buffer window gc)))))
(defun expose-create-window (ex-child)
(let ((child (expose-child-child ex-child)))
(with-current-child (child)
......@@ -182,8 +183,8 @@
(multiple-value-bind (letters return)
(query-string "Which child ?")
(let ((ex-child (case return
(:return (expose-find-child-from-letters letters))
(:click *expose-selected-child*))))
(:return (expose-find-child-from-letters letters))
(:click *expose-selected-child*))))
(when ex-child
(expose-child-child ex-child))))))
......@@ -195,7 +196,9 @@
(awhen (expose-child-gc ex-child)
(xlib:free-gcontext it))
(awhen (expose-child-window ex-child)
(xlib:destroy-window it)))
(xlib:destroy-window it))
(setf (expose-child-gc ex-child) nil
(expose-child-window ex-child) nil))
(when *expose-font*
(xlib:close-font *expose-font*))
(expose-unpresent-windows))
......
......@@ -61,7 +61,7 @@
(xlib:draw-glyphs *pixmap-buffer* *fastswitch-gc*
(* (xlib:max-char-width *fastswitch-font*) posx)
placey
(child-fullname (expose-child-child ex-child)))
(ensure-printable (child-fullname (expose-child-child ex-child))))
(incf posx (1+ (length (child-fullname (expose-child-child ex-child))))))
posx))
......
......@@ -252,10 +252,10 @@
(defgeneric set-child-name (child name))
(defmethod set-child-name ((child xlib:window) name)
(setf (xlib:wm-name child) name))
(setf (xlib:wm-name child) (ensure-printable name)))
(defmethod set-child-name ((child frame) name)
(setf (frame-name child) name))
(setf (frame-name child) (ensure-printable name)))
(defmethod set-child-name (child name)
(declare (ignore child name)))
......@@ -268,14 +268,12 @@
(defgeneric child-fullname (child))
(defmethod child-fullname ((child xlib:window))
(ensure-printable
(format nil "~A (~A)" (or (xlib:wm-name child) "?") (or (xlib:get-wm-class child) "?"))))
(format nil "~A (~A)" (or (xlib:wm-name child) "?") (or (xlib:get-wm-class child) "?")))
(defmethod child-fullname ((child frame))
(ensure-printable
(aif (frame-name child)
(format nil "~A (Frame ~A)" it (frame-number child))
(format nil "Frame ~A" (frame-number child)))))
(aif (frame-name child)
(format nil "~A (Frame ~A)" it (frame-number child))
(format nil "Frame ~A" (frame-number child))))
(defmethod child-fullname (child)
(declare (ignore child))
......
......@@ -1003,6 +1003,7 @@ they should be windows. So use this function to make a window out of them."
t))))
(defun copy-pixmap-buffer (window gc)
(xlib:copy-area *pixmap-buffer* gc
0 0 (x-drawable-width window) (x-drawable-height window)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment