mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-27 06:48:00 +01:00
; Follows up
This commit is contained in:
parent
81e52263a7
commit
73b4d6f966
3 changed files with 69 additions and 69 deletions
122
exwm-floating.el
122
exwm-floating.el
|
@ -486,91 +486,91 @@ This is also used by X window containers.")
|
||||||
(cond ((= type xcb:ewmh:_NET_WM_MOVERESIZE_MOVE)
|
(cond ((= type xcb:ewmh:_NET_WM_MOVERESIZE_MOVE)
|
||||||
(setq cursor exwm-floating--cursor-move
|
(setq cursor exwm-floating--cursor-move
|
||||||
exwm-floating--moveresize-calculate
|
exwm-floating--moveresize-calculate
|
||||||
`(lambda (x y)
|
(lambda (x y)
|
||||||
(vector ,buffer-or-id
|
(vector buffer-or-id
|
||||||
,(eval-when-compile
|
(eval-when-compile
|
||||||
(logior xcb:ConfigWindow:X
|
(logior xcb:ConfigWindow:X
|
||||||
xcb:ConfigWindow:Y))
|
xcb:ConfigWindow:Y))
|
||||||
(- x ,win-x) (- y ,win-y) 0 0))))
|
(- x win-x) (- y win-y) 0 0))))
|
||||||
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPLEFT)
|
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPLEFT)
|
||||||
(setq cursor exwm-floating--cursor-top-left
|
(setq cursor exwm-floating--cursor-top-left
|
||||||
exwm-floating--moveresize-calculate
|
exwm-floating--moveresize-calculate
|
||||||
`(lambda (x y)
|
(lambda (x y)
|
||||||
(vector ,buffer-or-id
|
(vector buffer-or-id
|
||||||
,(eval-when-compile
|
(eval-when-compile
|
||||||
(logior xcb:ConfigWindow:X
|
(logior xcb:ConfigWindow:X
|
||||||
xcb:ConfigWindow:Y
|
xcb:ConfigWindow:Y
|
||||||
xcb:ConfigWindow:Width
|
xcb:ConfigWindow:Width
|
||||||
xcb:ConfigWindow:Height))
|
xcb:ConfigWindow:Height))
|
||||||
(- x ,win-x) (- y ,win-y)
|
(- x win-x) (- y win-y)
|
||||||
(- ,(+ root-x width) x)
|
(- (+ root-x width) x)
|
||||||
(- ,(+ root-y height) y)))))
|
(- (+ root-y height) y)))))
|
||||||
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOP)
|
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOP)
|
||||||
(setq cursor exwm-floating--cursor-top
|
(setq cursor exwm-floating--cursor-top
|
||||||
exwm-floating--moveresize-calculate
|
exwm-floating--moveresize-calculate
|
||||||
`(lambda (x y)
|
(lambda (_x y)
|
||||||
(vector ,buffer-or-id
|
(vector buffer-or-id
|
||||||
,(eval-when-compile
|
(eval-when-compile
|
||||||
(logior xcb:ConfigWindow:Y
|
(logior xcb:ConfigWindow:Y
|
||||||
xcb:ConfigWindow:Height))
|
xcb:ConfigWindow:Height))
|
||||||
0 (- y ,win-y) 0 (- ,(+ root-y height) y)))))
|
0 (- y win-y) 0 (- (+ root-y height) y)))))
|
||||||
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPRIGHT)
|
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_TOPRIGHT)
|
||||||
(setq cursor exwm-floating--cursor-top-right
|
(setq cursor exwm-floating--cursor-top-right
|
||||||
exwm-floating--moveresize-calculate
|
exwm-floating--moveresize-calculate
|
||||||
`(lambda (x y)
|
(lambda (x y)
|
||||||
(vector ,buffer-or-id
|
(vector buffer-or-id
|
||||||
,(eval-when-compile
|
(eval-when-compile
|
||||||
(logior xcb:ConfigWindow:Y
|
(logior xcb:ConfigWindow:Y
|
||||||
xcb:ConfigWindow:Width
|
xcb:ConfigWindow:Width
|
||||||
xcb:ConfigWindow:Height))
|
xcb:ConfigWindow:Height))
|
||||||
0 (- y ,win-y) (- x ,(- root-x width))
|
0 (- y win-y) (- x (- root-x width))
|
||||||
(- ,(+ root-y height) y)))))
|
(- (+ root-y height) y)))))
|
||||||
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_RIGHT)
|
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_RIGHT)
|
||||||
(setq cursor exwm-floating--cursor-right
|
(setq cursor exwm-floating--cursor-right
|
||||||
exwm-floating--moveresize-calculate
|
exwm-floating--moveresize-calculate
|
||||||
`(lambda (x y)
|
(lambda (x _y)
|
||||||
(vector ,buffer-or-id
|
(vector buffer-or-id
|
||||||
,xcb:ConfigWindow:Width
|
xcb:ConfigWindow:Width
|
||||||
0 0 (- x ,(- root-x width)) 0))))
|
0 0 (- x (- root-x width)) 0))))
|
||||||
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT)
|
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT)
|
||||||
(setq cursor exwm-floating--cursor-bottom-right
|
(setq cursor exwm-floating--cursor-bottom-right
|
||||||
exwm-floating--moveresize-calculate
|
exwm-floating--moveresize-calculate
|
||||||
`(lambda (x y)
|
(lambda (x y)
|
||||||
(vector ,buffer-or-id
|
(vector buffer-or-id
|
||||||
,(eval-when-compile
|
(eval-when-compile
|
||||||
(logior xcb:ConfigWindow:Width
|
(logior xcb:ConfigWindow:Width
|
||||||
xcb:ConfigWindow:Height))
|
xcb:ConfigWindow:Height))
|
||||||
0 0 (- x ,(- root-x width))
|
0 0 (- x (- root-x width))
|
||||||
(- y ,(- root-y height))))))
|
(- y (- root-y height))))))
|
||||||
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOM)
|
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOM)
|
||||||
(setq cursor exwm-floating--cursor-bottom
|
(setq cursor exwm-floating--cursor-bottom
|
||||||
exwm-floating--moveresize-calculate
|
exwm-floating--moveresize-calculate
|
||||||
`(lambda (x y)
|
(lambda (_x y)
|
||||||
(vector ,buffer-or-id
|
(vector buffer-or-id
|
||||||
,xcb:ConfigWindow:Height
|
xcb:ConfigWindow:Height
|
||||||
0 0 0 (- y ,(- root-y height))))))
|
0 0 0 (- y (- root-y height))))))
|
||||||
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT)
|
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT)
|
||||||
(setq cursor exwm-floating--cursor-bottom-left
|
(setq cursor exwm-floating--cursor-bottom-left
|
||||||
exwm-floating--moveresize-calculate
|
exwm-floating--moveresize-calculate
|
||||||
`(lambda (x y)
|
(lambda (x y)
|
||||||
(vector ,buffer-or-id
|
(vector buffer-or-id
|
||||||
,(eval-when-compile
|
(eval-when-compile
|
||||||
(logior xcb:ConfigWindow:X
|
(logior xcb:ConfigWindow:X
|
||||||
xcb:ConfigWindow:Width
|
xcb:ConfigWindow:Width
|
||||||
xcb:ConfigWindow:Height))
|
xcb:ConfigWindow:Height))
|
||||||
(- x ,win-x)
|
(- x win-x)
|
||||||
0
|
0
|
||||||
(- ,(+ root-x width) x)
|
(- (+ root-x width) x)
|
||||||
(- y ,(- root-y height))))))
|
(- y (- root-y height))))))
|
||||||
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_LEFT)
|
((= type xcb:ewmh:_NET_WM_MOVERESIZE_SIZE_LEFT)
|
||||||
(setq cursor exwm-floating--cursor-left
|
(setq cursor exwm-floating--cursor-left
|
||||||
exwm-floating--moveresize-calculate
|
exwm-floating--moveresize-calculate
|
||||||
`(lambda (x y)
|
(lambda (x _y)
|
||||||
(vector ,buffer-or-id
|
(vector buffer-or-id
|
||||||
,(eval-when-compile
|
(eval-when-compile
|
||||||
(logior xcb:ConfigWindow:X
|
(logior xcb:ConfigWindow:X
|
||||||
xcb:ConfigWindow:Width))
|
xcb:ConfigWindow:Width))
|
||||||
(- x ,win-x) 0 (- ,(+ root-x width) x) 0)))))
|
(- x win-x) 0 (- (+ root-x width) x) 0)))))
|
||||||
;; Select events and change cursor (should always succeed)
|
;; Select events and change cursor (should always succeed)
|
||||||
(xcb:+request-unchecked+reply exwm--connection
|
(xcb:+request-unchecked+reply exwm--connection
|
||||||
(make-instance 'xcb:GrabPointer
|
(make-instance 'xcb:GrabPointer
|
||||||
|
|
|
@ -720,15 +720,15 @@ button event."
|
||||||
(line-mode
|
(line-mode
|
||||||
(setq mode "line"
|
(setq mode "line"
|
||||||
help-echo "mouse-1: Switch to char-mode"
|
help-echo "mouse-1: Switch to char-mode"
|
||||||
cmd `(lambda ()
|
cmd (lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(exwm-input-release-keyboard ,id))))
|
(exwm-input-release-keyboard id))))
|
||||||
(char-mode
|
(char-mode
|
||||||
(setq mode "char"
|
(setq mode "char"
|
||||||
help-echo "mouse-1: Switch to line-mode"
|
help-echo "mouse-1: Switch to line-mode"
|
||||||
cmd `(lambda ()
|
cmd (lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(exwm-input-grab-keyboard ,id)))))
|
(exwm-input-grab-keyboard id)))))
|
||||||
(with-current-buffer (exwm--id->buffer id)
|
(with-current-buffer (exwm--id->buffer id)
|
||||||
(setq mode-line-process
|
(setq mode-line-process
|
||||||
`(": "
|
`(": "
|
||||||
|
|
|
@ -540,8 +540,8 @@ Would you like to kill it? "
|
||||||
(signal-process pid 'SIGKILL)
|
(signal-process pid 'SIGKILL)
|
||||||
;; Ensure it's dead
|
;; Ensure it's dead
|
||||||
(run-with-timer exwm-manage-ping-timeout nil
|
(run-with-timer exwm-manage-ping-timeout nil
|
||||||
`(lambda ()
|
(lambda ()
|
||||||
(xcb:+request exwm--connection ,request))))
|
(xcb:+request exwm--connection request))))
|
||||||
(xcb:flush exwm--connection)))
|
(xcb:flush exwm--connection)))
|
||||||
|
|
||||||
(defun exwm-manage--add-frame (frame)
|
(defun exwm-manage--add-frame (frame)
|
||||||
|
|
Loading…
Reference in a new issue