- made main-window and client-window transparent and removed
main-window drawing (xsetroot or xsetbg can now be used to set a nice background) - changed show-clients to reduce flickering
This commit is contained in:
		
							parent
							
								
									1f5fb4081f
								
							
						
					
					
						commit
						2928e57803
					
				| 
						 | 
				
			
			@ -72,10 +72,7 @@
 | 
			
		|||
		 (data:titlebars data))
 | 
			
		||||
       (exit 'deinit-manager))
 | 
			
		||||
 | 
			
		||||
      ((draw-main-window)
 | 
			
		||||
       (set-gc-foreground! dpy gc (black-pixel dpy))
 | 
			
		||||
       (fill-rectangle* dpy window gc
 | 
			
		||||
			(clip-rectangle dpy window)))
 | 
			
		||||
      ((draw-main-window) #t)
 | 
			
		||||
 | 
			
		||||
      ((fit-windows)
 | 
			
		||||
       (fit-titlebars wm data)
 | 
			
		||||
| 
						 | 
				
			
			@ -151,9 +148,9 @@
 | 
			
		|||
	 ;; it's a list of a client and it's transients.
 | 
			
		||||
	 (let ((cc (wm-current-client wm))
 | 
			
		||||
	       (top (last clients)))
 | 
			
		||||
	   (map-window dpy (client:client-window top))
 | 
			
		||||
	   (if (and cc (window-mapped? dpy (client:client-window cc)))
 | 
			
		||||
	       (unmap-window dpy (client:client-window cc)))
 | 
			
		||||
	   (map-window dpy (client:client-window top)))))
 | 
			
		||||
	       (unmap-window dpy (client:client-window cc))))))
 | 
			
		||||
 | 
			
		||||
      (else (warn "unhandled switch-wm message" wm msg)))))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -285,9 +282,24 @@
 | 
			
		|||
 | 
			
		||||
(define (fit-client wm client)
 | 
			
		||||
  (let ((window (client:window client))
 | 
			
		||||
	(client-window (client:client-window client))
 | 
			
		||||
	(dpy (wm:dpy wm)))
 | 
			
		||||
    (if (window-exists? dpy window)
 | 
			
		||||
	(maximize-window dpy window))))
 | 
			
		||||
	(begin
 | 
			
		||||
	  (maximize-window dpy window)
 | 
			
		||||
	  ;; if the client fills the full client-window, we set the
 | 
			
		||||
	  ;; client-window to transparent, so if the client is
 | 
			
		||||
	  ;; transparent too, the root-windows pixmap can be seen.
 | 
			
		||||
	  (let ((r1 (clip-rectangle dpy window))
 | 
			
		||||
		(r2 (clip-rectangle dpy client-window)))
 | 
			
		||||
	    (if (and (equal? (rectangle:width r1) (rectangle:width r2))
 | 
			
		||||
		     (equal? (rectangle:height r1) (rectangle:height r2)))
 | 
			
		||||
		;; client fill client-window completely, make it transparent
 | 
			
		||||
		(set-window-background-pixmap! dpy client-window
 | 
			
		||||
					       parent-relative)
 | 
			
		||||
		;; otherwise make it black
 | 
			
		||||
		(set-window-background-pixel! dpy client-window
 | 
			
		||||
					      (black-pixel dpy))))))))
 | 
			
		||||
 | 
			
		||||
(define (fit-client-window wm client)
 | 
			
		||||
  (let* ((dpy (wm:dpy wm))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue