Subject: Re: FVWM: window resize in 2.5.7

From: Dominik Vogt <[email-masked]>
Date: Fri, 1 Aug 2003 09:09:53 +0200

On Thu, Jul 31, 2003 at 10:45:12PM +0200, Olivier Chapuis wrote:
> On Thu, Jul 31, 2003 at 04:44:48PM +0200, Dominik Vogt wrote:
> > On Thu, Jul 31, 2003 at 03:47:56PM +0200, Olivier Chapuis wrote:
> > > On Thu, Jul 31, 2003 at 11:51:59AM +0200, Dominik Vogt wrote:
> > > > Somethimes I feel like talking to a wall.  See my previous mails.
> > > 
> > > I think that you do not understand me. I see bugs that I can reproduce
> > > easily and I want to found a solution. I really care that fvwm can
> > > work well with certain applications (e.g., Mozilla and gkrellm). And
> > > what about all your work on autohide with the Schedule command and
> > > FvwmEvent (via WindowShade)?
> > 
> > I'm talking only about not grabbing the pointer in complex
> > functions.  Argue as much as you want, it does not work because it
> > can not work reliably under X, for example because of the way
> > EnterNotify and LeaveNotify events work.
> 
> Please give an example I can reproduce. I think there is some but I would
> like to see one which is reproducible. The example you give cannot
> happen I think (and there are problems in the code with this example).
> Note, again, that aborting complex function can _also_ break things! 

There have been several examples in the past.  Search the mailing
list for them and use the old tarball they appeared in.  Please
don't waste my time generating artificial buggy situations for
you.

> It is clear that you can do too much things with complex function to
> have a default regarding grabbing. My hope is/was that this can be
> detected in the average and add a special stuff for the unlikely
> case.

It can't.

> I think that Dan idea is ok (I do not want to fight too much
> more).

I don't.  Sometimes it's better to live without certain "features"
for the sake of code maintenance.

> I've suggested the converse: added a ForceGrab and
> ForceFastGrab "dummy command" because again I cannot reproduce
> (or even get one problem with my logic). 
>  
> > If you don't like it,
> > all you can do is to delay function execution until the pointer
> > can be grabbed (i.e. loop forever in certain places).  But - this
> > may generate a deadlock with applications that grab the pointer
> > and then expect that the window manager processes requests.
> > 
> 
> Do not underestimate my understanding of fvwm and X (however, I am not
> (yet?) a big specialist of complex functions).
 
> In a certain sense fvwm already "freeze" when grabbing fail: when
> grabbing fail when you execute a complex function fvwm freeze for a few
> seconds in GrabEm and in fact this cause the problem with gkrellm: If
> you try to grab only once when executing complex function and abort if
> this fail gkrellm can be moved smoothly.

It's a gkrellm problem.  Period.  Not every bug in applications
can be circumvented by the window manager.

> > > You give an example and I study it carefully and found some strange
> > > behavior in the current code.
> > > 
> > > You claim that my ideas can give raise to some bug. I cannot reproduce
> > > any one but I trust you.
> > > 
> > > I say that I am ready to work on any other idea.
> > > 
> > > Now you say that I am a wall! This is funny. Maybe you should read my
> > > mail
> > 
> > I spend much more time reading list mail carefully than you think
> > (and than I should spend, for that matter).
> 
> My previous and _complex_ previous long mail as the following date (I
> spent one day to write it, reading the code an your mails, make some
> experience ...etc):
> 
>   On Thu, Jul 31, 2003 at 11:32:05AM +0200, Olivier Chapuis wrote:
> 
> Your answer arrived 20 minutes later ... :o) 

Well, good job in writing that mail.  Although it was long, it was
easy to understand.

Bye

Dominik ^_^  ^_^
--
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: Dominik Vogt <[email-masked]>
Date: Fri, 1 Aug 2003 09:14:00 +0200

On Thu, Jul 31, 2003 at 10:39:32PM +0200, Olivier Chapuis wrote:
> On Thu, Jul 31, 2003 at 10:58:17AM -0400, Dan Espen wrote:
> > Dominik Vogt <[email-masked]> writes:
> > > EnterNotify and LeaveNotify events work.  If you don't like it,
> > Please don't take this the wrong way.
> > Not all of us have your deep understanding of fvwm.
> > 
> > If the goal is to run some functions without grabbing,
> > why not make it an option?
> > 
> > Like:
> > 
> > FunctionNoGrab FUNCNAME
> > 
> > or Grab and UnGrab comands:
> > 
> > DestroyFunc ScreenDump
> > AddToFunc ScreenDump
> > + I UnGrab
> > + I Exec xwd
> > + ...
> >
> 
> Yes why not. In fact what is needed if we go this way is a "Grab fast
> and abort if fail" and a "Grab fast and continue if fail" pre cmds.

This can already be approximated with

  DestroyFunc ScreenDump
  AddToFunc ScreenDump
  + I schedule 0 0 exec xwd
  + I schedule <some delay> 0 ...
  key f12 a m ScreenDump

Bye

Dominik ^_^  ^_^

---

From: Olivier Chapuis <[email-masked]>
Date: Fri, 1 Aug 2003 11:56:20 +0200

> don't waste my time generating artificial buggy situations for

The only example I found is the well known "rxvt selection problem"
and ... it happens on "H"old. We are not agree on a problem it seems
to me that you can make an effort and give me an example (as I said I
worked hard on this, this last few days). Or should claim that there
is no to see one?
 
> for the sake of code maintenance.

There is no reason for a function of the form

AddToFunc I FvwmEventHandle_config_window Echo "config_window"

to be aborted because the pointer is grabbed. Again a complex func can
do so many things that controling the grabbing is necessary IMO.

> can be circumvented by the window manager.

Yes it is a gkrellm problem (and maybe a gtk 2.2 problem). The problem
I've with my "old" gkrellm come from FvwmEvent. What about the others
examples I give with FvwmEvent? 

> Well, good job in writing that mail.  Although it was long, it was

My feeling is that you do not want to do something (on this subject)
whatever the problems we can discover with the current code, whatever
I can or any body else can say and whatever the solution we can propose
(an optional pre cmd) ...etc.  So yes it is easy to answer my mails.

Regards, Olivier

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 1 Aug 2003 14:15:54 +0200

> worked hard on this, this last few days). Or should claim that there

I already explained the problem with Enter- and LeaveNotify events
and SloppyFocus.  You don't even need an external application to
get problems with scripts that warp the pointer and change the
focus.  There have been several patches in the past with a fix
following soon.

> do so many things that controling the grabbing is necessary IMO.

Predicting whether the grab is necessary or not is impossible.
This may depend on the output of external commands, other complex
functions, the behaviour of other applications, and so on.

> examples I give with FvwmEvent?

I repeat, I'm talking only about the complex function grab.  We
must either live with the problems that come from it or find a
different way to get around them.

> (an optional pre cmd) ...etc.

Yes, I hope I made it clear that I consider getting rid of the
grab is the wrong way to go.  Other than that I hope we can do
without further sarcasm, finger pointing, flaming, etc.

Bye

Dominik ^_^  ^_^