Subject: FVWM: Window placement questions

From: Uwe Pross <[email-masked]>
Date: Mon, 3 Jun 2002 08:53:26 +0200

Hi there,

is it possible to achieve that fvwm ignores certain windows completely
while placing others?

I configured fvwm that it pops up a xmessage for 2 seconds when it
starts a program to show that something is happen:

AddToFunc FuncStartProgram I Exec echo Starting $0 $1 $2...>> /dev/console
 + I Exec xmessage -timeout 2 -button "" -name SplashWindow -geometry +0+0 "Starting $0 $1 $2..."
 + I Exec $*

This "SplashWindow" should stay on top and it should be ignored by
placement algorithm: 

Style "SplashWindow" NoTitle, BorderWidth 0, HandleWidth 0, \
		     StaysOnTop, Sticky, WindowListSkip, NeverFocus

Is it possible to get this window ignored by while placing other
windows? 

The second question I have is also about window placement. I have
asked this question before and it was said to be possible in version 
>2.5.x but I have not idea how to set this up. 

My desktop looks like this:

+----------------+---+
|                |   |
|                |   |
|                |   |
|       1        | 2 |
|                |   |
|                |   |
|                |   |
+----------------+---+  
|         3          |
+--------------------+

Where 1 is the main area, 2 is a button bar and 3 is the taskbar. I
would like to set up fvwm that is places new windows only in area 1. 

Any suggestions how to get this work?

Thanks.

Uwe 
-- 
+--------------------------------------------------
| Uwe Pross 
| mail : mailto:[email-masked]
| www  : http://www.tu-chemnitz.de/~uwp
+--------------------------------------------------

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 3 Jun 2002 15:42:32 +0000

> is it possible to achieve that fvwm ignores certain windows completely

Generally, no, it is not possible to make an individual window special.
But it may be possible in some specific setups, where you know that there
is only one sticky window, or one OnTop window and so on.

>  + I Exec xmessage -timeout 2 -button "" -name SplashWindow -geometry +0+0 "Starting $0 $1 $2..."

Offtopic. I find xmessage very configurable for a splash. Try this:

  xmessage -g +0+0 -name SplashWindow -bg darkcyan -fg white -timeout 2 -button "" -xrm '*cursorName: none' -xrm '*borderWidth: 2' -xrm '*borderColor: yellow' -xrm '*Margin: 20' 'Starting app...'

> Is it possible to get this window ignored by while placing other

There is PlacementOverlapPenalties Style option that enables to configure
how your window is placed (not how other windows are placed relatively to
that window). But if that SplashWindow is the only Sticky window, try:

  Style * MinOverlapPlacement, PlacementOverlapPenalties 1 5 1 0 0 50

Or if it is the only OnTop window, try:

  Style * MinOverlapPlacement, PlacementOverlapPenalties 1 0 1 1 0 50

Probably it makes sence to extend PlacementOverlapPenalties to get several
more arguments, for example 2 factors for State-0 and State-1 windows.
Each window has 32 boolean window properties (states) that a user may set.
I.e.: Next (SplashWindow) State 0 true
or even (not yet): Style SplashWindow State 0 true

Report your results if you succeed.

> My desktop looks like this:

Search for "strut" in the man page. Try:

  EWMHBaseStrut 0 62 0 63

You may do some additional work to have everything work as you want,
like placement, Maximize and so on. Report your results if you succeed.

Regards,
Mikhael.

---

From: Uwe Pross <[email-masked]>
Date: Tue, 4 Jun 2002 14:30:20 +0200

>   Style * MinOverlapPlacement, PlacementOverlapPenalties 1 0 1 1 0 50

Style * MinOverlapPlacement
Style * PlacementOverlapPenalties 1 0 10 1 0 50

Does exactly what I want :-) Normally the splash window is the only
window which has the StaysOnTop option. But I like it in general if
windows on top are ignored by the placement algorithm.

> or even (not yet): Style SplashWindow State 0 true

Not for me at the moment. But maybe other users would like to use it.

> like placement, Maximize and so on. Report your results if you succeed.

Works fine :-) All other things worked already as I want.
I use environment variables to set the size of the buttonbar and
taskbar. So my actual configuration comes to:

....
SetEnv TaskBarHeight        26
SetEnv ButtonBarHeight      0
SetEnv ButtonBarWidth       66

EWMHBaseStrut 0 $[ButtonBarWidth] 0 $[TaskBarHeight]

Style * EWMHMaximizeIgnoreWorkingArea
Style * EWMHPlacementUseWorkingArea
....

I use two different maximize/resize functions to maximize to the
"Working area" and to the whole screen:

....
DestroyFunc MyMaximize
AddToFunc MyMaximize I Current Maximize 100 100
+ I Raise

DestroyFunc ResizeToShowButtons
AddToFunc ResizeToShowButtons I Current Resize $[WindowWidth]p $[SpaceBetweenBars]p
+ I Current AnimatedMove 0 $[ButtonBarHeight]p
+ I Raise

Mouse 1 6 A Function ResizeToShowButtons
Mouse 1 4 A Function MyMaximize
....

So thank you very much for the hints.

Uwe
-- 
+----------------------------------------------
| Uwe Pross
| mail : mailto:[email-masked]
| www  : http://www.tu-chemnitz.de/~uwp
+----------------------------------------------

Have a nice day ;-).

-----------------------------------------------

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 4 Jun 2002 21:28:12 +0000

> windows on top are ignored by the placement algorithm.

There are 2 kinds of OnTop window, the persistent ones - you may like them
never be covered, and the transients - they may be completely ignored.

> So thank you very much for the hints.

Thanks shouls go to Olivier who implemented PlacementOverlapPenalties
and EWMHBaseStrut. I merely retold the man page.

Regards,
Mikhael.

---

From: Uwe Pross <[email-masked]>
Date: Wed, 5 Jun 2002 21:28:09 +0200

> EWMHBaseStrut 0 $[ButtonBarWidth] 0 $[TaskBarHeight]

I realized that the line above causes an error message:

[FVWM][FvwmErrorHandler]: <<ERROR>> *** internal error ***
[FVWM][FvwmErrorHandler]: <<ERROR>> Request 18, Error 5, EventType: 0

This message is produced when starting and restarting fvwm. It is  not
produced if the line above is commented out. 
Apart from this message I have not realized  that  anything  does  not
work as expected (yet). 

Just  in  case  this  message  is  caused  by  the  command  above  in
conjunction  with  other commands I have put my actual .fvwm2rc on the
web: 
(http://www-user.tu-chemnitz.de/~uwp/download/fvwm2rc_EWMHBaseStrut_problem)

FVWM version 2.5.1
XFree86 Version 3.3.6
Linux 2.4.17

Uwe

Have a nice day ;-).

---

From: Olivier Chapuis <[email-masked]>
Date: Thu, 6 Jun 2002 00:16:40 +0200

> produced if the line above is commented out.

Yes I see; It is now fixed in the current cvs and so it will be fixed
in 2.5.2. Thanks.
 
> Apart from this message I have not realized  that  anything  does  not

What is/are the problems? I do not think that the above message
can cause big problems. If you get any pbs, try to set the ewmh
base strut after fvwm has started.

Regards, Olivier

---

From: Uwe Pross <[email-masked]>
Date: Thu, 6 Jun 2002 08:29:12 +0200

On Thu, Jun 06, 2002 at 12:16:40AM +0200, Olivier Chapuis wrote:
> can cause big problems. 

No problem so far. I just wanted to say that the error message is only
thing I realized. No unwanted or unexpected behaviour :-)

Uwe

Have a nice day ;-).