Skip to content

When Servo isn't the window directly in front, scroll is stuck in previously scrolled layer #14290

Closed
servo/glutin
#109

Description

@gterzian

On Mac, I've noticed that, when Servo isn't the window 'in front', then even though you can still scroll Servo because it's still viewable, it is always the same 'layer' (in the sense of the Webrender layer) that scrolls, even if you move the cursor onto a different part of the page.

So for example taking https://output.jsbin.com/lukiye, if you start by scrolling the main page, then move Servo to the back (for example take the terminal in front of it), while still showing Servo. You can still scroll the main page, however when you move your cursor onto the div in the middle of it, trying to scroll it will just scroll the page, not the child div. Same thing if you start by first scrolling the child div.

In other words, the scrolling is 'stuck' in the layer that you happened to be scrolling the last time that Servo was still 'in front'.

I've checked, and when Servo is no longer 'in front', the scroll in webrender always receives the same 'cursor', even when you actually move your cursor around...

I've also noticed that when Servo isn't in front on start-up, you cannot scroll at all.

Activity

  1. jdm commented on Nov 20, 2016

    @jdm
    Member

    This is presumably because when the window isn't active, it doesn't receive mouse movement events, so any scroll events received would use the old mouse position to choose which layer. I wonder why it receives scroll events, though?

  2. paulrouget commented on Nov 21, 2016

    @paulrouget
    Contributor

    This is an issue we encountered before with unfocused windows.

    We should do what we did for MouseInput servo/glutin#97 but for MouseWheel.

  3. gterzian commented on Nov 21, 2016

    @gterzian
    MemberAuthor

    @paulrouget thanks! I'll look into it in the coming weeks...

  4. gterzian commented on Dec 31, 2016

    @gterzian
    MemberAuthor

    @paulrouget there are a couple of PR's for this, see above. Since you reviewed the MouseInput changes at the time, perhaps you want to review this also?

  5. added a commit that references this issue on Jan 22, 2017
  6. reopened this on Jan 22, 2017
  7. added a commit that references this issue on Feb 1, 2017
    8b9dc93
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions