diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2015-08-25T11·22+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2015-08-25T11·22+0800 |
commit | 874c383672e42cc642aca8b470afe394b39a1965 (patch) | |
tree | c239d14d23de92060bccff662f1fb2f1f11b682c /exwm-layout.el | |
parent | 5210e13e7c95d0d8f94c657efa13e71fad4ef818 (diff) | |
parent | 94bdbfc0da7c8ef14acdc8aa4e73dc1c8fee9700 (diff) |
Merge pull request #42 from pipcet/ewmh-fullscreen
Avoid using the "no window manager" code in Emacs
Diffstat (limited to 'exwm-layout.el')
-rw-r--r-- | exwm-layout.el | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/exwm-layout.el b/exwm-layout.el index 1ffb3b93fce0..735b156e16cc 100644 --- a/exwm-layout.el +++ b/exwm-layout.el @@ -162,6 +162,34 @@ (setq exwm--fullscreen nil) (exwm-input-grab-keyboard))) +;; This function is superficially similar to `exwm-layout-set-fullscreen', but +;; they do very different things: `exwm-layout--set-frame-fullscreen' resizes a +;; frame to the actual monitor size, `exwm-layout-set-fullscreen' resizes an X +;; window to the frame size. +(defun exwm-layout--set-frame-fullscreen (frame) + "Make frame FRAME fullscreen, with regard to its XRandR output if applicable." + (let ((geometry (or (frame-parameter frame 'exwm-geometry) + (xcb:+request-unchecked+reply + exwm--connection + (make-instance 'xcb:GetGeometry + :drawable exwm--root)) + (make-instance 'xcb:RECTANGLE :x 0 :y 0 + :width (x-display-width) + :height (x-display-height)))) + (id (frame-parameter frame 'exwm-outer-id))) + (with-slots (x y width height) geometry + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window id + :value-mask (logior xcb:ConfigWindow:X + xcb:ConfigWindow:Y + xcb:ConfigWindow:Width + xcb:ConfigWindow:Height) + :x x :y y + :width width + :height height)) + (xcb:flush exwm--connection)))) + (defun exwm-layout--refresh () "Refresh layout." (let ((frame (selected-frame)) |