Subject: FVWM CVS: fvwm domivogt

From: CVS <[email-masked]>
Date: Wed, 9 Dec 1998 07:34:30 -0600 (CST)

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	domivogt	98/12/09 07:34:30

Modified files:
	modules        : ChangeLog 
	modules/FvwmPager: x_pager.c 

Log message:
fixed bug #49 (pager balloons off screen vertically)

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 9 Dec 1998 14:41:17 +0100

Well, although my fix should repair this (I didn't try it,
please verify that it works), I am a bit concerned about
a comment in x_pager.c (lines 455-457):

    /* we don't allow yoffset of 0 because it allows direct transit
       from pager window to balloon window, setting up a
       LeaveNotify/EnterNotify event loop */

I think this might happen again if the pager is partially
off screen. Can someone who knows how X events work have
a look at this? It seems to be a workaround and I'd prefer
a clean solution without side effects.

Any ideas?

Bye

Dominik
-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Richard Lister <[email-masked]>
Date: Wed, 09 Dec 1998 17:52:25 -0500

On Wed, 9 Dec 1998 14:41:17 +0100
Dominik Vogt <[email-masked]> 
> a clean solution without side effects.

Yep, I wrote that comment. I grabbed the current 2.1.5 and it does happen
now ... try it and you'll see what i mean. The balloon pops up underneath
the cursor, generating a LeaveNotify for the pager window. This unmaps
the balloon, leaving the cursor back over the pager window and generating
an EnterNotify, which maps the balloon again, and ... hey presto you're
in a loop and the balloon repeatedly flashes on and off.

I wanted to avoid dealing with this possibility so I wrote the code
for the balloon to never overlap the pager window. I think we have
three options:

1. VERY LAZY: Remove this patch. People with the pager at the bottom
of the screen can set the yoffset negative so the ballon appears above
the pager window.

2. A BIT LAZY: Replace this patch with one that causes balloons threatening
to go off the screen to flip the sign of their yoffset.

3. NOT LAZY: figure out how to avoid the LeaveNotify/EnterNotify event
loop, thus allowing us to have balloons that overlap pager windows.

Ric

Richard J Lister, Georgetown Institute for Cognitive and Computational Sciences
Georgetown University Medical Center, Washington, DC 20007, USA
Phone: +1 202-687 2878
Email: [email-masked] 
Web: http://www.giccs.georgetown.edu/~ric/
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 10 Dec 1998 03:04:36 +0100

> loop, thus allowing us to have balloons that overlap pager windows.

I think that is the only option. Any ideas?

Dominik
-- 
Dominik Vogt, [email-masked]

---

From: Richard Lister <[email-masked]>
Date: Wed, 09 Dec 1998 21:03:43 -0500

On Wed, 09 Dec 1998 17:52:25 -0500
Richard Lister <[email-masked]> 
> in a loop and the balloon repeatedly flashes on and off.

To reply to myself on this one :-) ...

I've been looking at the code a bit more, and the elegant solution
would produce some very inelegant code.

At the moment, the second the pager window gets a LeaveNotify the
balloon is unmapped. We never get to the EnterNotify for the balloon
window. Thus, any logic to deal with this would involve delaying the
unmap of the balloon, and waiting for the next EnterNotify, checking
its window ID against the balloon, then finally doing the unmap or
not, as required.

This would make some currently simple code much more complex, and
involve storing state information between events. I'm against it.

Furthermore, I don't know of any program under any OS where
balloons/tooltips/whatever are popped up *inside* the target
window/button/whatever.

Therefore I propose the A BIT LAZY solution #2 below. Any opinions
on this? (Or does any X event wiz have a clever solution I'm too
dumb to see?)

> loop, thus allowing us to have balloons that overlap pager windows.

Cheers
Ric

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 10 Dec 1998 03:32:16 +0100

> to go off the screen to flip the sign of their yoffset.

Well, after looking some more into this I decided that although
this is not perfect, it is a clean solution and the user should
expect anyway. The balloon window should never overlap it's
application window. I'll check it in soon.

Bye

Dominik