From: Philippe Brochard Date: Sun, 6 Jan 2013 15:08:41 +0000 (+0100) Subject: Set windows with max-size greater than root sizes to normal windows type X-Git-Url: https://repo.or.cz/w/clfswm.git/commitdiff_plain/6a451c65b93ea73212a9c216190a946d0e5c04fb Set windows with max-size greater than root sizes to normal windows type --- diff --git a/src/clfswm-internal.lisp b/src/clfswm-internal.lisp index e543dc0..819a420 100644 --- a/src/clfswm-internal.lisp +++ b/src/clfswm-internal.lisp @@ -1062,7 +1062,7 @@ XINERAMA version 1.1 opcode: 150 (defgeneric set-child-stack-order (window child) - (:documentation "Raise window if child is NIL else put window just below child")) + (:documentation "Put window just below child")) (defmethod set-child-stack-order (window (child xlib:window)) (lower-window window child)) diff --git a/src/clfswm-util.lisp b/src/clfswm-util.lisp index 8bc8b62..859ef9f 100644 --- a/src/clfswm-util.lisp +++ b/src/clfswm-util.lisp @@ -1201,12 +1201,13 @@ For window: set current child to window or its parent according to window-parent (defun display-current-window-info () "Display information on the current window" (with-current-window - (info-mode (list (format nil "Window: ~A" window) - (format nil "Window name: ~A" (xlib:wm-name window)) - (format nil "Window class: ~A" (xlib:get-wm-class window)) - (format nil "Window type: ~:(~A~)" (window-type window)) - (format nil "Window id: 0x~X" (xlib:window-id window)) - (format nil "Window transparency: ~A" (* 100 (window-transparency window)))))) + (info-mode (append (list (format nil "Window: ~A" window) + (format nil "Window name: ~A" (xlib:wm-name window)) + (format nil "Window class: ~A" (xlib:get-wm-class window)) + (format nil "Window type: ~:(~A~)" (window-type window)) + (format nil "Window id: 0x~X" (xlib:window-id window)) + (format nil "Window transparency: ~A" (* 100 (window-transparency window)))) + (split-string (format nil "~A" (xlib:wm-normal-hints window)) #\Newline)))) (leave-second-mode)) (defun set-current-window-transparency () diff --git a/src/package.lisp b/src/package.lisp index 1515fb2..c3c495b 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -109,7 +109,7 @@ It is particulary useful with CLISP/MIT-CLX.") ;;; CONFIG - Default managed window type for a frame ;;; type can be :all, :normal, :transient, :maxsize, :desktop, :dock, :toolbar, :menu, :utility, :splash, :dialog -(defconfig *default-managed-type* '(:normal :maxsize) nil +(defconfig *default-managed-type* '(:normal) nil "Default managed window types") ;;(defparameter *default-managed-type* '(:normal :maxsize :transient)) ;;(defparameter *default-managed-type* '(:normal :transient :maxsize :desktop :dock :toolbar :menu :utility :splash :dialog)) diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index dcb552f..97ff700 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -471,8 +471,10 @@ they should be windows. So use this function to make a window out of them." "Return one of :desktop, :dock, :toolbar, :utility, :splash, :dialog, :transient, :maxsize and :normal." (or (and (let ((hints (xlib:wm-normal-hints window))) - (and hints (or (xlib:wm-size-hints-max-width hints) - (xlib:wm-size-hints-max-height hints) + (and hints (or (and (xlib:wm-size-hints-max-width hints) + (< (xlib:wm-size-hints-max-width hints) (x-drawable-width *root*))) + (and (xlib:wm-size-hints-max-height hints) + (< (xlib:wm-size-hints-max-height hints) (x-drawable-height *root*))) (xlib:wm-size-hints-min-aspect hints) (xlib:wm-size-hints-max-aspect hints)))) :maxsize)