From: rcb5@wsinfo03.win.tue.nl (Richard Verhoeven)
Subject: Re: Forcing a window manager to accept specific coordinates for a window
Organization: Eindhoven University of Technology, The Netherlands
Lines: 38
Distribution: world
NNTP-Posting-Host: wsinfo03.win.tue.nl

bading@cs.tu-berlin.de (Tobias 'Doping' Bading) writes:
> 
> try this after XCreateWindow:
> -----------------------------
> ...
>
>   xsizehints->flags = USPosition | USSize;	/* or = PPosition | PSize */
>   ...
>   XSetWMNormalHints (display, window, xsizehints);
>   ...
>
> These hints tell the window manager that the position and size of the window
> are specified by the users and that the window manager should accept these
> values. If you use xsizehints->flags = PPosition | PSize, this tells the window
> manager that the values are prefered values of the program, not the user.
> I don't know a window manager that doesn't place the window like you prefer
> if you specify the position and size like above.

Sorry, but olwm and tvtwm don't do it. They place the title at that position
and the window at a position below it.

This becomes a problem when you want a program to be able to save its current
configuration and restore is later.

Currently, my solution is:

	XCreateWindow(...);
	XSetWMProperties(..);
	XMapWindow(...);
	XFlush(...);
	XMoveWindow(...);


It works with olwm, but is less than elegant. All this leaves me wondering
if I'm overlooking something obvious.

Richard.

