Re: FVWM: Automatically raise certain windows on mouse enter, flickering of windows and widgets

From: Dominik Vogt <dominik.vogt_at_gmx.de>
Date: Sat, 6 Jul 2002 03:28:09 +0200

On Sat, Jul 06, 2002 at 01:46:42AM +0300, Tom Alsberg wrote:
> Hi there.
> Please read my comments below:
>
> On Fri, Jul 05, 2002 at 10:41:51PM +0200, Dominik Vogt wrote:
> > Ah yes. Ghostview probably wants to grab the pointer when the
> > zoom window is opened, but since fvwm is in a complex function,
> > the pointer is already grabbed.
>
> The problem is not only with gv.

> The whole problem of flickering is
> still there, including the problems with buttons in GTK+ applications,
> Netscape toolbar, borders of some windows being automatically raised
> like XClock and FvwmIconMan, FvwmPager balloon titles, etc. I only
> gave gv as an example which always shows the problem.

Unfortunately, the gv problem I saw had little to do with
flickering. If other apps have this problem, I need more
examples.

> I do not see why gv trying to grabbing the pointer should be a
> problem, especially that other window managers (e.g. CTWM) have such
> a feature (automatically raise and lower) which doesn't cause those
> problems. I don't see exactly why FVWM should grab the pointer for
> that.

Because fvwm is executing a complex function. The pointer is
always grabbed during function execution (and has to be to
prevent funny and hard to debug problems). Don't forget we're
not using well tested, documented features here. After all, using
enter and leave events is a real hack (and *slow*). Moving the
pointer across the desktop can trigger dozens of enter and leave
events.

> > Instead or retrying, gv gives up immediately and closes the window.
> > On my machine, the problem goess away when I add this line at the
> > front of the autohide_window function:
> >
> > + I PointerWindow (gv) break
>
> This is a workaround for gv, which also reduces a bit from the
> functionality of the auto-raise and auto-lower (disabling them on that
> window), but I wouldn't apply this workaround wherever I see such a
> problem... I think this should just be fixed.
>
> > so the complete function looks like this:
> >
> > DestroyFunc autohide_window
> > AddToFunc autohide_window
> > + I PointerWindow (gv) break
> > + I Schedule $[AUTO_HIDE_DELAY] $[AUTO_HIDE_GROUP] hide_all
> > + I PointerWindow (FvwmIconMan) schedule_raise
> > + I PointerWindow (FvwmButtons) schedule_raise
> > + I PointerWindow (xclock) schedule_raise
> > + I PointerWindow (xexec) schedule_raise
> >
> > Fvwm breaks out of the function fast enough so that gv can grab
> > the pointer. Unfortunately, the pattern (gv) applies to all
> > ghostview windows, somewhat negating the effect of the autohide
> > setup.
>
> This really sounds like a sub-optimal specific workaround for
> me. Couldn't this problem be fixed?

No. Complex function = pointer grabbed. Any application that is
stupid enough to not retry grabbing the pointer when it's needed
and unlucky enough to try it at the wrong time has a problem.
Correct fix = fix gv.

> I am not enough of an expert in X11 to tell exactly... But since other
> window managers, like CTWM (I keep giving it as an example because
> that's one I used lot beside and before FVWM) have this function
> (auto-raise and auto-lower) working fine, without flickering, and not
> causing problems with pointer grabbing with gv, I suppose that could
> be done with FVWM too...

Sure. Use FvwmAuto. Of course you'd have to switch to
SloppyFocus or MouseFocus and lose ability to enable the feature
only for selected windows.

> Couldn't there just be added two styles - AutoRaise and AutoLower,
> which would do that, and just that, and do it simple without
> flickering and problems, needing scheduling and the like?

That would just move the problem into the fvwm core. CTWM might
also have an auto-raise feature, but I bet it's based on *focus*
changes too and not on the pointer entering or leaving the window.
It's much easier to code, but it doesn't work with ClickToFocus.

Anyway, I think it's possible to modify the lines I posted to
disable and scheduling of commands while the pointer is outside
any of the autoraise/lower windows. Will take some time.

Bye

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.
Received on Fri Jul 05 2002 - 20:28:38 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:53 BST