On 02/06/2010, Aurélien Aptel <aurelien.ap...@gmail.com> wrote:
> The problem lies in the size hints : they do not seem to be handled
> correctly by the wm (i'm using wmii) or I'm not using them correctly
> (more probable).

I've been reading up on this and it seems that you need to set
[PBaseSize](http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.3) to
get the WMs to take the border into account when calculating the new
window size.

I've attached another patch based on the new tip that seems to work.
Same caveat as before.

Ing
diff -r a6b111b6c590 st.c
--- a/st.c	Wed Jun 02 16:01:30 2010 +0200
+++ b/st.c	Thu Jun 03 01:01:09 2010 +0100
@@ -1034,11 +1034,13 @@
 	XClassHint chint = {TNAME, TNAME};
 	XWMHints wmhint	 = {.flags = InputHint, .input = 1};
 	XSizeHints shint = { 
-		.flags = PSize | PResizeInc,
+		.flags = PSize | PResizeInc | PBaseSize,
 		.height = xw.h, /* XXX: doesn't seem to work, see run() */
 		.width = xw.w,
 		.height_inc = xw.ch,
 		.width_inc = xw.cw,
+		.base_height = 2*BORDER,
+		.base_width = 2*BORDER,
 	};
 	XSetWMProperties(xw.dis, xw.win, NULL, NULL, NULL, 0, &shint, &wmhint, &chint);
 }

Reply via email to