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

I can't reliably set cursor for RSTA #411

Open
dzmipt opened this issue Nov 16, 2021 · 2 comments
Open

I can't reliably set cursor for RSTA #411

dzmipt opened this issue Nov 16, 2021 · 2 comments
Assignees
Labels

Comments

@dzmipt
Copy link
Contributor

dzmipt commented Nov 16, 2021

I change cursor for the component RSTA.setCursor(myCursor). However this would be overwritten with user CTRL + mouse move (a user wanted to click something while he/she was moving mouse).

I suspect the issue is around RSyntaxTextArea.mouseMove (line 3499).

Unless there is already solution, I believe we need a fix. What if we override setCursor, remember the cursor and replace
c2 = Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)
in the mouseMove with
c2 = savedCursorInSetCursorMethod

@dzmipt dzmipt changed the title I can't reliable set cursor for RSTA I can't reliably set cursor for RSTA Nov 16, 2021
@dzmipt
Copy link
Contributor Author

dzmipt commented Nov 21, 2021

I found a workaround for me which works perfectly in my case textArea.setHyperlinksEnabled(false)

dzmipt added a commit to dzmipt/kdbStudio that referenced this issue Nov 21, 2021
Busy cursor during query execution will not disappear with CTRL + mouse move
@bobbylight bobbylight self-assigned this Dec 2, 2021
@bobbylight bobbylight added the bug label Dec 2, 2021
@bobbylight
Copy link
Owner

Your suggestion seems like a good idea, but I tested it out and it results in some glitchy back-and-forth cursor changing between the "editable text' cursor and the default arrow/pointer cursor when testing with a text area with setEditable(false) set (which is another easy way to reproduce this issue of lost primary cursor). Might need a slightly more sophisticated fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants