Browse Source

applied XGetWMNormalHints fix

Anselm R Garbe 17 năm trước cách đây
mục cha
commit
83abfc05eb
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      dwm.c

+ 3 - 1
dwm.c

@@ -1590,7 +1590,9 @@ updatesizehints(Client *c) {
 	long msize;
 	XSizeHints size;
 
-	XGetWMNormalHints(dpy, c->win, &size, &msize);
+	if(!XGetWMNormalHints(dpy, c->win, &size, &msize))
+		/* size is uninitialized, ensure that size.flags aren't used */
+		size.flags = PSize; 
 	if(size.flags & PBaseSize) {
 		c->basew = size.base_width;
 		c->baseh = size.base_height;