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

alt/ctrl key state gets stuck when alt-tabbing (Windows) or ctrl-arrowing (Mac OS) between desktops #94

Closed
nurpax opened this Issue Aug 18, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@nurpax
Owner

nurpax commented Aug 18, 2018

What the title says.

Found by @supermuumi

@nurpax nurpax added this to the 0.4 milestone Aug 18, 2018

@nurpax nurpax closed this in 007271b Aug 18, 2018

@nurpax nurpax reopened this Aug 18, 2018

@nurpax

This comment has been minimized.

Show comment
Hide comment
@nurpax

nurpax Aug 18, 2018

Owner

still buggy on Windows. after alt-tabbing out of the window and clicking the canvas to regain focus, the first click is with the alt key down which selects a char code. on an empty canvas it chooses an empty char after which painting uses the space char. this is confusing.

maybe better to clear modifier key state on mainwindow blur instead of focus. also not sure how regaining focus should work. should petmate eat up all click&key events until the app is in focus? (so that clicking canvas wouldn’t paint when clicking from blurred state to focused)

Owner

nurpax commented Aug 18, 2018

still buggy on Windows. after alt-tabbing out of the window and clicking the canvas to regain focus, the first click is with the alt key down which selects a char code. on an empty canvas it chooses an empty char after which painting uses the space char. this is confusing.

maybe better to clear modifier key state on mainwindow blur instead of focus. also not sure how regaining focus should work. should petmate eat up all click&key events until the app is in focus? (so that clicking canvas wouldn’t paint when clicking from blurred state to focused)

nurpax added a commit that referenced this issue Aug 18, 2018

Reset modifiers on blur instead of focus (#94)
onfocus didn't work for the case when you alt-tab and then click the
app to gain focus.  In that case, the alt key was still down and the
first click got detected as an alt-left-click event which then used
the alt-left-click code to pick a character under cursor.

@nurpax nurpax closed this Aug 20, 2018

@nurpax nurpax added the bug label Aug 27, 2018

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