Re: Initial window placement
- From: Philipp Lohmann <Philipp Lohmann Sun COM>
- To: <wm-spec-list gnome org>
- Subject: Re: Initial window placement
- Date: Thu, 16 Aug 2001 19:22:58 GMT
Am 16.08.01, 21:02:46, schrieb <Sasha_Vasko osca state mo us> zum Thema Re:
Initial window placement:
> Very easy to do without any additional hints.
> Lets say you know rectangle within your client window that you don't
> want to overlap. You then use XTranslateCoordinates to translate it into
> root coordinates. Then you decide where you have more space and want your
> dialog to be. Then you map it in this location and use GRAVITY HINT to
> keep it out of the way. For example :
> Lets say you want to avoid covering area of 300x200+500+10 and you
fdecide
> that on your left youy have plenty of space to put search dialog in there
> Lets say search dialog is 400x100. What you do then is you map your
dialog
> at +100+55 and request EastGravity for it. What happen then is that
window
> manager calculates reference point to be at +500+105 and it places Center
> of the Right edge of the frame window into this location !!!
> As the result you get dialog's frame edging at +500 and not overlapping
> your text. Bingo!!! That is only if window manager would go and implement
> gravity handling the way it should.
> Even better - you could dynamically resize your search dialog, and its
> right edge will stay put and will not overlap your text! Simply becouse
> you requested EastGravity.
> If window manager has policy of denying your PPosition and places dialog
> where it pleased to - then you are out of luck any way you go, it will
> just as well reject any otherhint you provide it with.
> There is no way you could get a-la MS Windows window placement in X.
> Get used to it. Its just not possible, plain wrong and will absolutely
> never work. If you want that - you'll have to write your own window
> manager that in fact will be incompatible with anything else.
*sigh* if you only would read the whole thing. Your solution will still
not tell me where the decoration really is so i can't avoid it. And how
would i decide about whether i have "plenty of place on the left side" if
i don't know what the dialogue frame size will be. Secondly your proposal
won't allow me to place the dialogue next to my document if possible.
Besides resizing the dialogue is not really an option, it will have a
minimum size.
Regards, Philipp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]