diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-02-18T11·56+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-02-18T11·56+0800 |
commit | 3f7722079cebd0d998239ce40457899135250a15 (patch) | |
tree | 42e535f9699607b96c74f4bc881bcbb804f12657 /exwm-layout.el | |
parent | 12e2d574c916ec7b93b645c0d0bf2e1fb0ce342a (diff) |
Fix floating X window bugs introduced by 9c95c03e
* exwm-floating.el (exwm-floating--set-floating): Make floating frames invisible before resizing them. (exwm-floating--fit-frame-to-window): Removed since unused. * exwm-layout.el (exwm-layout-hide-mode-line, exwm-layout-show-mode-line): Use set frame height instead of exwm-floating--fit-frame-to-window. * exwm-core.el (exwm-mode): Replace `exwm-manage--close-window' with `exwm-manage--kill-buffer-query-function'. * exwm-floating.el (exwm-floating--unset-floating): Reparent out floating frames. * exwm-manage.el (exwm-manage--unmanage-window): Reparent out floating frames. Hide floating frames. (exwm-manage--close-window, exwm-manage--kill-buffer-query-function): Rename `exwm-manage--close-window' since it's only used in `kill-buffer-query-functions'. Reparent out floating frames.
Diffstat (limited to 'exwm-layout.el')
-rw-r--r-- | exwm-layout.el | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/exwm-layout.el b/exwm-layout.el index a70cf1b012d0..52a84b0fe1fd 100644 --- a/exwm-layout.el +++ b/exwm-layout.el @@ -396,13 +396,18 @@ See also `exwm-layout-enlarge-window'." "Hide mode-line." (interactive) (when (and (eq major-mode 'exwm-mode) mode-line-format) - (setq exwm--mode-line-format mode-line-format - mode-line-format nil) - (if (not exwm--floating-frame) - (exwm-layout--show exwm--id) - (exwm-floating--fit-frame-to-window) - (xcb:flush exwm--connection) - (setq window-size-fixed exwm--fixed-size)))) + (let (mode-line-height) + (when exwm--floating-frame + (setq mode-line-height (window-mode-line-height + (frame-root-window exwm--floating-frame)))) + (setq exwm--mode-line-format mode-line-format + mode-line-format nil) + (if (not exwm--floating-frame) + (exwm-layout--show exwm--id) + (set-frame-height exwm--floating-frame + (- (frame-pixel-height exwm--floating-frame) + mode-line-height) + nil t))))) (defun exwm-layout-show-mode-line () "Show mode-line." @@ -412,10 +417,12 @@ See also `exwm-layout-enlarge-window'." exwm--mode-line-format nil) (if (not exwm--floating-frame) (exwm-layout--show exwm--id) - (exwm-floating--fit-frame-to-window) - (exwm-input-grab-keyboard) - (xcb:flush exwm--connection) - (setq window-size-fixed exwm--fixed-size)))) + (set-frame-height exwm--floating-frame + (+ (frame-pixel-height exwm--floating-frame) + (window-mode-line-height (frame-root-window + exwm--floating-frame))) + nil t) + (exwm-input-grab-keyboard)))) ;;;###autoload (defun exwm-layout-toggle-mode-line () |