widget over widget touch events

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • widget over widget touch events

    Hi,
    I would like to ask if there is any way how to prevent unwanted touch events when there is one widget over another, the top widget reacts on touch event by closing itself and the bottom widget still "receives" touch and fires its own event.
    As an example, I have a bgr window with listview, and an error dialog with confirmation button. Something happens, I show the dialog and when the button is pressed, dialog is closed AND the item in the listview at the touch location is selected.
    Basically I am looking for something similar to button widget's REACT_ON_LEVEL = 1 functionality for other widgets. In other words, touch should be processed only once. After it triggers some event on the dialog and that dialog is closed, it should not be processed any further until the touch is released.

    Is there any way how to achieve this in emWin? I am not using emWin touch drivers, so touch events are passed to emWin by GUI_TOUCH_StoreStateEx. The behavior I described could be achieved by filtering the touch events on my side, but I would rather use some built-in principle if available.

    Thanks
    Petr
  • Hi Petr,

    I did a test and it worked flawless.

    How do you react on the touch imput to close the top widget?

    Do react just on WM_TOUCH or do differentiate between clicked and released.

    I would suggest to react on released because after this event the shouldn't come any more touch events, so no more events which could be caught by the lower widget.

    Regards,
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.