diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2019-12-15T00·00+0000 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2019-12-15T00·00+0000 |
commit | 65ec749bb074b51824576834d1f85c3c4301e999 (patch) | |
tree | 03e9bedf0dc7d97e6969021d9787403415e18321 | |
parent | 8b05c2a30d112e5deaf1196fccfcc2d1eb273756 (diff) |
Fix moving Emacs frames
* exwm.el (exwm--on-ClientMessage): Avoid moving workspace frames; Move floating X window when trying to move the floating frame.
-rw-r--r-- | exwm.el | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/exwm.el b/exwm.el index 36dbcb677f13..a2fbd0343993 100644 --- a/exwm.el +++ b/exwm.el @@ -479,7 +479,33 @@ ) ((= direction xcb:ewmh:_NET_WM_MOVERESIZE_CANCEL) (exwm-floating--stop-moveresize)) - (t (exwm-floating--start-moveresize id direction)))))) + ;; In case it's a workspace frame. + ((and (not buffer) + (catch 'break + (dolist (f exwm-workspace--list) + (when (or (eq id (frame-parameter f 'exwm-outer-id)) + (eq id (frame-parameter f 'exwm-id))) + (throw 'break t))) + nil))) + (t + ;; In case it's a floating frame, + ;; move the corresponding X window instead. + (unless buffer + (catch 'break + (dolist (pair exwm--id-buffer-alist) + (with-current-buffer (cdr pair) + (when + (and exwm--floating-frame + (or (eq id + (frame-parameter exwm--floating-frame + 'exwm-outer-id)) + (eq id + (frame-parameter exwm--floating-frame + 'exwm-id)))) + (setq id exwm--id) + (throw 'break nil)))))) + ;; Start to move it. + (exwm-floating--start-moveresize id direction)))))) ;; _NET_REQUEST_FRAME_EXTENTS ((= type xcb:Atom:_NET_REQUEST_FRAME_EXTENTS) (let ((buffer (exwm--id->buffer id)) |