Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-951

Only first click is received by container listeners

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.1, 2.0.5
    • Component/s: wtk
    • Labels:
      None

      Description

      Mouse button listeners added to a container receive only the first mouse click event. Following clicks are never dispatched to listeners.

      Problem is that Container's mouseClickConsumed variable once set to false never becomes true.

      1. patch-mouse-click-2.0.4.diff
        0.5 kB
        Alessandro Pira
      2. Sample.java
        1 kB
        Alessandro Pira

        Activity

        Hide
        alessandro.pira Alessandro Pira added a comment -

        I am attaching a simple app to reproduce the problem and the patch I applied to solve it.
        Actually, I'm not really sure the mouseClickConsumed variable is really usefull, IMHO it could be removed.

        Show
        alessandro.pira Alessandro Pira added a comment - I am attaching a simple app to reproduce the problem and the patch I applied to solve it. Actually, I'm not really sure the mouseClickConsumed variable is really usefull, IMHO it could be removed.
        Hide
        rwhitcomb Roger Whitcomb added a comment -

        Committed the suggested patch after testing with the "Sample" application.

        branches/2.0.x:
        Sending 2.0.x/wtk/src/org/apache/pivot/wtk/Container.java
        Transmitting file data .
        Committed revision 1602230.

        trunk:
        Sending trunk
        Sending trunk/wtk/src/org/apache/pivot/wtk/Container.java
        Transmitting file data .
        Committed revision 1602231.

        Also committed the sample application as "Pivot951.java":
        Adding 2.0.x/tests/src/org/apache/pivot/tests/issues/Pivot951.java
        Transmitting file data .
        Committed revision 1602233.

        Sending trunk
        Adding trunk/tests/src/org/apache/pivot/tests/issues/Pivot951.java
        Committed revision 1602234.

        I would like confirmation that the issue is resolved to your satisfaction, and/or if you have further input about the "mouseClickConsumed" variable and its usage. We will try this in our application to make sure nothing is broken.

        Show
        rwhitcomb Roger Whitcomb added a comment - Committed the suggested patch after testing with the "Sample" application. branches/2.0.x: Sending 2.0.x/wtk/src/org/apache/pivot/wtk/Container.java Transmitting file data . Committed revision 1602230. trunk: Sending trunk Sending trunk/wtk/src/org/apache/pivot/wtk/Container.java Transmitting file data . Committed revision 1602231. Also committed the sample application as "Pivot951.java": Adding 2.0.x/tests/src/org/apache/pivot/tests/issues/Pivot951.java Transmitting file data . Committed revision 1602233. Sending trunk Adding trunk/tests/src/org/apache/pivot/tests/issues/Pivot951.java Committed revision 1602234. I would like confirmation that the issue is resolved to your satisfaction, and/or if you have further input about the "mouseClickConsumed" variable and its usage. We will try this in our application to make sure nothing is broken.
        Hide
        alessandro.pira Alessandro Pira added a comment -

        Thank you.
        In our application the patch I sent solved the specific issue and still we noticed no bug introduced by the fix. However, we applied it in a version that's still under development and won't go through testing phase until next week.
        Also, I completely removed the mouseClickConsumed variable and noticed no difference.

        Show
        alessandro.pira Alessandro Pira added a comment - Thank you. In our application the patch I sent solved the specific issue and still we noticed no bug introduced by the fix. However, we applied it in a version that's still under development and won't go through testing phase until next week. Also, I completely removed the mouseClickConsumed variable and noticed no difference.
        Hide
        smartini Sandro Martini added a comment -

        The issue seems resolved; be free to reopen if needed.
        Thanks for the help on this .

        > Also, I completely removed the mouseClickConsumed variable and noticed no difference.
        on this I think it's safer to keep the variable ...

        Show
        smartini Sandro Martini added a comment - The issue seems resolved; be free to reopen if needed. Thanks for the help on this . > Also, I completely removed the mouseClickConsumed variable and noticed no difference. on this I think it's safer to keep the variable ...

          People

          • Assignee:
            rwhitcomb Roger Whitcomb
            Reporter:
            alessandro.pira Alessandro Pira
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development