[clfswm-cvs] r199 - in clfswm: . src

Philippe Brochard pbrochard at common-lisp.net
Sat Feb 14 21:23:34 UTC 2009


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  <pbrochard at common-lisp.net>
+
+	* src/clfswm.lisp (handle-map-request): Add a fix to manage
+	correctly fullscreen windows (SDL particularly).
+
 2008-12-20  Philippe Brochard  <pbrochard at common-lisp.net>
 
 	* 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))




More information about the clfswm-cvs mailing list