aboutsummaryrefslogtreecommitdiff
path: root/dwm.1
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2026-10-13 14:28:33 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2026-10-16 13:23:34 +0200
commit7283c8c0ac9db8b38bb280576668256023d82fb4 (patch)
treed5f925d5020fda87db91c7c3b9e7a4f74377b3c8 /dwm.1
parent44dbc6809d05b8f2addc483f882e670db0b6b8e9 (diff)
check and restrict size hint values
Could not reproduce a crash, but may mess up window geometry, etc. Test program below to give an idea: cc repro.c -o repro -lX11; ./repro int main(void) { Display *d; int screen; Window root; Window win; d = XOpenDisplay(NULL); if (!d) { fprintf(stderr, "XOpenDisplay failed\n"); return 1; } screen = DefaultScreen(d); root = RootWindow(d, screen); win = XCreateSimpleWindow(d, root, 0, 0, 100, 100, 0, 0, 0); if (!win) { fprintf(stderr, "XCreateSimpleWindow failed\n"); XCloseDisplay(d); return 1; } //XMapWindow(d, win); XMapRaised(d, win); XSizeHints h = {0}; h.flags = PResizeInc | PBaseSize | PMinSize; h.width_inc = -1; h.height_inc = -1; h.base_width = INT_MIN + 500; /* window is 500px wide */ h.base_height = 0; h.min_width = ~0L; h.min_height = ~0L; XSetWMNormalHints(d, win, &h); sleep(3); //XDestroyWindow(d, win); XCloseDisplay(d); return 0; }
Diffstat (limited to 'dwm.1')
0 files changed, 0 insertions, 0 deletions