Make the windows ID always a string

With some Wayland DEs/compositors, the APP id isn't always a base 10
number, so let's just leave it as a string instead of parsing it then
making it a string again.
This commit is contained in:
TEC 2024-04-16 11:20:12 +08:00
parent 98de03162e
commit 08e5101045
Signed by: tec
SSH Key Fingerprint: SHA256:I+UrABB3N7OiMv1W/7B7e5SUL1CP5cmXo9tpscSs+9w
1 changed files with 3 additions and 4 deletions

View File

@ -397,12 +397,11 @@ Never paste content when ABORT is non-nil."
(cdr emacs-everywhere-copy-command))))))
(sleep-for emacs-everywhere-clipboard-sleep-delay) ; prevents weird multi-second pause, lets clipboard info propagate
(when emacs-everywhere-window-focus-command
(let* ((window-id (emacs-everywhere-app-id emacs-everywhere-current-app))
(window-id-str (if (numberp window-id) (number-to-string window-id) window-id)))
(let ((window-id (emacs-everywhere-app-id emacs-everywhere-current-app)))
(apply #'call-process (car emacs-everywhere-window-focus-command)
nil nil nil
(mapcar (lambda (arg)
(replace-regexp-in-string "%w" window-id-str arg))
(replace-regexp-in-string "%w" window-id arg))
(cdr emacs-everywhere-window-focus-command)))
;; The frame only has this parameter if this package initialized the temp
;; file its displaying. Otherwise, it was created by another program, likely
@ -465,7 +464,7 @@ Please go to 'System Preferences > Security & Privacy > Privacy > Accessibility'
(`(wayland . KDE) (emacs-everywhere--app-info-linux-kde))
(_ (user-error "Unable to fetch app info with display server %S" emacs-everywhere--display-server)))))
(make-emacs-everywhere-app
:id (string-to-number window-id)
:id window-id
:class app-name
:title window-title
:geometry (list