]> git.sur5r.net Git - i3/i3/commit - src/main.c
persist root window’s background contents to a pixmap
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 24 Nov 2013 12:44:30 +0000 (13:44 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 24 Nov 2013 12:44:30 +0000 (13:44 +0100)
commit4f5e0e794f61cdcea2652f964ec25d0b7418f69b
tree1b24aa1317febfc4ebe5824d19078c23ac693aa2
parenta1e7ce20f0e9dd072610ac549561c28fba2fd55b
persist root window’s background contents to a pixmap

The commit title is fairly technical, so I’ll try to explain.

Recently, users of GDM3 (I’m sure) and LightDM (I think) have reported
that when switching to a new workspace, the contents of the previous
workspace are still visible. i3bar updates, though, so it is the X11
root window which is not being updated here.

When using GDM3, X11 will be started with -background none, and no
background pixmap or pixel is set. Then, apparently,
gnome-settings-daemon will display a fade animation from whatever is
currently on the window to the destination contents. I think this is to
avoid flickering when logging in, which would occur when just setting a
specific background pixmap or pixel.

So, this commit will, when i3 starts first (not on restarts), copy the
contents of the X11 root window (typicall a grey background, at least on
my machine with GDM3) into a pixmap and set that pixmap as background
pixmap. That way, the content will be preserved and one has a
background, instead of what is perceived as a bug :).

This commit has some chance of breakage, so I’m prepared to revert it
unless we can figure out the issues and roll forward.
src/main.c