Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8161282

FXCanvas does not forward horizontal mouse scroll events to the embedded scene

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      other

      Description

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      Horizontal mouse wheel events that are not synthesized from pan events (i.e. events of type SWT.MouseHorizontalWheel) are not forwarded to the embedded scene by FXCanvas, while vertical mouse wheel events are. Similar to touch events (see JDK-8143596), these events are thus not received by the JavaFX scene.

      The FXCanvasEx implementation provided by the Eclipse GEF project (or more precisely the gesture converter used by it internally: http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.fx.swt/src/org/eclipse/gef4/fx/swt/gestures/SWT2FXEventConverter.java) compensates this. However, the fix relies on internal API of JavaFX and will no longer work under the restrictions of Jigsaw.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      1. JDK-8161282_15_08_16.patch
        19 kB
        Kevin Rushforth
      2. JDK-8161282_16_08_16.patch
        18 kB
        Kevin Rushforth

        Issue Links

          Activity

          webbuggrp Webbug Group created issue -
          Hide
          aroy Abhijit Roy added a comment - - edited
          This is a duplicate issue of JDK-8143596. So, closing this issue as closed/duplicate.
          Show
          aroy Abhijit Roy added a comment - - edited This is a duplicate issue of JDK-8143596 . So, closing this issue as closed/duplicate.
          aroy Abhijit Roy made changes -
          Field Original Value New Value
          Labels webbug dcsroy webbug
          aroy Abhijit Roy made changes -
          Labels dcsroy webbug dcsroy reproducer-yes webbug
          aroy Abhijit Roy made changes -
          Labels dcsroy reproducer-yes webbug dcsroy webbug
          aroy Abhijit Roy made changes -
          Project Java Incidents [ 10301 ] JDK [ 10100 ]
          Key JI-9040978 JDK-8161282
          Workflow JBS Incident Workflow [ 4901831 ] JBS Workflow [ 4901831 ]
          Component/s javafx [ 11900 ]
          Component/s javafx [ 11901 ]
          Affects Version/s 8u92 [ 18505 ]
          Affects Version/s 8u92 [ 18546 ]
          aroy Abhijit Roy made changes -
          Subcomponent other [ 1402 ] other [ 1385 ]
          aroy Abhijit Roy made changes -
          Link This issue duplicates JDK-8143596 [ JDK-8143596 ]
          aroy Abhijit Roy made changes -
          Status New [ 10000 ] Closed [ 6 ]
          Assignee Abhijit Roy [ aroy ]
          Resolution Duplicate [ 3 ]
          kcr Kevin Rushforth made changes -
          Summary FXCanvas does not forward horizontal mouse scroll events to the embedded scene. FXCanvas does not forward horizontal mouse scroll events to the embedded scene
          Hide
          kcr Kevin Rushforth added a comment -
          Reopening per additional information from bug submitter.
          Show
          kcr Kevin Rushforth added a comment - Reopening per additional information from bug submitter.
          kcr Kevin Rushforth made changes -
          Resolution Duplicate [ 3 ]
          Status Closed [ 6 ] Open [ 1 ]
          Affects Version/s 9 [ 14949 ]
          Fix Version/s tbd_major [ 11972 ]
          Assignee Abhijit Roy [ aroy ]
          kcr Kevin Rushforth made changes -
          Link This issue relates to JDK-8143596 [ JDK-8143596 ]
          kcr Kevin Rushforth made changes -
          Link This issue duplicates JDK-8143596 [ JDK-8143596 ]
          kcr Kevin Rushforth made changes -
          Labels dcsroy webbug dcsroy nicetohave webbug
          kcr Kevin Rushforth made changes -
          Assignee Kevin Rushforth [ kcr ]
          Hide
          kcr Kevin Rushforth added a comment -
          Attached patch provided by Alexander Nyseen.
          Show
          kcr Kevin Rushforth added a comment - Attached patch provided by Alexander Nyseen.
          kcr Kevin Rushforth made changes -
          Attachment JDK-8161282_15_08_16.patch [ 62321 ]
          Hide
          kcr Kevin Rushforth added a comment - - edited
          Comments from Alexander N:

          ------------------------
          The patch is not as minimal as I had hoped, as the EmbeddedSceneInterface had to be changed to differentiate between mouse and scroll events (while up to now, scroll events are handled as mouse events), but for me this seemed necessary to fix this issue properly. As a result, JFXPanel had to be adjusted as well to comply to the changes in the EmbeddedSceneInterface, while its behavior should not have changed.

          As horizontal mouse events cannot be synthesized via Display.post(Event) yet (an open issue for SWT), I did not add an automated test, but instead added a manual one (FXCanvasMouseWheelEventsTest). Therefore, this patch does not depend on the patch I provided earlier for JDK-8160325.
          Show
          kcr Kevin Rushforth added a comment - - edited Comments from Alexander N: ------------------------ The patch is not as minimal as I had hoped, as the EmbeddedSceneInterface had to be changed to differentiate between mouse and scroll events (while up to now, scroll events are handled as mouse events), but for me this seemed necessary to fix this issue properly. As a result, JFXPanel had to be adjusted as well to comply to the changes in the EmbeddedSceneInterface, while its behavior should not have changed. As horizontal mouse events cannot be synthesized via Display.post(Event) yet (an open issue for SWT), I did not add an automated test, but instead added a manual one (FXCanvasMouseWheelEventsTest). Therefore, this patch does not depend on the patch I provided earlier for JDK-8160325 .
          kcr Kevin Rushforth made changes -
          Fix Version/s 9 [ 14949 ]
          Fix Version/s tbd_major [ 11972 ]
          kcr Kevin Rushforth made changes -
          Assignee Kevin Rushforth [ kcr ] Alexander Zvegintsev [ azvegint ]
          Hide
          kcr Kevin Rushforth added a comment -
          Attached update patch from Alexander Nyssen.
          Show
          kcr Kevin Rushforth added a comment - Attached update patch from Alexander Nyssen.
          kcr Kevin Rushforth made changes -
          Attachment JDK-8161282_16_08_16.patch [ 62420 ]
          Hide
          kcr Kevin Rushforth added a comment -
          Here are the notes from the patch itself (since they cannot be part of the commit message, but belong here).

          ---------------------------

          - Extended EmbeddedSceneInterface and EmbeddedScene to support propagation of scroll events.
          - Extended FXCanvas to handle SWT.MouseHorizontalWheel events in addition to SWT.MouseVerticalWheel (= SWT.MouseWheel) events. Separated handling of mouse wheel events from handling of mouse events.
          - Adjusted JFXPanel to use separate method to forward scroll event to EmbeddedScene.
          - Added manual test for forwarding of scroll events.
          Show
          kcr Kevin Rushforth added a comment - Here are the notes from the patch itself (since they cannot be part of the commit message, but belong here). --------------------------- - Extended EmbeddedSceneInterface and EmbeddedScene to support propagation of scroll events. - Extended FXCanvas to handle SWT.MouseHorizontalWheel events in addition to SWT.MouseVerticalWheel (= SWT.MouseWheel) events. Separated handling of mouse wheel events from handling of mouse events. - Adjusted JFXPanel to use separate method to forward scroll event to EmbeddedScene. - Added manual test for forwarding of scroll events.
          Hide
          kcr Kevin Rushforth added a comment -
          Raising the priority to P3 since the current workaround for JDK 8 will no longer work in JDK 9 due to its reliance on internal packages.
          Show
          kcr Kevin Rushforth added a comment - Raising the priority to P3 since the current workaround for JDK 8 will no longer work in JDK 9 due to its reliance on internal packages.
          kcr Kevin Rushforth made changes -
          Priority P4 [ 4 ] P3 [ 3 ]
          Hide
          kcr Kevin Rushforth added a comment - - edited
          Approved, assuming the changes to the wild-import are done by Alexander Z along with a correctly formatted changeset commit message.

          +1
          Show
          kcr Kevin Rushforth added a comment - - edited Approved, assuming the changes to the wild-import are done by Alexander Z along with a correctly formatted changeset commit message. +1
          Show
          azvegint Alexander Zvegintsev added a comment - http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/75f70aa755e1
          azvegint Alexander Zvegintsev made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          anyssen Alexander Nyssen made changes -
          Link This issue duplicates JDK-8088262 [ JDK-8088262 ]
          pmangal Priyanka Mangal made changes -
          Labels dcsroy nicetohave webbug dcsroy nicetohave reproducer-other webbug

            People

            • Assignee:
              azvegint Alexander Zvegintsev
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: