-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support scrolling popup contents using mouse #10053
Support scrolling popup contents using mouse #10053
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think storing arena in the popup drung rendering is a bit hacky. I think that should be stored in a more centralized manner (I think the compositor probably needs a bit of a rework anyway) but it's ok as a stopgap
* Extract popup scrolling code into named functions * Scroll popup contents on mouse scroll event * Ignore mouse events outside the popup * Remove unneeded return statement
* Extract popup scrolling code into named functions * Scroll popup contents on mouse scroll event * Ignore mouse events outside the popup * Remove unneeded return statement
* Extract popup scrolling code into named functions * Scroll popup contents on mouse scroll event * Ignore mouse events outside the popup * Remove unneeded return statement
* Extract popup scrolling code into named functions * Scroll popup contents on mouse scroll event * Ignore mouse events outside the popup * Remove unneeded return statement
* Extract popup scrolling code into named functions * Scroll popup contents on mouse scroll event * Ignore mouse events outside the popup * Remove unneeded return statement
* Extract popup scrolling code into named functions * Scroll popup contents on mouse scroll event * Ignore mouse events outside the popup * Remove unneeded return statement
* Extract popup scrolling code into named functions * Scroll popup contents on mouse scroll event * Ignore mouse events outside the popup * Remove unneeded return statement
* Extract popup scrolling code into named functions * Scroll popup contents on mouse scroll event * Ignore mouse events outside the popup * Remove unneeded return statement
Hey, long time no see :) This PR adds support for scrolling through the popup with the mouse as an alternative to the already existing
C-d
andC-u
bindings. Scrolling is only done ifhas_scrollbar
istrue
.For ignoring mouse events that fall outside the frame of the popup, the rendering area
Rect
of the popup is stored in the struct. This feels hacky but I couldn't think of any other way to retrieve the area insidehandle_event()
.The PR has been organized into commits that can be easily reviewed. Some commits are only concerned with moving code around with no new functionality introduced.