I'm trying changing wallpaper using clx, but it do not work. What is wrong with my code?
(ql:quickload :clx)
(defpackage #:wm/uw
(:use #:cl #:xlib))
(in-package #:wm/uw)
(setf *display* (open-default-display))
(setf *screen* (display-default-screen *display*))
(setf *root* (screen-root *screen*))
(setf (window-background *root*) (screen-white-pixel *screen*))
(clear-area *root*)
(close-display *display*)
To improve network performance, many X11 client libraries do not directly execute X11 commands. Instead, the commands are stored and sent in batches to the XServer. Usually, this happens automatically before event handling. Since you are doing no event handling, it seems that the command queue is never flushed. If you execute
before closing the display, you should see the desired effect. CLX does not export the
buffer-flush
function, hence you need to explicitly state the package name.