about summary refs log tree commit diff
path: root/exwm-manage.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2018-07-14T16·00+0800
committerChris Feng <chris.w.feng@gmail.com>2018-07-14T16·00+0800
commitc1b6a296a8fd57f6364a674486f54cafdd5d6255 (patch)
tree59a556659cd5d5fd4fdb4f8df9f8069bb088c1f1 /exwm-manage.el
parent6be729847e78576df599cbf70512e3f9e436114b (diff)
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.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r--exwm-manage.el18
1 files changed, 7 insertions, 11 deletions
diff --git a/exwm-manage.el b/exwm-manage.el
index ba5bc83b00fa..a0a9e05948f6 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -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
-                                 (+ (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
+              (exwm--set-geometry (frame-parameter exwm--floating-frame
+                                                   'exwm-outer-id)
+                                  nil
+                                  nil
+                                  (+ (frame-pixel-width exwm--floating-frame)
+                                     width-delta)
                                   (+ (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