Shrink Emacs frames with X request

* exwm-manage.el (exwm-manage--on-ConfigureRequest): There's a problem
in shrinking Emacs frames with `set-frame-width' and
`set-frame-height'.  Use `exwm--set-geometry' instead.
This commit is contained in:
Chris Feng 2018-07-15 00:00:00 +08:00
parent 6be729847e
commit c1b6a296a8

View file

@ -597,18 +597,14 @@ border-width: %d; sibling: #x%x; stack-mode: %d"
(if buffer
(with-current-buffer buffer
(exwm--log "ConfigureWindow (resize floating X window)")
(when (and (/= 0 (logand value-mask xcb:ConfigWindow:Width))
(>= (abs width-delta) exwm-manage--width-delta-min))
(set-frame-width exwm--floating-frame
(exwm--set-geometry (frame-parameter exwm--floating-frame
'exwm-outer-id)
nil
nil
(+ (frame-pixel-width exwm--floating-frame)
width-delta)
nil t))
(when (and (/= 0 (logand value-mask xcb:ConfigWindow:Height))
(>= (abs height-delta) exwm-manage--height-delta-min))
(set-frame-height exwm--floating-frame
(+ (frame-pixel-height exwm--floating-frame)
height-delta)
nil t)))
height-delta)))
(exwm--log "ConfigureWindow (preserve geometry)")
;; Configure the unmanaged window.
;; But Emacs frames should be excluded. Generally we don't