Subject: Expose events and menus

From: Olivier Chapuis <[email-masked]>
Date: Tue, 17 Sep 2002 15:56:27 +0200

Hello,

I am not sure that the following problem is new, but I've just not
it (I am currently work on "clipping" the menu drawing). If the popdown
menu delay is very small, for example with

MenuStyle * PopdownImmediately [,PopupOffSet 0 50, PopupDelayed, PopupDelay 500]

then sometimes menus do not refresh correctly when one of its submenu
pop down. It seems to me that the Expose event that should generate
fvwm (or the server) when a menu pop down is not generated or taken in
account. To see this you should not use an Xserver with BackingStore
enabled.

Olivier
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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: Tue, 17 Sep 2002 17:16:16 +0200

On Tue, Sep 17, 2002 at 03:56:27PM +0200, Olivier Chapuis wrote:
> account.

Pending Expose events are eaten up in some places.  Try disabling
the flush_expose() and flush_accumulate_expose() calls in menus.c.

> To see this you should not use an Xserver with BackingStore enabled.

Or use a b/d gradient MenuFace.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
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: Olivier Chapuis <[email-masked]>
Date: Thu, 19 Sep 2002 08:47:50 +0200

> the flush_expose() and flush_accumulate_expose() calls in menus.c.

flush_expose() and flush_accumulate_expose() seems ok in menu (each
time there are called the menu is repaint accordingly). dispatch_event()
is ok too. I do not know where the popdown Expose event is lost.
It seems that there is a kind of race  condition somewhere.
If the popup delay <= popdown delay the pbs never happen.

At present time, I've a very simple fix: just XSync after pop_down
in pop_menu_down_and_repaint_parent if there is a parent and
!*fSubmenuOverlaps (BTW, it seems that *fSubmenuOverlaps is always
False, but when it is initialized ... fixed here).

I imagine that this is not the good fix??

Olivier

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 19 Sep 2002 12:38:30 +0200

> I imagine that this is not the good fix??

No.  The problem is that the fSubmenuOverlaps flag is not set.
pop_menu_down_and_repaint_parent() can't do its job properly
without that flag.  The recent cleanup in the menu code must have
screwed up that flag setting.

Bye

Dominik ^_^  ^_^

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 19 Sep 2002 12:52:38 +0200

> I imagine that this is not the good fix??

Fixed.  I accidentally made the ...overlap... flags local to the
action handler functions instead of local to the whole menu
invocation.

Bye

Dominik ^_^  ^_^