Raise all docks/panels when switching workspace
* exwm.el (exwm--update-struts-legacy, exwm--update-struts-partial): Always set the struts value, even it's nil. * exwm-workspace.el (exwm-workspace--update-struts): Check for nil struts values.
This commit is contained in:
		
							parent
							
								
									ebcc9591f3
								
							
						
					
					
						commit
						badf1c30a0
					
				
					 2 changed files with 19 additions and 26 deletions
				
			
		| 
						 | 
					@ -232,18 +232,19 @@ Value nil means to use the default position which is fixed at bottom, while
 | 
				
			||||||
  (let (struts struts*)
 | 
					  (let (struts struts*)
 | 
				
			||||||
    (dolist (pair exwm-workspace--id-struts-alist)
 | 
					    (dolist (pair exwm-workspace--id-struts-alist)
 | 
				
			||||||
      (setq struts (cdr pair))
 | 
					      (setq struts (cdr pair))
 | 
				
			||||||
      (dotimes (i 4)
 | 
					      (when struts
 | 
				
			||||||
        (when (/= 0 (aref struts i))
 | 
					        (dotimes (i 4)
 | 
				
			||||||
          (setq struts*
 | 
					          (when (/= 0 (aref struts i))
 | 
				
			||||||
                (vector (aref [left right top bottom] i)
 | 
					            (setq struts*
 | 
				
			||||||
                        (aref struts i)
 | 
					                  (vector (aref [left right top bottom] i)
 | 
				
			||||||
                        (when (= 12 (length struts))
 | 
					                          (aref struts i)
 | 
				
			||||||
                          (substring struts (+ 4 (* i 2)) (+ 6 (* i 2))))))
 | 
					                          (when (= 12 (length struts))
 | 
				
			||||||
          (if (= 0 (mod i 2))
 | 
					                            (substring struts (+ 4 (* i 2)) (+ 6 (* i 2))))))
 | 
				
			||||||
              ;; Make left/top processed first.
 | 
					            (if (= 0 (mod i 2))
 | 
				
			||||||
              (push struts* exwm-workspace--struts)
 | 
					                ;; Make left/top processed first.
 | 
				
			||||||
            (setq exwm-workspace--struts
 | 
					                (push struts* exwm-workspace--struts)
 | 
				
			||||||
                  (append exwm-workspace--struts (list struts*)))))))))
 | 
					              (setq exwm-workspace--struts
 | 
				
			||||||
 | 
					                    (append exwm-workspace--struts (list struts*))))))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defvar exwm-workspace--workareas nil "Workareas (struts excluded).")
 | 
					(defvar exwm-workspace--workareas nil "Workareas (struts excluded).")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										20
									
								
								exwm.el
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								exwm.el
									
										
									
									
									
								
							| 
						 | 
					@ -268,13 +268,9 @@
 | 
				
			||||||
                                     :window id)))
 | 
					                                     :window id)))
 | 
				
			||||||
      (when reply
 | 
					      (when reply
 | 
				
			||||||
        (setq struts (slot-value reply 'value))
 | 
					        (setq struts (slot-value reply 'value))
 | 
				
			||||||
        (if struts
 | 
					        (if pair
 | 
				
			||||||
            (if pair
 | 
					            (setcdr pair struts)
 | 
				
			||||||
                (setcdr pair struts)
 | 
					          (push (cons id struts) exwm-workspace--id-struts-alist))
 | 
				
			||||||
              (push (cons id struts) exwm-workspace--id-struts-alist))
 | 
					 | 
				
			||||||
          (when pair
 | 
					 | 
				
			||||||
            (setq exwm-workspace--id-struts-alist
 | 
					 | 
				
			||||||
                  (assq-delete-all id exwm-workspace--id-struts-alist))))
 | 
					 | 
				
			||||||
        (exwm-workspace--update-struts))
 | 
					        (exwm-workspace--update-struts))
 | 
				
			||||||
      ;; Update workareas and set _NET_WORKAREA.
 | 
					      ;; Update workareas and set _NET_WORKAREA.
 | 
				
			||||||
      (exwm-workspace--update-workareas)
 | 
					      (exwm-workspace--update-workareas)
 | 
				
			||||||
| 
						 | 
					@ -291,13 +287,9 @@
 | 
				
			||||||
    (when reply
 | 
					    (when reply
 | 
				
			||||||
      (setq struts (slot-value reply 'value)
 | 
					      (setq struts (slot-value reply 'value)
 | 
				
			||||||
            pair (assq id exwm-workspace--id-struts-alist))
 | 
					            pair (assq id exwm-workspace--id-struts-alist))
 | 
				
			||||||
      (if struts
 | 
					      (if pair
 | 
				
			||||||
          (if pair
 | 
					          (setcdr pair struts)
 | 
				
			||||||
              (setcdr pair struts)
 | 
					        (push (cons id struts) exwm-workspace--id-struts-alist))
 | 
				
			||||||
            (push (cons id struts) exwm-workspace--id-struts-alist))
 | 
					 | 
				
			||||||
        (when pair
 | 
					 | 
				
			||||||
          (setq exwm-workspace--id-struts-alist
 | 
					 | 
				
			||||||
                (assq-delete-all id exwm-workspace--id-struts-alist))))
 | 
					 | 
				
			||||||
      (exwm-workspace--update-struts))
 | 
					      (exwm-workspace--update-struts))
 | 
				
			||||||
    ;; Update workareas and set _NET_WORKAREA.
 | 
					    ;; Update workareas and set _NET_WORKAREA.
 | 
				
			||||||
    (exwm-workspace--update-workareas)
 | 
					    (exwm-workspace--update-workareas)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue