Skip to content

mouse scroll makes main component focused #1362

Closed

Description

@alexandre-janniaux
  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: Archlinux
  • scrcpy version: 12.1
  • installation method: archlinux package
  • device model: Mi A1
  • Android version: 9

Describe the bug

When scrolling with the mouse, if no element is focused, the main element gets focused, preventing scrolling to the end and coloring the whole UI with focus color. It does work correctly with drag scrolling or arrow, and works correctly if an element is already focused.

See attached screenshot:

scrn-2020-05-07-10-53-04

Activity

  1. added a commit that references this issue on May 7, 2020
    e2d5f0e
  2. rom1v commented on May 7, 2020

    @rom1v
    Collaborator

    Thank you for the report! 👍

    Fixed by e2d5f0e.

  3. inxomnyaa commented on May 27, 2020

    @inxomnyaa

    This was heavily occurring on Reddit, many thanks for the patch!

  4. metayan commented on Sep 3, 2022

    @metayan

    The focus behavior is still (or maybe again) present. (Both before and after the recent fractional scroll changes.)

    When holding mouse button and dragging, input is "touch", and it behaves correctly.
    Using touchpad or mouse scroll wheel, input is "scroll".
    Whenever input is "scroll", at first one item is selected, but after a few positions all the items in the current area are selected.
    Scrolling with keyboard behaves fine, selecting one item at a time, both upwards and downwards.
    Tested on a Mac.

  5. rom1v commented on Sep 3, 2022

    @rom1v
    Collaborator

    Is the behavior similar with HID mouse/keyboard (scrcpy -KM)?

  6. metayan commented on Sep 3, 2022

    @metayan

    Yes, quite similar. All the items get focused, but additionally the item under the mouse pointer is highlighted.

    (Also, one has to click in the scrcpy window once after switching to it from another application. But that's probably a different issue.)
    EDIT: Disregard the parenthesis, I see now how it works - with the command key grabbing and releasing the cursor. First time using this mode...

  7. rom1v commented on Sep 3, 2022

    @rom1v
    Collaborator

    Yes, quite similar. All the items get focused

    Then the behavior comes from the Android app or system. HID mouse is expected to behave the same way as a real mouse plugged via OTG or bluetooth (you can try a real mouse).

  8. metayan commented on Sep 3, 2022

    @metayan

    Ha. Indeed. Same with mouse via OTG.
    Thanks for the lesson and patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions