aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-02-10 09:49:01 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-02-10 10:07:09 +0100
commit1966b81b4d51998666c81e4618d42c25712f17a1 (patch)
treed5ef51015c79fc8bcb445c16dfec1d5f2c2ba8ac
parentf8c6ac2ed10ed7a3ecb03868a3b0b97deca5c2db (diff)
downloadliberty-1966b81b4d51998666c81e4618d42c25712f17a1.tar.gz
liberty-1966b81b4d51998666c81e4618d42c25712f17a1.tar.xz
liberty-1966b81b4d51998666c81e4618d42c25712f17a1.zip
liberty-xui: tolerate zero-area ConfigureNotify
Happens when launching from a fullscreen window in i3.
-rw-r--r--liberty-xui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/liberty-xui.c b/liberty-xui.c
index 761d7c6..a538da7 100644
--- a/liberty-xui.c
+++ b/liberty-xui.c
@@ -1551,7 +1551,8 @@ x11_init_pixmap (void)
{
int screen = DefaultScreen (g_xui.dpy);
g_xui.x11_pixmap = XCreatePixmap (g_xui.dpy, g_xui.x11_window,
- g_xui.width, g_xui.height, DefaultDepth (g_xui.dpy, screen));
+ MAX (g_xui.width, 1), MAX (g_xui.height, 1),
+ DefaultDepth (g_xui.dpy, screen));
Visual *visual = DefaultVisual (g_xui.dpy, screen);
XRenderPictFormat *format = XRenderFindVisualFormat (g_xui.dpy, visual);