Skip to content
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

Add mouse_move event support #138

Closed
wants to merge 4 commits into from
Closed

Add mouse_move event support #138

wants to merge 4 commits into from

Conversation

znepb
Copy link

@znepb znepb commented May 5, 2020

This completes the second to do task in this pull request. For more information on this topic, please view that PR.

Todo

  • Add TROR render support
  • Add throttling
  • Make JFX work with throttling

@dmarcuse
Copy link
Member

dmarcuse commented May 6, 2020

What happens when the window loses focus (e.g. with alt-tab)?

JFX currently does not work, because I can't figure out how to get a configuration option from the renderer script.
@znepb
Copy link
Author

znepb commented May 6, 2020

What happens when the window loses focus (e.g. with alt-tab)?

When focus is lost, a mouse_move event is sent, with no parameters (nil nil). This is the same way it functions currently in Lemmmy's pull request.
As with alt-tab, it seems as right no events are sent.

*/
public void move(int x, int y) {
if (inTerminal(x, y)) {
queueEvent("mouse_move", new Object[] { x, y });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's the button arg?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mouse_move doesn’t need a button arg?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the button argument, it's always 1.

@Lemmmy
Copy link
Contributor

Lemmmy commented May 6, 2020

This is the same way it functions currently in Lemmmy's pull request.

I don't think it does. This looks completely different. The mouse move throttle is in ticks, not milliseconds. It uses a monotonic clock and not System.currentTimeMillis. It passes a button arg to remain consistent with the other mouse_ events. Did you even read the code at all?

@SquidDev
Copy link
Member

SquidDev commented Jul 3, 2020

See my comments in cc-tweaked/CC-Tweaked#433.

@SquidDev SquidDev closed this Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants