[elpa] externals/xelb 4dcf60b: Add missing slots for WM_SIZE_HINTS classes
branch: externals/xelb commit 4dcf60b4cfcb0d882f23e6181bc2835154021545 Author: Chris Feng Commit: Chris Feng Add missing slots for WM_SIZE_HINTS classes * xcb-icccm.el (xcb:icccm:get-WM_SIZE_HINTS) (xcb:icccm:set-WM_SIZE_HINTS): Add the missing 'property' slot. --- xcb-icccm.el |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xcb-icccm.el b/xcb-icccm.el index 601ec14..e4a8336 100644 --- a/xcb-icccm.el +++ b/xcb-icccm.el @@ -375,14 +375,16 @@ whose fields are explicitly listed out." (win-gravity :initarg :win-gravity :initform 0 :type xcb:-ignore))) ;; (defclass xcb:icccm:get-WM_SIZE_HINTS (xcb:icccm:-GetProperty-explicit) - ((type :initform xcb:Atom:WM_SIZE_HINTS) + ((property :initform xcb:Atom:WM_SIZE_HINTS) + (type :initform xcb:Atom:WM_SIZE_HINTS) (long-length :initform 18))) ;fixed (defclass xcb:icccm:get-WM_SIZE_HINTS~reply (xcb:icccm:-GetProperty-explicit~reply xcb:icccm:-WM_SIZE_HINTS) nil) (defclass xcb:icccm:set-WM_SIZE_HINTS (xcb:icccm:-ChangeProperty-explicit xcb:icccm:-WM_SIZE_HINTS) - ((type :initform xcb:Atom:WM_SIZE_HINTS))) + ((property :initform xcb:Atom:WM_SIZE_HINTS) + (type :initform xcb:Atom:WM_SIZE_HINTS))) ;; WM_NORMAL_HINTS (defclass xcb:icccm:get-WM_NORMAL_HINTS (xcb:icccm:get-WM_SIZE_HINTS)
[elpa] externals/exwm 84dad20 1/4: Allow selecting an X window from another workspace
branch: externals/exwm commit 84dad20d6648638443bc7c731d7d60bbf0872bdb Author: Chris Feng Commit: Chris Feng Allow selecting an X window from another workspace * exwm-input.el (exwm-input--on-buffer-list-update): Filter out switch-frame events. (exwm-input--update-focus): Switch workspace to set input focus on an X window from another workspace. --- exwm-input.el | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/exwm-input.el b/exwm-input.el index 8101cbd..b956f5c 100644 --- a/exwm-input.el +++ b/exwm-input.el @@ -160,6 +160,7 @@ This value should always be overwritten.") "Run in `buffer-list-update-hook' to track input focus." (when (and (not (minibufferp)) ;Do not set input focus on minibuffer window. (eq (current-buffer) (window-buffer)) ;e.g. `with-temp-buffer'. + (not (eq this-command #'handle-switch-frame)) (not (exwm-workspace--client-p))) (setq exwm-input--update-focus-window (selected-window)) (exwm-input--update-focus-defer))) @@ -214,14 +215,7 @@ This value should always be overwritten.") (with-current-buffer (window-buffer window) (if (eq major-mode 'exwm-mode) (if (not (eq exwm--frame exwm-workspace--current)) - ;; Do not focus X windows on other workspace. - (progn -(set-frame-parameter exwm--frame 'exwm-urgency t) -(setq exwm-workspace--switch-history-outdated t) -(force-mode-line-update) -;; The application may have changed its input focus -(select-window - (frame-selected-window exwm-workspace--current))) + (exwm-workspace-switch exwm--frame) (exwm--log "Set focus on #x%x" exwm--id) (exwm-input--set-focus exwm--id) (when exwm--floating-frame
[elpa] externals/exwm 2597f74 3/4: Remember the geometries of floating X windows
branch: externals/exwm commit 2597f74c7fb9ad290a45c89d0025bebcf739a976 Author: Chris Feng Commit: Chris Feng Remember the geometries of floating X windows * exwm-floating.el (exwm-floating--stop-moveresize): * exwm-layout.el (exwm-layout-enlarge-window): Update the geometry after resizing. --- exwm-floating.el | 31 ++- exwm-layout.el |2 ++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/exwm-floating.el b/exwm-floating.el index f2cc09b..5b8cc89 100644 --- a/exwm-floating.el +++ b/exwm-floating.el @@ -550,22 +550,35 @@ context of the corresponding buffer.") ;; Unmanaged. (eq major-mode 'exwm-mode)) (let ((edges (window-inside-absolute-pixel-edges (frame-selected-window))) - (id (buffer-local-value 'exwm--id - (window-buffer (frame-selected-window) + x y width height id) + (setq x (pop edges) +y (pop edges) +width (- (pop edges) x) +height (- (pop edges) y)) + (with-current-buffer (window-buffer (frame-selected-window)) +(setq id exwm--id) +(with-slots ((x* x) + (y* y) + (width* width) + (height* height)) +exwm--geometry + (setf x* x +y* y +width* width +height* height))) (xcb:+request exwm--connection (make-instance 'xcb:SendEvent - :propagate 0 :destination id + :propagate 0 + :destination id :event-mask xcb:EventMask:StructureNotify :event (xcb:marshal (make-instance 'xcb:ConfigureNotify :event id :window id :above-sibling xcb:Window:None -:x (elt edges 0) -:y (elt edges 1) -:width (- (elt edges 2) - (elt edges 0)) -:height (- (elt edges 3) - (elt edges 1)) +:x x +:y y +:width width +:height height :border-width 0 :override-redirect 0) exwm--connection) diff --git a/exwm-layout.el b/exwm-layout.el index 355b834..5a31c94 100644 --- a/exwm-layout.el +++ b/exwm-layout.el @@ -460,6 +460,7 @@ windows." (setq width (max (+ exwm--normal-hints-min-width margin) (+ width delta)) (when width +(setf (slot-value exwm--geometry 'width) width) (xcb:+request exwm--connection (make-instance 'xcb:ConfigureWindow :window (frame-parameter exwm--floating-frame @@ -492,6 +493,7 @@ windows." (setq height (max (+ exwm--normal-hints-min-height margin) (+ height delta)) (when height +(setf (slot-value exwm--geometry 'height) height) (xcb:+request exwm--connection (make-instance 'xcb:ConfigureWindow :window (frame-parameter exwm--floating-frame
[elpa] externals/exwm 6be7508 4/4: Use X window borders
branch: externals/exwm commit 6be75083c2adeb54882061e82597fab4cdf2a4f4 Author: Chris Feng Commit: Chris Feng Use X window borders ; This commit replaces the internal borders of Emacs frames with X ; window borders. This should make the flickering issue of floating X ; windows less serious. * exwm-floating.el (exwm-floating--border-pixel) (exwm-floating--border-colormap): New variables for storing border pixel and its colormap. (exwm-floating--set-floating): Do not set the internal border (and background color) of floating frames; do not take `exwm-floating-border-width' into account when calculating geometries; set the border of floating X window containers. (exwm-floating--unset-floating): No need to restore the position of X windows any more; hide the border of floating X window containers. (exwm-floating--init): Initialize the border pixel. * exwm-layout.el (exwm-layout-set-fullscreen) (exwm-layout-unset-fullscreen): Show/Hide container border respectively. * exwm-manage.el (exwm-manage--manage-window): Set the border pixel and colormap of X window containers. * exwm-workspace.el (exwm-workspace-move-window): Do not set the internal border and background color of floating frames. * exwm.el (exwm--on-ClientMessage): Simplify the code for calculating _NET_REQUEST_FRAME_EXTENTS. --- exwm-floating.el | 56 ++--- exwm-layout.el| 10 +++--- exwm-manage.el| 11 +-- exwm-workspace.el |6 -- exwm.el | 19 +- 5 files changed, 66 insertions(+), 36 deletions(-) diff --git a/exwm-floating.el b/exwm-floating.el index 5b8cc89..1780e5f 100644 --- a/exwm-floating.el +++ b/exwm-floating.el @@ -32,6 +32,12 @@ (defvar exwm-floating-border-width 1 "Border width of the floating window.") (defvar exwm-floating-border-color "navy" "Border color of the floating window.") +(defvar exwm-floating--border-pixel nil + "Border pixel drawn around floating X windows.") +(defvar exwm-floating--border-colormap nil + "Colormap used by the border pixel. + +This is also used by X window containers.") (defvar exwm-floating-setup-hook nil "Normal hook run when an X window has been made floating, in the @@ -95,8 +101,6 @@ context of the corresponding buffer.") (get-buffer "*scratch*"))) (make-frame `((minibuffer . nil) ;use the default minibuffer. - (background-color . ,exwm-floating-border-color) - (internal-border-width . ,exwm-floating-border-width) (left . 1) (top . 1) (width . ,window-min-width) @@ -135,8 +139,7 @@ context of the corresponding buffer.") (window-pixel-height (minibuffer-window original-frame))) (* 2 (window-mode-line-height)) - (window-header-line-height window) - (* 2 exwm-floating-border-width))) + (window-header-line-height window))) (display-height (* 2 (/ display-height 2 ;round to even (if (> width display-width) ;; Too wide @@ -229,14 +232,17 @@ context of the corresponding buffer.") (make-instance 'xcb:ReparentWindow :window outer-id :parent frame-container :x 0 :y 0)) ;; Place the X window container. +;; Also show the floating border. (xcb:+request exwm--connection (make-instance 'xcb:ConfigureWindow :window container :value-mask (eval-when-compile (logior xcb:ConfigWindow:X - xcb:ConfigWindow:Y)) - :x (- x exwm-floating-border-width) - :y (- y exwm-floating-border-width))) + xcb:ConfigWindow:Y + xcb:ConfigWindow:BorderWidth)) + :x x + :y y + :border-width exwm-floating-border-width)) (exwm-floating--set-allowed-actions id nil) (xcb:flush exwm--connection) ;; Set window/buffer @@ -294,14 +300,6 @@ context of the corresponding buffer.") (make-instance 'xcb:ChangeWindowAttributes :window id :value-mask xcb:CW:EventMask :event-mask exwm--client-event-mask)) -;; The X window might have been moved due to the floating border. -(xcb:+request exwm--connection -(make-instance 'xcb:ConfigureWindow - :window id - :value-mask (logior xcb:ConfigWindow:X
[elpa] externals/exwm updated (f96f565 -> 6be7508)
ch11ng pushed a change to branch externals/exwm. from f96f565 Add support for keyboard macro new 84dad20 Allow selecting an X window from another workspace new 0833e8d Redirect KeyPress events sent to system tray icons new 2597f74 Remember the geometries of floating X windows new 6be7508 Use X window borders Summary of changes: exwm-floating.el | 87 +--- exwm-input.el | 10 ++ exwm-layout.el | 12 ++-- exwm-manage.el | 11 +-- exwm-systemtray.el | 34 +++- exwm-workspace.el |6 exwm.el| 19 ++-- 7 files changed, 125 insertions(+), 54 deletions(-)
[elpa] externals/exwm 0833e8d 2/4: Redirect KeyPress events sent to system tray icons
branch: externals/exwm commit 0833e8dc4a3fdb6f0ea9651ece2e7d2d4fae97ec Author: Chris Feng Commit: Chris Feng Redirect KeyPress events sent to system tray icons * exwm-systemtray.el (exwm-systemtray--embed): Select KeyPress events on system tray icons. (exwm-systemtray--on-KeyPress): New function for redirecting KeyPress events. (exwm-systemtray--init): Attach the event listener. * exwm-systemtray.el (exwm-systemtray--init): Fix a typo. --- exwm-systemtray.el | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/exwm-systemtray.el b/exwm-systemtray.el index 36f7f3b..49c93cf 100644 --- a/exwm-systemtray.el +++ b/exwm-systemtray.el @@ -118,7 +118,18 @@ You shall use the default value if using auto-hide minibuffer.") :window icon :value-mask xcb:CW:EventMask :event-mask (logior xcb:EventMask:ResizeRedirect + xcb:EventMask:KeyPress xcb:EventMask:PropertyChange))) + ;; Grab all keys and forward them to Emacs frame. + (unless (exwm-workspace--minibuffer-own-frame-p) +(xcb:+request exwm-systemtray--connection +(make-instance 'xcb:GrabKey + :owner-events 0 + :grab-window icon + :modifiers xcb:ModMask:Any + :key xcb:Grab:Any + :pointer-mode xcb:GrabMode:Async + :keyboard-mode xcb:GrabMode:Async))) (setq visible (slot-value info 'flags)) (if visible (setq visible @@ -276,6 +287,23 @@ You shall use the default value if using auto-hide minibuffer.") (t (exwm--log "(System Tray) Unknown opcode message: %s" obj))) +(defun exwm-systemtray--on-KeyPress (data _synthetic) + "Forward all KeyPress events to Emacs frame." + ;; This function is only executed when there's no autohide minibuffer, + ;; a workspace frame has the input focus and the pointer is over a + ;; tray icon. + (let ((dest (frame-parameter (selected-frame) 'exwm-outer-id)) +(obj (make-instance 'xcb:KeyPress))) +(xcb:unmarshal obj data) +(setf (slot-value obj 'event) dest) +(xcb:+request exwm-systemtray--connection +(make-instance 'xcb:SendEvent + :propagate 0 + :destination dest + :event-mask xcb:EventMask:NoEvent + :event (xcb:marshal obj exwm-systemtray--connection + (xcb:flush exwm-systemtray--connection)) + (defun exwm-systemtray--on-workspace-switch () "Reparent/Refresh the system tray in `exwm-workspace-switch-hook'." (unless (exwm-workspace--minibuffer-own-frame-p) @@ -390,7 +418,8 @@ You shall use the default value if using auto-hide minibuffer.") ;; Bottom aligned. y (- (exwm-workspace--current-height) exwm-systemtray-height))) (setq parent (string-to-number (frame-parameter frame 'window-id)) - depth (slot-value (xcb:+request-unchecked+reply exwm--connection + depth (slot-value (xcb:+request-unchecked+reply +exwm-systemtray--connection (make-instance 'xcb:GetGeometry :drawable parent)) 'depth)) @@ -425,6 +454,9 @@ You shall use the default value if using auto-hide minibuffer.") #'exwm-systemtray--on-PropertyNotify) (xcb:+event exwm-systemtray--connection 'xcb:ClientMessage #'exwm-systemtray--on-ClientMessage) + (unless (exwm-workspace--minibuffer-own-frame-p) +(xcb:+event exwm-systemtray--connection 'xcb:KeyPress +#'exwm-systemtray--on-KeyPress)) ;; Add hook to move/reparent the embedder. (add-hook 'exwm-workspace-switch-hook #'exwm-systemtray--on-workspace-switch) (when (boundp 'exwm-randr-refresh-hook)
[elpa] master 6d3d281: debbugs-gnu.el: Doc fixes
branch: master commit 6d3d28162e0b3e956a531dd60380243cc5dfd481 Author: Tino Calancha Commit: Tino Calancha debbugs-gnu.el: Doc fixes * packages/debbugs/debbugs-gnu.el (debbugs-gnu-expand-bug-number-list): Fix typo in doc string. (debbugs-gnu-default-bug-number-list): Explain the meaning of a value like '-N'. (debbugs-gnu-bugs): Clarify in doc string the input format for interactive calls. Show default value in the prompt, i.e., 'debbugs-gnu-default-bug-number-list'. --- packages/debbugs/debbugs-gnu.el | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el index 4a69f2b..f8b8726 100644 --- a/packages/debbugs/debbugs-gnu.el +++ b/packages/debbugs/debbugs-gnu.el @@ -1421,7 +1421,7 @@ MERGED is the list of bugs merged with this one." "Dynamic completion table for reading bug numbers.") (defun debbugs-gnu-expand-bug-number-list (bug-number-list) - "Expand BUG-NUMBER-LIST to a list of singe bug numbers. + "Expand BUG-NUMBER-LIST to a list of single bug numbers. BUG-NUMBER-LIST is a list of bug numbers or bug number ranges, as returned by `debbugs-gnu-bugs'." (let (result) @@ -1659,20 +1659,25 @@ The following commands are available: (defcustom debbugs-gnu-default-bug-number-list "-10" "The default value used in interactive call of `debbugs-gnu-bugs'. -It must be a string, containing a comma separated list of bugs or bug ranges." +It must be a string, containing a comma separated list of bugs or bug ranges. +A negative value, -N, means the newest N bugs." :group 'debbugs-gnu :type 'string :version "25.2") ;;;###autoload (defun debbugs-gnu-bugs (&rest bugs) - "List all BUGS, a list of bug numbers." + "List all BUGS, a list of bug numbers. +In interactive calls, prompt for a comma separated list of bugs +or bug ranges, with default to `debbugs-gnu-default-bug-number-list'." (interactive (mapcar 'string-to-number (debbugs-gnu-expand-bug-number-list (or - (completing-read-multiple "Bug numbers: " debbugs-gnu-completion-table) + (completing-read-multiple + (format "Bug numbers (%s): " debbugs-gnu-default-bug-number-list) + debbugs-gnu-completion-table) (split-string debbugs-gnu-default-bug-number-list "," t) (dolist (elt bugs) (unless (natnump elt) (signal 'wrong-type-argument (list 'natnump elt