Subject: FVWM: Setting dynamic working area

From: [email-masked]
Date: Sun, 26 Oct 2003 09:10:56 -0200

Hello.

When using fbpanel (a light-weight desktop panel)
with FVWM, I want to restrict the working area to
the full visible screen except for the screen area
used by fbpanel, which is placed at the bottom and
has a height of 26 pixels.

I am trying the following in my configuration:

AddToFunc InitFunction
+ I Exec fbpanel
+ I Wait fbpanel
+ I EwmhBaseStruts 0 0 0 26

but it is not working. Placement and maximation of
windows is not respecting the working area set
with the command EwmhBaseStruts.

How is the easiest way of accomplish this?

Regards,

Romildo
--
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: Sun, 26 Oct 2003 11:30:36 +0000

> How is the easiest way of accomplish this?

Using EwmhBaseStruts. Works in 2.5.5+. Maybe it does not work for you on
restarts because you placed it in InitFunction instead StartFunction?

You may place this command in the top level, not in a function, and
specify the exact geometry for fbpanel. Or, if you for some reason need
this particular command order, use this:

  AddToFunc StartFunction
  + I None (fbpanel) Exec fbpanel
  + I None (fbpanel) Wait fbpanel
  + I EwmhBaseStruts 0 0 0 26

Regards,
Mikhael.

---

From: [email-masked]
Date: Sun, 26 Oct 2003 14:18:49 -0200

> > has a height of 26 pixels.
[...]
> restarts because you placed it in InitFunction instead StartFunction?

I am running FVWM 2.5.7 and I am still having problems with windows
covering the fbpanel window, even with the EwmhBaseStruts command.

The command I use for maximizing windows is 'Maximize layer grow grow'.
As I said, maximized windows are getting beyound the working area.

New windows may get placed beyound the working area too, when the
screen has few empty areas. The placement style I am using is
"MinOverlapPlacement". I want no window over the fbpanel window.

I have tried setting the layer for fbpanel, but it did not worked.
I have the command "Style "fbpanel" StaysOnTop" in my configuration
file, but fbpanel is still put in layer 4:

$ xprop | grep -i layer
_WIN_LAYER(CARDINAL) = 4

> specify the exact geometry for fbpanel.

I tried that, but I did not find a way of starting fbpanel with a
given geometry. The program does not accept a "-g" or "-geometry"
option. It supports placement at one of screen edges (left, right,
top, bottom), chosen at its configuration file. This is not a
solution because fbpanel without a user specified geometry obeys
the working area.

> Or, if you for some reason need

I had to add the CirculateHit condition to the None
commands, otherwise it does not match the fbpanel window.

Any clues?

Romildo

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 26 Oct 2003 17:16:58 +0000

>From documentation:

	layer causes the various grow methods to ignore the
	windows with a layer less than or equal to the layer on the
	window  which  is  maximized.

So it works as expected (kind of). It is possible that it was not
intended for "layer" option to imply "ewmhiwa" option too.

Anyway, use "Maximize grow grow" or change the panel layer to do what you
want.

> "MinOverlapPlacement". I want no window over the fbpanel window.

These are only hints. What to do with windows larger than the screen
size; one or another strut should be compromized.

> file, but fbpanel is still put in layer 4:

Dominik changed the behaviour of StaysOnTop and other similar Style
options. It now works for new windows only. For existing windows use:

  All (fbpanel) Layer 0 6

I think it was intended.

Regards,
Mikhael.

---

From: [email-masked]
Date: Sun, 26 Oct 2003 16:44:05 -0200

> Anyway, use "Maximize grow grow" or change the panel layer to do what you
 
My intention was to put fbpanel on the top layer (6), And then
common applications (on layers less than or equal to 6) would
not maximize over fbpanel. But putting fbpanel on top layer
failed.

"Maximize grow grow" instead of "Maximize layer grow grow" is
not what I want, since it would avoid maximizing windows over
windows in the same layer.

