-
Notifications
You must be signed in to change notification settings - Fork 964
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 vncviewer option to use large cursor instead of dot #1491
base: master
Are you sure you want to change the base?
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.
I'm afraid this is pending more details on #1483. I don't want to add more clutter to the options without a good understanding of why that's the only way forward.
Okay, that's fair. I'll leave this PR open for when we (hopefully) get more info from the requester. |
It doesn't seem like any real progress is being made on #1483, but the issue seems to be better support for VNC servers without fancy cursor handling. With that in mind, we can probably look at progressing here. Are you still interested in working on this, @krystof1119? |
It depends on the scope of the project. If all we're talking about is adding an option to change the local cursor displayed, I could probably build on what I had made previously, but I don't have much experience with the VNC protocol itself, so if the changes were more involved than that, I might have to see whether or not it's beyond me. |
No protocol changes, @krystof1119. Just better client-side options. |
Okay, I'll try and get a bit of work done on this - probably not going to have time this week, but I should be able to look at this after. |
It took me longer than I thought to get around to this, but I've got an implementation done in a different branch to the one in this PR (multipleCursorTypes). A few notes:
I can force-push the changes onto the branch associated with this PR after someone reviews the code, I just didn't want to do it before. |
It's difficult to review it if it's not here in the PR. Please do a force push and we can have a look at the details. |
a1d1356
to
612e5a5
Compare
Okay, I've force pushed my code to this branch. I've also made one minor change to make the CI checks pass (I had used a NULL somewhere a nullptr is now expected). |
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.
Sorry for the late reply. I've been away for a few week.s
Looks really promising! Just a few tweaks needed.
612e5a5
to
a513bd5
Compare
I've made the requested changes, including changes to the equivalent parts of the Java version. |
a513bd5
to
b54c0c7
Compare
The previous version did not work correctly with the system cursor enabled after the VNC client lost and regained focus, this fixes it (my bad for pushing without testing that). |
5b00c24
to
f4e0425
Compare
This adds the option to select which cursor should be used in the event the server sends an invisible cursor. It also renames the DotWhenNoCursor config option to AlwaysCursor.
f4e0425
to
1b68aa7
Compare
Sorry about the multiple separate force pushes, I noticed some of your comments too late. I was hoping to avoid calling strcasecmp every time the cursor changes, but I imagine it's not going to be noticeable performance-wise. Changing the cursor type while the Java VNC viewer is running is still not working entirely correctly, but I don't think that's solvable without more extensive changes (and it seems like it wasn't working perfectly before, so at least it's not a regression). I also decided to change the fallback cursor type to "Dot" in the options dialog rather than changing it to "System" here, since that was the previous behavior. |
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.
Looks good to me. Nice work!
@bphinz, are you happy with the Java version?
JLabel cursorTypeLabel = new JLabel("Cursor type:"); | ||
String[] cursorTypes = {"Dot", "System"}; | ||
cursorTypeChoice = new MyJComboBox(cursorTypes); | ||
cursorTypeChoice.setEditable(true); |
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.
Why is this editable? Doing so allows for an arbitrary string to entered but then subsequently only checks for "Dot" or "System".
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.
Because I got setEditable confused with setEnabled and didn't notice the difference in behavior when testing. I've corrected it now.
Replicates the C++ work done in the previous commit on the Java version.
1b68aa7
to
7f44ab9
Compare
This PR adds a large cursor bitmap to both versions of vncviewer
(Java and native) which can be used instead of the previously used dot
cursor, as well as the options and parameters to be able to enable or
disable its use at runtime.
Resolves #1483