[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 4970d6ad4e 03/14: More selectively ignore top and
From: |
ELPA Syncer |
Subject: |
[elpa] externals/exwm 4970d6ad4e 03/14: More selectively ignore top and bottom struts |
Date: |
Wed, 6 Sep 2023 15:57:51 -0400 (EDT) |
branch: externals/exwm
commit 4970d6ad4ef7c9cff92cbfb90a9ec379a61cd5e7
Author: Fran Ley <fran.ley@mailfence.com>
Commit: Adrián Medraño Calvo <adrian@medranocalvo.com>
More selectively ignore top and bottom struts
For the case of vertical columns of workareas, top and bottom struts
should only apply to workareas containing the respective edge of the
strut offset.
To simplify, imagine three monitors arranged vertically and one
workarea per display:
+-------+
| 1 | 2000x1000 px
+-------+
| 2 | 2000x1000 px
+-------+
| 3 | 2000x1000 px
+-------+
In sexp form: ((0 0 2000 1000) (0 1000 2000 1000) (0 2000 2000 1000))
where each element represents a workarea as x, y, width, height
And example struts of the form (offset-type offset (x-start x-end))
a.) (top 42 (0 2000))
b.) (top 1042 (0 2000))
c.) (top 2042 (0 2000))
d.) (bottom 42 (0 2000))
e.) (bottom 1042 (0 2000))
f.) (bottom 2042 (0 2000))
Workareas adjusted for struts before this change:
a.) ((0 42 2000 958) (0 1000 2000 1000) (0 2000 2000 1000))
b.) ((0 1042 2000 -42) (0 1042 2000 958) (0 2000 2000 1000))
c.) ((0 2042 2000 -1042) (0 2042 2000 -42) (0 2042 2000 958))
d.) ((0 0 2000 1000) (0 1000 2000 1000) (0 2000 2000 902))
e.) ((0 0 2000 1000) (0 1000 2000 902) (0 2000 2000 -98))
f.) ((0 0 2000 902) (0 1000 2000 -98) (0 2000 2000 -1098))
Note that a. and d. are sensible, while b., c., e., and f. are quite
user unfriendly.
After this change, the same adjusted workareas are:
a.) no change
b.) ((0 0 2000 1000) (0 1042 2000 958) (0 2000 2000 1000))
c.) ((0 0 2000 1000) (0 1000 2000 1000) (0 2042 2000 958))
d.) no change
e.) ((0 0 2000 1000) (0 1000 2000 902) (0 2000 2000 1000))
f.) ((0 0 2000 902) (0 1000 2000 1000) (0 2000 2000 1000))
The intent is to allow dock type windows such as typical status bars
to occupy space in a workarea on any of a set of vertically arranged
displays without occluding the other workareas due to the limitations
of the X spec regarding strut offsets.
Note that this behaviour conflicts with EWMH 1.3:
> Struts MUST be specified in root window coordinates, that is,
they are *not* relative to the edges of any view port or Xinerama
monitor.
but is accepted by multiple WMs. See:
-
https://blog.martin-graesslin.com/blog/2016/08/panels-on-shared-screen-edges/
- https://mail.gnome.org/archives/wm-spec-list/2009-November/msg00005.html
- https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/22
* exwm-workspace.el (exwm-workspace--update-workareas): Assume
vertical struts apply from the monitor boundary when they cross
them.
Copyright-paperwork-exempt: yes
---
exwm-workspace.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 06217a7769..1f60e80c63 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -377,7 +377,9 @@ NIL if FRAME is not a workspace"
(or (not position)
(< (max (aref position 0) (aref w 0))
(min (aref position 1)
- (+ (aref w 0) (aref w 2))))))
+ (+ (aref w 0) (aref w 2)))))
+ (< width (+ (aref w 1) (aref w 3)))
+ (> width (aref w 1)))
(cl-incf (aref w 3) delta)
(setf (aref w 1) width)))
(`bottom
@@ -386,7 +388,10 @@ NIL if FRAME is not a workspace"
(or (not position)
(< (max (aref position 0) (aref w 0))
(min (aref position 1)
- (+ (aref w 0) (aref w 2))))))
+ (+ (aref w 0) (aref w 2)))))
+ (< (- root-height width)
+ (+ (aref w 1) (aref w 3)))
+ (> (- root-height width) (aref w 1)))
(cl-incf (aref w 3) delta))))))
;; Save the result.
(setq exwm-workspace--workareas workareas)
- [elpa] externals/exwm 612e64bf9b 10/14: Update copyright year to 2023, (continued)
- [elpa] externals/exwm 612e64bf9b 10/14: Update copyright year to 2023, ELPA Syncer, 2023/09/06
- [elpa] externals/exwm d340a6a563 08/14: Merge branch 'jollm.github.com/ignore-struts-top-bottom' into externals/exwm, ELPA Syncer, 2023/09/06
- [elpa] externals/exwm c7d1fd45bc 12/14: Fix layout being refreshed too often on minibuffer setup, ELPA Syncer, 2023/09/06
- [elpa] externals/exwm 67c5b316be 05/14: Convert `exwm-workspace--workareas' to a list of `xcb:RECTANGLE's, ELPA Syncer, 2023/09/06
- [elpa] externals/exwm cff02333e2 01/14: Don't assume that exwm--connection is non-nil, ELPA Syncer, 2023/09/06
- [elpa] externals/exwm 7318f857f2 02/14: Observe connection status on deinitialization, ELPA Syncer, 2023/09/06
- [elpa] externals/exwm d8fcf18db7 09/14: Declare defsubst indentation, ELPA Syncer, 2023/09/06
- [elpa] externals/exwm fb73aaaf8f 11/14: Convert `lsh' to `ash', ELPA Syncer, 2023/09/06
- [elpa] externals/exwm d3567a8c7f 13/14: Fix bytecompiler warnings, improve docstrings, ELPA Syncer, 2023/09/06
- [elpa] externals/exwm 381637aa1c 14/14: Declare external function, ELPA Syncer, 2023/09/06
- [elpa] externals/exwm 4970d6ad4e 03/14: More selectively ignore top and bottom struts,
ELPA Syncer <=
- [elpa] externals/exwm 937da86458 06/14: Convert `delta' to the size the strut occupies in the workarea, ELPA Syncer, 2023/09/06