> size; one or another strut should be compromized.

But most windows I work with are not larger than the screen size. They
may be put over other windows except the fbpanel. In other words, if
the window fits the working area, it should be put completly in the
working area.

> options. It now works for new windows only. For existing windows use:

I do not undestand this. In my FVWM configuration I have:

#-----------------------------------------------------
AddToFunc StartFunction
+ I None (fbpanel, CirculateHit) Exec fbpanel
+ I None (fbpanel, CirculateHit) Wait fbpanel
+ I EwmhBaseStruts 0 0 0 32

Style "fbpanel" StaysOnTop
#-----------------------------------------------------

Isn't the Style command executed before the Exec
command? That is, when the fbpanel command is
executed, the Style command has alread been
executed (fbpanel is called after FVWM initializion,
since it is called in StartFunction). Then it should
be a new window and it should be put in the
top layer. What is wrong in this reasoning?

Romildo

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 26 Oct 2003 18:58:11 +0000

> I do not undestand this. In my FVWM configuration I have:

Nothing is wrong here, if you issue the Style command in .fvwm2rc
and not in FvwmConsole, then it should work.

It is possible that fbpanel puts itself on layer 4 using GNOME or EWMH
hints. Does "Layer +1" command work on fbpanel?

If no, try to add some Ignore hint option to Style fbpanel to disallow
fbpanel to put itself on a different layer. It is also possible fbpanel
has a GUI dialog to set its layer, I am not familar with fbpanel,
but I know the GNOME panel has it.

Regards,
Mikhael.

---

From: [email-masked]
Date: Sun, 26 Oct 2003 17:28:01 -0200

On Sun, Oct 26, 2003 at 06:58:11PM +0000, Mikhael Goikhman wrote:
> hints.

The Style command is issued in .fvwm2rc, but fbpanel puts itself
on layer 4.

"All (fbpanel) Layer 0 6" in the StartFunction works (fbpanel
is put in layer 6).

> Does "Layer +1" command work on fbpanel?

This works.

> but I know the GNOME panel has it.

I have tried 

   Stye "fbpanel" EWMHIgnoreStackingOrderHints, StaysOnTop

but fbpanel still puts itself on layer 4.

Romildo

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 26 Oct 2003 20:46:10 +0000

> but fbpanel still puts itself on layer 4.

Then:

  Style "fbpanel" GNOMEIgnoreHints

Regards,
Mikhael.

---

From: [email-masked]
Date: Mon, 27 Oct 2003 07:04:03 -0200

>   Style "fbpanel" GNOMEIgnoreHints

No success. fbpanel is still put on layer 4, with

   Stye "fbpanel" GNOMEIgnoreHints, StaysOnTop

Attached is the output of xprop run on the
fbpanel window.

Regards.

Romildo
-- 
Prof. José Romildo Malaquias        [email-masked]
Departamento de Computação       [email-masked]
Univ. Federal de Ouro Preto  http://uber.com.br/romildo

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 27 Oct 2003 09:53:44 +0000

> Attached is the output of xprop run on the

Except to point that you twice posted "Stye" instead of "Style", I don't
know. I don't have fbpanel to verify this.

If Style does not work for you, just add:

  Next (fbpanel, CirculateHit) Layer +2

after Wait fbpanel.

Regards,
Mikhael.

---

From: [email-masked]
Date: Mon, 27 Oct 2003 14:21:14 -0200

> know. I don't have fbpanel to verify this.

It was wrong only in the message, not int configuration
file.

>   Next (fbpanel, CirculateHit) Layer +2

Setting fbpanel layer with Style does not work.
But adding

   All (fbpanel) Layer 0 6

after Wait fbpanel in the StartFunction does work.

In another message, Mikhael Goikhman wrote:
> 
> It is also possible fbpanel

fbpanel does not have any GUI dialog for set up. Its
configuration is done through a file configuration. But
it seems that there is no option for setting the layer
in it.

Regards.

Romildo