mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 13:07:59 +01:00
Provide a fallback value for X window geometry
* exwm-manage.el (exwm-manage--update-geometry): Ditto.
This commit is contained in:
parent
0037cba87b
commit
df8de92113
2 changed files with 10 additions and 4 deletions
|
@ -45,9 +45,9 @@
|
|||
(defvar exwm-layout--timer nil "Timer used to track echo area changes.")
|
||||
|
||||
(defvar exwm-workspace--current)
|
||||
(declare-function exwm-input--release-keyboard "exwm-input.el")
|
||||
(declare-function exwm-input--grab-keyboard "exwm-input.el")
|
||||
(declare-function exwm-input-grab-keyboard "exwm-input.el")
|
||||
(declare-function exwm-input-release-keyboard "exwm-input.el")
|
||||
(declare-function exwm-reset "exwm.el" ())
|
||||
(declare-function exwm-workspace--client-p "exwm-workspace.el"
|
||||
(&optional frame))
|
||||
(declare-function exwm-workspace--minibuffer-own-frame-p "exwm-workspace.el")
|
||||
|
|
|
@ -123,8 +123,14 @@ You can still make the X windows floating afterwards."
|
|||
(unless (and exwm--geometry (not force))
|
||||
(let ((reply (xcb:+request-unchecked+reply exwm--connection
|
||||
(make-instance 'xcb:GetGeometry :drawable id))))
|
||||
(when reply ;nil when destroyed
|
||||
(setq exwm--geometry reply))))))
|
||||
(setq exwm--geometry
|
||||
(or reply
|
||||
;; Provide a reasonable fallback value.
|
||||
(make-instance 'xcb:RECTANGLE
|
||||
:x 0
|
||||
:y 0
|
||||
:width (/ (x-display-pixel-width) 2)
|
||||
:height (/ (x-display-pixel-height) 2))))))))
|
||||
|
||||
(defun exwm-manage--update-ewmh-state (id)
|
||||
"Update _NET_WM_STATE."
|
||||
|
|
Loading…
Reference in a new issue