On Thu, Jul 15, 2004 at 11:45:17AM -0400, David Wu wrote:
> Hi all fvwm gurus
>
> Im trying to implement the following behavior in a function for use in
> FvwmTaskBar's Click1 function. But I am having trouble doing so
>
> The following behavior is desired, note that the function will quit
> using "Break" as soon as one option is chosen and executed
>
> 1. the window will be raised and focused if it is overlapped by any
> window (i.e not the top most window)
> 2. the window will be raised and focused if it is not currently focused,
> even if it is the top most window
> 3. the window will be minimized if it is already the top most window and
> its focused
> 4. the window will be deiconified and raised and focused if it is
> currently in a iconified state
>
> here is what i have right now
>
> DestroyFunc Raise-or-Iconify
> AddToFunc Raise-or-Iconify
> + I ThisWindow (Iconic) Deiconify-and-Raise
> + I TestRc (Match) Break
> + I ThisWindow (!Raised) Focus-and-Raise
> + I TestRc (Match) Break
> + I ThisWindow (!Focused) Focus-and-Raise
> + I TestRc (Match) Break
> + I Iconify
>
> The problem I Have is the line
> + I ThisWindow (!Raised) Focus-and-Raise
> Because testing for Raised condition also require the window to be
> "fully visible within the view port". Therefore a window which is on the
> very top but part of it not in the current viewport will cause it to
> return "not raised" even though the window is on the very top (causing
> option 1 to be executed when option 3 is desired).
> Is there a way to
> simply test if a window is on the very top without the "fully visible
> condition"? Any workaround is appreciated
There is no such test, and If I knew about a workaround I'd have
coded it into fvwm long ago. Let me explain:
The user would expect that "Raised" means "not below any other
window". If windows overlap, it is clear which window is raised,
but what if they don't overlap? Then it is reasonable to assume
that both windows a raised, but in fact only one of them is. The
X server still keeps them ordered in case they overlap in the
future. But then, your function would have a random result from
the user's point of view.
So I chose to code the current logic. X has an event that tells
fvwm whether a window is obscured by something or not, and this
information is used by the Raised condition. Unfortunately,
windows are always obscured if they are not completely on screen,
making this whole logic useless.
Even if I added a way to query the window on top of the stack, you
would not be happy with the result.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
- application/pgp-signature attachment: stored
Received on Fri Jul 16 2004 - 05:46:39 BST