Commit 121226d2 authored by Alastair Bridgewater's avatar Alastair Bridgewater
Browse files

clx-interface: Extract SET-WINDOW-SPACE-REQUIREMENT from INIT-DISPLAY.

  * This should have been done a long time ago, if not been done
this way from the start.  It's a self-contained bit of code with a
sharply-defined responsibility and boundary, and thus it should be
in its own function.

  * A straightforward extract-method refactoring, not much to see
here.  Move along, citizen.
parent 92770396
......@@ -51,6 +51,15 @@
;; when next a GLX connection is made.
(setf glx::*current-context* nil))
(defun set-window-space-requirement (window space-requirement)
(multiple-value-bind
(width min-width max-width height max-height min-height)
(space-requirement-components space-requirement)
(setf (xlib:wm-normal-hints window)
(xlib:make-wm-size-hints
:width width :min-width min-width :max-width max-width
:height height :min-height min-height :max-height max-height))))
(defun init-display (&key display-name space-requirement window-title)
(setf *display* (xlib:open-default-display display-name))
#+(or)
......@@ -89,13 +98,7 @@
(or window-title *default-window-title*))
(when space-requirement
(multiple-value-bind
(width min-width max-width height max-height min-height)
(space-requirement-components space-requirement)
(setf (xlib:wm-normal-hints window)
(xlib:make-wm-size-hints
:width width :min-width min-width :max-width max-width
:height height :min-height min-height :max-height max-height))))
(set-window-space-requirement window space-requirement))
(xlib:map-window window)
;; Set up a GLX context for us to use.
......
Markdown is supported
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