diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2019-09-14T00·00+0000 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2019-09-14T00·00+0000 |
commit | f167bc979c76edb43bc63cffebec095601446477 (patch) | |
tree | 6e8ecd6c1030c9f98f9b6996be3a87bab86c3dd0 /exwm-layout.el | |
parent | eb49e57f762ab47e874c821c12e0b641d3dd9d8e (diff) |
Replace `frame-geometry'
* exwm-workspace.el (exwm-workspace--frame-y-offset) exwm-workspace--window-y-offset, exwm-workspace--update-offsets): New variables & function for the calculation of Emacs frame offsets, as `frame-geometry' is not available in Emacs 24. * exwm-floating.el (exwm-floating--set-floating) (exwm-floating--do-moveresize): * exwm-layout.el (exwm-layout--show): * exwm-systemtray.el (exwm-systemtray--on-workspace-switch) (exwm-systemtray--on-randr-refresh, exwm-systemtray--init): Use them. * exwm-systemtray.el (exwm-systemtray--refresh-all): Renamed from `exwm-systemtray--on-randr-refresh'. (exwm-systemtray--init, exwm-systemtray--exit): Use it. * exwm-floating.el (exwm-floating--stop-moveresize): Send a ConfigureNotify event to floating frame to update its position (seems required by Emacs 24).
Diffstat (limited to 'exwm-layout.el')
-rw-r--r-- | exwm-layout.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/exwm-layout.el b/exwm-layout.el index 0b5adeb2f4fa..9f1e0cf74838 100644 --- a/exwm-layout.el +++ b/exwm-layout.el @@ -52,6 +52,7 @@ (defvar exwm-layout--timer nil "Timer used to track echo area changes.") (defvar exwm-workspace--current) +(defvar exwm-workspace--frame-y-offset) (declare-function exwm-input--release-keyboard "exwm-input.el") (declare-function exwm-input--grab-keyboard "exwm-input.el") (declare-function exwm-input-grab-keyboard "exwm-input.el") @@ -105,15 +106,13 @@ (y (pop edges)) (width (- (pop edges) x)) (height (- (pop edges) y)) - geometry frame-x frame-y frame-width frame-height) + frame-x frame-y frame-width frame-height) (with-current-buffer (exwm--id->buffer id) (when exwm--floating-frame (setq frame-width (frame-pixel-width exwm--floating-frame) - geometry (frame-geometry exwm--floating-frame) frame-height (+ (frame-pixel-height exwm--floating-frame) ;; Use `frame-outer-height' in the future. - (or (cddr (assq 'menu-bar-size geometry)) 0) - (or (cddr (assq 'tool-bar-size geometry)) 0))) + exwm-workspace--frame-y-offset)) (when exwm--floating-frame-position (setq frame-x (elt exwm--floating-frame-position 0) frame-y (elt exwm--floating-frame-position 1) |