- 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))
 | 
							 (data:titlebars data))
 | 
				
			||||||
       (exit 'deinit-manager))
 | 
					       (exit 'deinit-manager))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      ((draw-main-window)
 | 
					      ((draw-main-window) #t)
 | 
				
			||||||
       (set-gc-foreground! dpy gc (black-pixel dpy))
 | 
					 | 
				
			||||||
       (fill-rectangle* dpy window gc
 | 
					 | 
				
			||||||
			(clip-rectangle dpy window)))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      ((fit-windows)
 | 
					      ((fit-windows)
 | 
				
			||||||
       (fit-titlebars wm data)
 | 
					       (fit-titlebars wm data)
 | 
				
			||||||
| 
						 | 
					@ -151,9 +148,9 @@
 | 
				
			||||||
	 ;; it's a list of a client and it's transients.
 | 
						 ;; it's a list of a client and it's transients.
 | 
				
			||||||
	 (let ((cc (wm-current-client wm))
 | 
						 (let ((cc (wm-current-client wm))
 | 
				
			||||||
	       (top (last clients)))
 | 
						       (top (last clients)))
 | 
				
			||||||
 | 
						   (map-window dpy (client:client-window top))
 | 
				
			||||||
	   (if (and cc (window-mapped? dpy (client:client-window cc)))
 | 
						   (if (and cc (window-mapped? dpy (client:client-window cc)))
 | 
				
			||||||
	       (unmap-window dpy (client:client-window cc)))
 | 
						       (unmap-window dpy (client:client-window cc))))))
 | 
				
			||||||
	   (map-window dpy (client:client-window top)))))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      (else (warn "unhandled switch-wm message" wm msg)))))
 | 
					      (else (warn "unhandled switch-wm message" wm msg)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -285,9 +282,24 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define (fit-client wm client)
 | 
					(define (fit-client wm client)
 | 
				
			||||||
  (let ((window (client:window client))
 | 
					  (let ((window (client:window client))
 | 
				
			||||||
 | 
						(client-window (client:client-window client))
 | 
				
			||||||
	(dpy (wm:dpy wm)))
 | 
						(dpy (wm:dpy wm)))
 | 
				
			||||||
    (if (window-exists? dpy window)
 | 
					    (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)
 | 
					(define (fit-client-window wm client)
 | 
				
			||||||
  (let* ((dpy (wm:dpy wm))
 | 
					  (let* ((dpy (wm:dpy wm))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue