Fixed an issue where floating a window sometimes flashes the color Orange instead of the focus color

This commit is contained in:
luminous99 2026-01-26 00:25:08 +02:00
parent a8196dba0f
commit 56b20c5a24

View file

@ -191,10 +191,12 @@
window
(set-window-geometry window :x *float-window-border* :y *float-window-title-height*)
(xlib:with-state (parent)
(setf (xlib:drawable-width parent) (+ width (* 2 *float-window-border*))
(xlib:drawable-height parent) (+ height *float-window-title-height* *float-window-border*)
(xlib:window-background parent) (xlib:alloc-color (xlib:screen-default-colormap (screen-number (window-screen window)))
"Orange")))
(let ((window-background (or (screen-focus-color screen)
(xlib:alloc-color (xlib:screen-default-colormap (screen-number screen))
"Orange"))))
(setf (xlib:drawable-width parent) (+ width (* 2 *float-window-border*))
(xlib:drawable-height parent) (+ height *float-window-title-height* *float-window-border*)
(xlib:window-background parent) window-background)))
(xlib:clear-area (window-parent window))
(let ((parent-x (xlib:drawable-x parent))
(parent-y (xlib:drawable-y parent))