From pbrochard at common-lisp.net Sat Feb 14 21:23:34 2009 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 14 Feb 2009 21:23:34 +0000 Subject: [clfswm-cvs] r199 - in clfswm: . src Message-ID: Author: pbrochard Date: Sat Feb 14 21:23:34 2009 New Revision: 199 Log: handle-map-request: Add a fix to manage correctly fullscreen windows (SDL particularly). Modified: clfswm/ChangeLog clfswm/src/clfswm-internal.lisp clfswm/src/clfswm.lisp Modified: clfswm/ChangeLog ============================================================================== --- clfswm/ChangeLog (original) +++ clfswm/ChangeLog Sat Feb 14 21:23:34 2009 @@ -1,3 +1,8 @@ +2009-02-14 Philippe Brochard + + * src/clfswm.lisp (handle-map-request): Add a fix to manage + correctly fullscreen windows (SDL particularly). + 2008-12-20 Philippe Brochard * src/xlib-util.lisp (get-color): Allocate colors only once -> fix Modified: clfswm/src/clfswm-internal.lisp ============================================================================== --- clfswm/src/clfswm-internal.lisp (original) +++ clfswm/src/clfswm-internal.lisp Sat Feb 14 21:23:34 2009 @@ -331,7 +331,7 @@ (when (member to-find (frame-child frame)) (return-from find-parent-frame frame)))) - + (defun find-frame-window (window &optional (root *root-frame*)) "Return the frame with the window window" @@ -410,7 +410,7 @@ (setf (xlib:gcontext-foreground gc) (get-color (if (and (equal frame *current-root*) (equal frame *current-child*)) *frame-foreground-root* *frame-foreground*))) - (xlib:draw-glyphs *pixmap-buffer* gc 5 dy + (xlib:draw-glyphs *pixmap-buffer* gc 5 dy (format nil "Frame: ~A~A" number (if name (format nil " - ~A" name) ""))) Modified: clfswm/src/clfswm.lisp ============================================================================== --- clfswm/src/clfswm.lisp (original) +++ clfswm/src/clfswm.lisp Sat Feb 14 21:23:34 2009 @@ -92,13 +92,19 @@ -(defun handle-map-request (&rest event-slots &key window send-event-p &allow-other-keys) +(defun handle-map-request (&rest event-slots &key window send-event-p override-redirect-p &allow-other-keys) (declare (ignore event-slots)) (unless send-event-p (unhide-window window) (process-new-window window) (xlib:map-window window) - (show-all-children))) + ;;; Quick hack to manage correctly fullscreen windows + (let* ((hints (xlib:wm-normal-hints window)) + (win-gravity (and hints (xlib:wm-size-hints-win-gravity hints)))) + (when win-gravity + (show-all-children))))) + + (defun handle-unmap-notify (&rest event-slots &key send-event-p event-window window &allow-other-keys) (declare (ignore event-slots)) From pbrochard at common-lisp.net Sun Feb 15 07:45:02 2009 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 15 Feb 2009 07:45:02 +0000 Subject: [clfswm-cvs] r200 - clfswm/src Message-ID: Author: pbrochard Date: Sun Feb 15 07:45:02 2009 New Revision: 200 Log: handle-map-request: Remove unused override-redirect-p argument Modified: clfswm/src/clfswm.lisp Modified: clfswm/src/clfswm.lisp ============================================================================== --- clfswm/src/clfswm.lisp (original) +++ clfswm/src/clfswm.lisp Sun Feb 15 07:45:02 2009 @@ -92,7 +92,7 @@ -(defun handle-map-request (&rest event-slots &key window send-event-p override-redirect-p &allow-other-keys) +(defun handle-map-request (&rest event-slots &key window send-event-p &allow-other-keys) (declare (ignore event-slots)) (unless send-event-p (unhide-window window) From pbrochard at common-lisp.net Sun Feb 15 13:33:08 2009 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sun, 15 Feb 2009 13:33:08 +0000 Subject: [clfswm-cvs] r201 - clfswm/src Message-ID: Author: pbrochard Date: Sun Feb 15 13:33:07 2009 New Revision: 201 Log: Handle fullscreen windows the icewm way Modified: clfswm/src/clfswm.lisp Modified: clfswm/src/clfswm.lisp ============================================================================== --- clfswm/src/clfswm.lisp (original) +++ clfswm/src/clfswm.lisp Sun Feb 15 13:33:07 2009 @@ -98,10 +98,10 @@ (unhide-window window) (process-new-window window) (xlib:map-window window) - ;;; Quick hack to manage correctly fullscreen windows (let* ((hints (xlib:wm-normal-hints window)) - (win-gravity (and hints (xlib:wm-size-hints-win-gravity hints)))) - (when win-gravity + (width (and hints (xlib:wm-size-hints-width hints))) + (height (and hints (xlib:wm-size-hints-height hints)))) + (when (and width height) (show-all-children))))) From pbrochard at common-lisp.net Tue Feb 17 21:55:34 2009 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Tue, 17 Feb 2009 21:55:34 +0000 Subject: [clfswm-cvs] r202 - in clfswm: . src Message-ID: Author: pbrochard Date: Tue Feb 17 21:55:33 2009 New Revision: 202 Log: null-size-window-p): Better check of null sized windows. Modified: clfswm/ChangeLog clfswm/src/clfswm.lisp clfswm/src/xlib-util.lisp Modified: clfswm/ChangeLog ============================================================================== --- clfswm/ChangeLog (original) +++ clfswm/ChangeLog Tue Feb 17 21:55:33 2009 @@ -1,3 +1,8 @@ +2009-02-17 Philippe Brochard + + * src/xlib-util.lisp (null-size-window-p): Better check of null + sized windows. + 2009-02-14 Philippe Brochard * src/clfswm.lisp (handle-map-request): Add a fix to manage Modified: clfswm/src/clfswm.lisp ============================================================================== --- clfswm/src/clfswm.lisp (original) +++ clfswm/src/clfswm.lisp Tue Feb 17 21:55:33 2009 @@ -98,11 +98,8 @@ (unhide-window window) (process-new-window window) (xlib:map-window window) - (let* ((hints (xlib:wm-normal-hints window)) - (width (and hints (xlib:wm-size-hints-width hints))) - (height (and hints (xlib:wm-size-hints-height hints)))) - (when (and width height) - (show-all-children))))) + (unless (null-size-window-p window) + (show-all-children)))) Modified: clfswm/src/xlib-util.lisp ============================================================================== --- clfswm/src/xlib-util.lisp (original) +++ clfswm/src/xlib-util.lisp Tue Feb 17 21:55:33 2009 @@ -115,6 +115,18 @@ (eql (window-state window) +iconic-state+)) +(defun null-size-window-p (window) + (let ((hints (xlib:wm-normal-hints window))) + (and hints + (not (or (xlib:wm-size-hints-width hints) + (xlib:wm-size-hints-height hints) + (xlib:wm-size-hints-win-gravity hints))) + (xlib:wm-size-hints-user-specified-position-p hints)))) + + + + + (defun unhide-window (window) (when window