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

Scrolling on a touch enabled display fails on Wayland

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • jfx23
    • jfx21
    • javafx
    • None

      When running a JavaFX application (like the attached one) with just a pannable ScrollPane on an embedded device (Linux-aarch64) with a touch enabled display, users can scroll the content just by dragging their finger on the touch screen. This works fine on X11, but fails on Wayland:

      With X11, after MOUSE_PRESSED, MOUSE_DRAGGED events are fired repeatedly while the user moves their finger on the screen, and scrolling works as expected:

      Event: MOUSE_PRESSED
      Event: MOUSE_DRAGGED
      Event: MOUSE_DRAGGED
      ...
      Event: MOUSE_DRAGGED
      Event: MOUSE_RELEASED

      With Wayland, however, after MOUSE_PRESSED, dragging starts, there is one MOUSE_DRAGGED event, and the view shifts slightly, but immediately stops scrolling and a MOUSE_RELEASED event is fired, even with the finger still pressing the display:

      Event: MOUSE_PRESSED
      Event: MOUSE_DRAGGED
      Event: MOUSE_RELEASED

      Running with GDK_DEBUG=events shows:

      Gdk-Message: 09:56:07.169: touch begin: window 4194306
      touch id: 18
      pointer emulating: true
      Event: MOUSE_PRESSED
      Gdk-Message: 09:56:07.216: touch update: window 4194306
      touch id: 18
      pointer emulating: true
      Gdk-Message: 09:56:07.327: touch update: window 4194306
      touch id: 18
      pointer emulating: true
      Gdk-Message: 09:56:07.329: touch update: window 4194306
      touch id: 18
      pointer emulating: true
      ...
      Gdk-Message: 09:56:07.339: touch update: window 4194306
      touch id: 18
      pointer emulating: true
      Event: MOUSE_DRAGGED
      Gdk-Message: 09:56:07.363: touch end: window 4194306
      touch id: 18
      pointer emulating: true
      Event: MOUSE_RELEASED

      And running with GDK_DEBUG=nograbs "fixes" the issue, and scrolling works fine on Wayland as well.

            jpereda Jose Pereda
            jpereda Jose Pereda
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: