Skip to content

Commit 2c50ed0

Browse files
committed
Support WM_Sn atoms
* xcb-icccm.el (xcb:icccm:-atom, xcb:icccm:init): Register WM_Sn atoms for each screen.
1 parent 45b3088 commit 2c50ed0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

xcb-icccm.el

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
(defconst xcb:icccm:-atoms
5050
'(UTF8_STRING COMPOUND_TEXT TEXT C_STRING MANAGER
5151
WM_PROTOCOLS WM_TAKE_FOCUS WM_DELETE_WINDOW
52-
WM_STATE WM_CHANGE_STATE)
52+
WM_STATE WM_CHANGE_STATE WM_S0)
5353
"Atoms involved in ICCCM.")
5454

5555
(dolist (atom xcb:icccm:-atoms)
@@ -60,11 +60,14 @@
6060
6161
This method must be called before using any other method in this module."
6262
(when (or force (not xcb:Atom:WM_PROTOCOLS))
63-
(xcb:icccm:intern-atoms obj xcb:icccm:-atoms force)))
63+
(let ((atoms xcb:icccm:-atoms))
64+
(dotimes (i (1- (x-display-screens)))
65+
(push (intern (format "WM_S%d" (1+ i))) atoms))
66+
(xcb:icccm:intern-atoms obj atoms force))))
6467

6568
(cl-defmethod xcb:icccm:intern-atoms ((obj xcb:connection) atoms
6669
&optional force)
67-
"Intern the X atoms listed in the list AOTMS.
70+
"Intern the X atoms listed in the list ATOMS.
6871
6972
The value of these atoms will be available in `xcb:Atom' namespace."
7073
(dolist (atom atoms)

0 commit comments

Comments
 (0)