mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-27 14:57:59 +01:00
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:
parent
6be729847e
commit
c1b6a296a8
1 changed files with 7 additions and 11 deletions
|
@ -597,18 +597,14 @@ border-width: %d; sibling: #x%x; stack-mode: %d"
|
||||||
(if buffer
|
(if buffer
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(exwm--log "ConfigureWindow (resize floating X window)")
|
(exwm--log "ConfigureWindow (resize floating X window)")
|
||||||
(when (and (/= 0 (logand value-mask xcb:ConfigWindow:Width))
|
(exwm--set-geometry (frame-parameter exwm--floating-frame
|
||||||
(>= (abs width-delta) exwm-manage--width-delta-min))
|
'exwm-outer-id)
|
||||||
(set-frame-width exwm--floating-frame
|
nil
|
||||||
|
nil
|
||||||
(+ (frame-pixel-width exwm--floating-frame)
|
(+ (frame-pixel-width exwm--floating-frame)
|
||||||
width-delta)
|
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)
|
(+ (frame-pixel-height exwm--floating-frame)
|
||||||
height-delta)
|
height-delta)))
|
||||||
nil t)))
|
|
||||||
(exwm--log "ConfigureWindow (preserve geometry)")
|
(exwm--log "ConfigureWindow (preserve geometry)")
|
||||||
;; Configure the unmanaged window.
|
;; Configure the unmanaged window.
|
||||||
;; But Emacs frames should be excluded. Generally we don't
|
;; But Emacs frames should be excluded. Generally we don't
|
||||||
|
|
Loading…
Reference in a new issue