mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-23 19:47:58 +01:00
Avoid crashing Emacs by resizing its frame into 0x0
* exwm-floating.el (exwm-floating--do-moveresize): * exwm-layout.el (exwm-layout-enlarge-window): Resizing a frame into 0x0 crashes Emacs so additional checks are required.
This commit is contained in:
parent
6b4bfad87b
commit
83c0a2db34
2 changed files with 4 additions and 4 deletions
|
@ -601,8 +601,8 @@ context of the corresponding buffer.")
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(logior xcb:ConfigWindow:Width
|
(logior xcb:ConfigWindow:Width
|
||||||
xcb:ConfigWindow:Height)))
|
xcb:ConfigWindow:Height)))
|
||||||
width (aref result 4)
|
width (max 1 (aref result 4))
|
||||||
height (aref result 5))
|
height (max 1 (aref result 5)))
|
||||||
(setq buffer-or-id (aref result 0))
|
(setq buffer-or-id (aref result 0))
|
||||||
(setq container-or-id
|
(setq container-or-id
|
||||||
(if (bufferp buffer-or-id)
|
(if (bufferp buffer-or-id)
|
||||||
|
|
|
@ -470,7 +470,7 @@ windows."
|
||||||
(setq width nil)
|
(setq width nil)
|
||||||
(setq width (max (+ exwm--normal-hints-min-width margin)
|
(setq width (max (+ exwm--normal-hints-min-width margin)
|
||||||
(+ width delta))))))
|
(+ width delta))))))
|
||||||
(when width
|
(when (and width (> width 0))
|
||||||
(setf (slot-value exwm--geometry 'width) width)
|
(setf (slot-value exwm--geometry 'width) width)
|
||||||
(xcb:+request exwm--connection
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:ConfigureWindow
|
(make-instance 'xcb:ConfigureWindow
|
||||||
|
@ -503,7 +503,7 @@ windows."
|
||||||
(setq height nil)
|
(setq height nil)
|
||||||
(setq height (max (+ exwm--normal-hints-min-height margin)
|
(setq height (max (+ exwm--normal-hints-min-height margin)
|
||||||
(+ height delta))))))
|
(+ height delta))))))
|
||||||
(when height
|
(when (and height (> height 0))
|
||||||
(setf (slot-value exwm--geometry 'height) height)
|
(setf (slot-value exwm--geometry 'height) height)
|
||||||
(xcb:+request exwm--connection
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:ConfigureWindow
|
(make-instance 'xcb:ConfigureWindow
|
||||||
|
|
Loading…
Reference in a new issue