Subject: FVWM: 2.5.5: maximize + focus policy

From: "[email-masked]" <[email-masked]>
Date: Sat, 28 Dec 2002 13:18:46 +0100

Hi,

wow! A lot of things have changed since I used fvwm-2.4.x the last
time (I use 2.5.5 now). Great!

I've got two questions:

1.) some windows don't get focus

If I click on mozilla -> edit -> preferences then the pref window
appears on top but it is not activated. So I can't use the keys until I
click into the window to activate it. The same happens to my
email-app sylpheed when I want to create a new message.

With nedit -> open file or openoffice -> file open dialog this does
*not* happen. Here the window gets the focus like it should.

What's the way to make all apps give their windows/dialogs the focus at
once and activate them properly?

2.) maximize

I made my own xpm images and replaced the maximize function with my own
(which is actually a ResizeMove action because I've got my FvwmTaskBar
on *top* of the screen and so the built in maximize would always place
the window on the 0,0 position and cover the TaskBar).

My question: I'd like to make a maximized window borderless. That should
word with AddToDecor somehow - but how can I toggle this back to the
original state? I am thinking of a conditional command which calls two
different decors when I press the maximize button of a window but how
could I do that?

Thank you for any help.
Felix
--
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: "[email-masked]" <[email-masked]>
Date: Sat, 28 Dec 2002 23:27:34 +0100

> 1.) some windows don't get focus

Meanwhile I've fixed this issue (with GrabFocus) but the following
remains...

> 2.) maximize
> 
> I made my own xpm images and replaced the maximize function with my
> own(which is actually a ResizeMove action because I've got my
> FvwmTaskBar on *top* of the screen and so the built in maximize would
> always place the window on the 0,0 position and cover the TaskBar).
> 
> My question: I'd like to make a maximized window borderless. That
> should word with AddToDecor somehow - but how can I toggle this back
> to the original state? I am thinking of a conditional command which
> calls two different decors when I press the maximize button of a
> window but how could I do that?

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 29 Dec 2002 00:45:43 +0000

> the window on the 0,0 position and cover the TaskBar).

Use "EWMHBaseStruts 0 0 30 0" in 2.5.5 for the internal Maximize to work
like you want.

> different decors when I press the maximize button of a window but how

I would not do this with decors, I would use "Next (XCalc) Style $n ...".
This potentially changes the appearance of all windows with this name, but
you can't do anything about this until we have individual window styles.
It works pretty well in most of situations.

I copy the following text from my message to this list on October 2002
(with small change, in 2.5.5 "NoBorder" syntax was changed to "!Borders"):

====

It is possible to do with 2.4.x too, but the if-else is tricky in 2.4.x
and additionally BorderWidth should be hadcoded and handles are forced:

  DestroyFunc MaximizeFullScreen
  AddToFunc   MaximizeFullScreen
  + I Style $n NoTitle, NoHandles, BorderWidth 0
  + I UpdateStyles
  + I WindowId "$w" Maximize true

  DestroyFunc UnmaximizeFullScreen
  AddToFunc   UnmaximizeFullScreen
  + I WindowId "$w" Maximize false
  + I Style $n Title, Handles, BorderWidth 5

  Key F11  A  SC  Pick MaximizeFullScreen
  Key F12  A  SC  Pick UnmaximizeFullScreen

2.5.x has no such problems (except that individual styles would not hurt):
  
  DestroyFunc MaximizeFullScreen
  AddToFunc   MaximizeFullScreen
  + I ThisWindow (Maximized) Style $n Title, Borders
  + I CondCase (NoMatch) Style $n !Title, !Borders
  + I CondCase (NoMatch) Raise
  + I CondCase (NoMatch) UpdateStyles
  + I Maximize

  Key F11  A  SC  Pick MaximizeFullScreen

Regards,
Mikhael.

---

From: "[email-masked]" <[email-masked]>
Date: Sun, 29 Dec 2002 11:32:49 +0100

>> 2.) maximize
 
[...]

Mikhael Goikhman:

> Use "EWMHBaseStruts 0 0 30 0" in 2.5.5 for the internal Maximize to
> work like you want.

Thanks for this! Works absolutely great with a task bar on top.

>> My question: I'd like to make a maximized window borderless.

[...]

> I would use "Next (XCalc) Style $n ...". This potentially changes the
> appearance of all windows with this name, but you can't do anything
> about this until we have individual window styles.

I tested your code and it's also great but as you mentioned *all*
windows with the same name are affected (e.g. if I open two windows with
nedit and one's title is "nedit - Untitled" whereas the other is changed
to"nedit- Untitled (modified)" then the windows are treated seperately).

So, I'll wait for individual window styles.

Let me add that fvwm-2.5.5 is really a great thing. I had stopped
working with 2.4.x half a year ago and used gnome instead. But now I
come back to fvwm because gnome/metacity isn't that stable and fast as I
need it to be - and now with fvwm-2.5.5 I find a very fast, very
customizable window manager. For me the main thing are the changes to
FvwmTaskBar. Thanks,
 Felix