[UFO-devel] mouse press events and ufo::UMenuItem
Status: Beta
Brought to you by:
schmidtjf
From: Andreas B. <b_...@gm...> - 2005-08-15 01:21:22
|
Hi the attached fix makes sure that MousePress events are consumed when clicking on a menu item. Without this patch the event may get propagated back to other widgets and eventually causing a call to closeMenuPopups() that hides the menu. The click on the menu item is still correctly processed, but the following mouse press event is then not eaten by the menu item anymore (because w_under_mouse->contains(e->getLocation()) is false then). I am not fully sure if this problem appears in official libufo cvs, too, but I think this patch should not have any evil side effects (actually the menu item _should_ consume the event, as it waits for the corresponding release event then). You can test whether the problem appears in official libufo by doing: Click on a menu item and hold the button. If the menu gets hidden, then the bug does appear. If the menu gets hidden only after releasing the button, then not. (It certainly does happen for me, but as said before I am using a heavily modified event dispatch code that also works for layered panes) CU Andi |