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

From: Tom Alsberg <alsbergt_at_zoopee.org>
Date: Sat, 6 Jul 2002 15:02:01 +0300

Hi there...
Comments below, again:

On Sat, Jul 06, 2002 at 03:28:09AM +0200, Dominik Vogt wrote:
> On Sat, Jul 06, 2002 at 01:46:42AM +0300, Tom Alsberg wrote:
> > <snip />
> > 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.

Well, there are other examples, like I noted, with GTK+ buttons,
Netscape toolbars, balloon titles in FvwmPager... And sometimes
windows being automatically raised (e.g. FvwmButtons) start
flickering - getting raised and lowered over and over again frequently
in a short time...
I do not have exact tests for those examples, though, as they do not
always happen - only once in a while... But if you use this setup for
a while, with some activity with automatically raised and lowered
windows, then you'll probably see it a few times.

> > 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.

I would ask now - why does this have to be a complex function?
Couldn't it be, instead of a complex function, just some
AutoRaise/AutoLower style?

> 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*).

By enter and leave events, do you mean events of FVWM (FvwmEvent), or
events in the level of X? After all, FVWM does a lot of things on
enter and leave, including focus, changing window styles, etc etc.

If we are talking about X events here... Then, well, I find it hard to
believe that it is not well tested and documented... As it is used a
lot and seems to have not principle problems...

Also, why a real hack (and *slow*)?

> Moving the pointer across the desktop can trigger dozens of enter
> and leave events.
>
> > <snip />
> >
> > This really sounds like a sub-optimal specific workaround for
> > me. Couldn't this problem be fixed?
>
> No. Complex function = pointer grabbed.

Again, why do automatically raising and lowering have to be
implemented using a complex function?

> 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.

Well, might be... But, well... I still find this a bit weird,
considering that some other window managers handle that quite well,
also with gv... And, as I said, the problem is not only with gv... gv
is just a test that always shows the problem.

> > 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.

I tried FvwmAuto for that, and those were exactly my problems... I do
have my focus following the pointer, except windows which have the
ClickToFocus style enabled... And mostly, those are the windows I want
to automatically raise and lower...
That was what my first post on this subject (back near the end of
2001) was to say... That I need a bit more than FvwmAuto can do, at
that time...

> > 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.

Why would it? If the problem is that FVWM grabs the pointer in a
complex function, than be it a simple style, and some of it is solved
already...

> 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.

No, actually it is based on the pointer entering and leaving the
window... As I said, that was one thing that CTWM did just well, fine
without problems as I expect it...

> It's much easier to code, but it doesn't work with ClickToFocus.

By the way, what is actually the big difference for that matter
between the mouse entering the window and the window getting focus?
Originally you said that it is a problem with the synchronization
between FVWM and X, so that while FVWM gets the event from X another
window has the pointer in it already... Can't FVWM just check that the
pointer is still in the window it got the event for from X before
applying such a function?

> 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.

Well, that will probably help a lot, but still, some of that problem
("flickering", etc.) happens also with windows that are automatically
raised and lowered... So this would still leave some of the
problem...

> Bye
>
> Dominik ^_^ ^_^

  Thanks again for the efforts in helping and the reply, I really hope
  that some-when I'll get it working as I expect...

  -- Tom

-- 
  Tom Alsberg - certified insane, complete illiterate.
        e-mail: <alsbergt_at_softhome.net>
	Homepage: http://www.cs.huji.ac.il/~alsbergt/
  * An idea is not responsible for the people who believe in it.
--
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 Sat Jul 06 2002 - 07:02:44 BST

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