From ffd26a509cbd33410d44e9843e5c65fba8727133 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 8 Jan 2024 07:58:23 -0800 Subject: [PATCH] Duplicate systemtray:-ClientMessage to xsettings:-ClientMessage And fix the imports. --- exwm-xsettings.el | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/exwm-xsettings.el b/exwm-xsettings.el index 370b2da..b89285b 100644 --- a/exwm-xsettings.el +++ b/exwm-xsettings.el @@ -47,6 +47,9 @@ ;;; Code: +(require 'xcb-ewmh) +(require 'xcb-icccm) + (require 'exwm-core) (defvar exwm-xsettings--connection nil) @@ -167,6 +170,15 @@ These settings take precedence over `exwm-xsettings-theme' and `exwm-xsettings-i (blue :initarg :blue :type xcb:CARD16) (alpha :initarg :alpha :initform #xffff :type xcb:CARD16))) +(defclass xcb:xsettings:-ClientMessage + (xcb:icccm:--ClientMessage xcb:ClientMessage) + ((format :initform 32) + (type :initform 'xcb:Atom:MANAGER) + (time :initarg :time :type xcb:TIMESTAMP) ;new slot + (selection :initarg :selection :type xcb:ATOM) ;new slot + (owner :initarg :owner :type xcb:WINDOW)) ;new slot + :documentation "An XSETTINGS client message.") + (defun exwm-xsettings--pick-theme (theme) "Pick a light or dark theme from the given THEME. If THEME is a string, it's returned directly. @@ -329,8 +341,7 @@ SERIAL is a sequence number." :destination exwm--root :event-mask xcb:EventMask:StructureNotify :event (xcb:marshal - ;; TODO: new event? Do I need a new field? - (make-instance 'xcb:systemtray:-ClientMessage + (make-instance 'xcb:xsettings:-ClientMessage :window exwm--root :time xcb:Time:CurrentTime :selection exwm-xsettings--XSETTINGS_S0-atom