Subject: FVWM: raising windows

From: Werner LEMBERG <[email-masked]>
Date: Thu, 23 Dec 1999 13:55:31 GMT

Something which seems to be fuzzy in fvwm2.man (of version 2.2.4):

The description of `Focus' says, among others: `Raises the window if
needed to make it visible'.  What means `if needed'?  Does it mean
that the window which gets the focus is automatically raised if it is
completely hidden?  Or does it mean that the necessity is triggered
externally, e.g. by the FvwmAuto module?  If the former is the correct
description, it doesn't work as expected, at least not with key
assignments like

  Key Left A 4 Direction West Focus

    Werner
--
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: Dan Espen <[email-masked]>
Date: Thu, 23 Dec 1999 14:31:27 -0500

>   Key Left A 4 Direction West Focus

Looking at the code, and with my testing, it looks to me like it would
only attempt to make the window visible if it was off screen.

I suggest you create a function that focuses and raises the window and
bind   that to the  key  instead, if   thats what you   want.  This is
untested:

AddToFunc FocusRaise
+ I Focus
+ I Raise

Key Left A 4 Direction West FocusRaise

I'm not familiar with the direction  seeking stuff, so perhaps someone
else can answer that  question.  It would  seem to me that picking the
exact window to go  to using a direction is  only going to be reliable
in controlled circumstances, like:

+---+---+
|   |   |
+---+---+
|   |   |
+---+---+

There are lots of other ways to pick the next window to use.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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: Werner LEMBERG <[email-masked]>
Date: Fri, 24 Dec 1999 09:08:01 GMT

> Looking at the code, and with my testing, it looks to me like it
> would only attempt to make the window visible if it was off screen.

Sounds reasonable -- maybe this could be added to the man page.

> I'm not familiar with the direction seeking stuff, so perhaps
> someone else can answer that question.  It would seem to me that
> picking the exact window to go to using a direction is only going to
> be reliable in controlled circumstances, like:
> 
> +---+---+
> |   |   |
> +---+---+
> |   |   |
> +---+---+
> 

Using the `Lenience' option, it works sometimes unpredictable, but I
can finally access all windows in a more or less direct way.

For use with the keyboard I could imagine a pure geometric algorithm
(note that I have not checked the fvwm2 code):

  If you go down (i.e, a `Direction south'), sort the y-coordinates of
  the top sides of all windows which are visible and satisfy all
  conditions, and move along this list.  If two coordinates are equal,
  remove all but the leftmost from this list.

Left/Right movement could be handled similarly.  Of course, the
algorithm doesn't work with diagonal movement, but I assume that most
people use the arrow keys -- maybe this could be implemented as a new
function called `GeometricDirection' or something similar.

    Werner