mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-23 19:47:58 +01:00
Fix moving Emacs frames
* exwm.el (exwm--on-ClientMessage): Avoid moving workspace frames; Move floating X window when trying to move the floating frame.
This commit is contained in:
parent
8b05c2a30d
commit
65ec749bb0
1 changed files with 27 additions and 1 deletions
28
exwm.el
28
exwm.el
|
@ -479,7 +479,33 @@
|
||||||
)
|
)
|
||||||
((= direction xcb:ewmh:_NET_WM_MOVERESIZE_CANCEL)
|
((= direction xcb:ewmh:_NET_WM_MOVERESIZE_CANCEL)
|
||||||
(exwm-floating--stop-moveresize))
|
(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
|
;; _NET_REQUEST_FRAME_EXTENTS
|
||||||
((= type xcb:Atom:_NET_REQUEST_FRAME_EXTENTS)
|
((= type xcb:Atom:_NET_REQUEST_FRAME_EXTENTS)
|
||||||
(let ((buffer (exwm--id->buffer id))
|
(let ((buffer (exwm--id->buffer id))
|
||||||
|
|
Loading…
Reference in a new issue