about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--dwm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 965d1e3..dd39fe1 100644
--- a/dwm.c
+++ b/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;
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158