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

tigervnc cursor "cropped" with gnome #1863

Open
ozbenh opened this issue Nov 4, 2024 · 9 comments
Open

tigervnc cursor "cropped" with gnome #1863

ozbenh opened this issue Nov 4, 2024 · 9 comments

Comments

@ozbenh
Copy link

ozbenh commented Nov 4, 2024

You can reproduce this with Fedora 41. Run the Xvnc server with a gnome session in it, connect with tigervnc client,
and the mouse cursor is often "Cropped" vertically. It depends on the cursor, but for example the "I" cursor used when hovering above text tends to only show the top half.

I did a bunch of printf'ing around the server. It appears that the bitmap (RGBA mode) is fine all the way. Here's an example

 DisplayCursor: NON-NULL w=24 h=24 ARGB=0x55cacbc0f830

 vncext:      vncSetCursorSprite(w=24 h=24)
 XserverDesktop: setCursor(w=24 h=24)
 XserverDesktop: 
 Cursor:      CROP 24/24 hs=11/12
 Cursor:       before -> tl.x=11 tl.y=12 br.x=12 br.y=13
 Cursor:        after-> tl.x=4 tl.y=1 br.x=17 br.y=24
 Cursor:      Cursor crop 13/23
 VNCSConnST:  CNX setCursor()
 VNCSConnST:  CNX client setting cursor
 SMsgWriter:  calling writeSetCursorWithAlphaRect
 SMsgWriter:  Cursor write 13/23
 SMsgWriter:  00010203030202020303020100
 SMsgWriter:  0107fffffcd776d8fcffff0701
 SMsgWriter:  0216fffffffffaffffffff1602
 SMsgWriter:  031afffffdfafffafdffff1a03
 SMsgWriter:  0216485969fdfffd6959481602
 SMsgWriter:  0107161e32ffffff321e160701
 SMsgWriter:  000102071fffffff1f07020100
 SMsgWriter:  000000031cffffff1c03000000
 SMsgWriter:  000000031bffffff1b03000000
 SMsgWriter:  000000031bffffff1b03000000
 SMsgWriter:  000000031bffffff1b03000000
 SMsgWriter:  000000031bffffff1b03000000
 SMsgWriter:  000000031bffffff1b03000000
 SMsgWriter:  000000031bffffff1b03000000
 SMsgWriter:  000000031bffffff1b03000000
 SMsgWriter:  000000031bffffff1b03000000
 SMsgWriter:  000000031cffffff1c03000000
 SMsgWriter:  000102072cfdfffd2c07020100
 SMsgWriter:  0107fffffdfafffafdffff0701
 SMsgWriter:  0216fffffffffbffffffff1602
 SMsgWriter:  031afffffde4a5e5fdffff1a03
 SMsgWriter:  02164858564a3f4a5658481602
 SMsgWriter:  0107161a19161216191a160701

This displays the alpha channel.

However, what's ... surprising, is that if I disable cropping by commenting out this line:

void Cursor::crop()
{
  Rect busy = Rect(0, 0, width_, height_);
  //busy = busy.intersect(Rect(hotspot_.x, hotspot_.y,
  //                          hotspot_.x+1, hotspot_.y+1));

then the cursor on the client is complete.

I haven't yet had a chance to try to debug the situation client-side. I'm open to advice, otherwise I'll spend time later and update this issue.

@ozbenh
Copy link
Author

ozbenh commented Nov 4, 2024

Update: it works fine if I use vncviewer unmodified on Fedora 41, in the above failing case, the client was running Ubuntu 24.04. It's starting to look like an fltk problem

@CendioOssman
Copy link
Member

Are you saying you are only seeing this with the TigerVNC vncviewer on Ubuntu 24.04?

Is that the vncviewer included in Ubuntu?

Do other viewers work on that same Ubuntu machine?

@CendioOssman
Copy link
Member

No response. Closing.

@CendioOssman CendioOssman closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2024
@ozbenh
Copy link
Author

ozbenh commented Dec 9, 2024

Ouch, I didn't see your reply (I think the github notification got spam filtered). I'll try to do more testing.

@ozbenh
Copy link
Author

ozbenh commented Dec 9, 2024

I can see the problem with vinagre, remmina but not xtightvncviewer interestingly

@ozbenh
Copy link
Author

ozbenh commented Dec 9, 2024

I re-did the tests. With a Fedora 41 client, either X11 or Wayland gnome env, it works fine. With Ubuntu 24.04 LTS (X11) I see the problem with the above clients. Same server in all cases.

@CendioOssman
Copy link
Member

Is the TigerVNC client installed from Ubuntu's repositories? Could you try the version from our release page? So we can rule out any build issues.

@CendioOssman CendioOssman reopened this Dec 9, 2024
@ozbenh
Copy link
Author

ozbenh commented Dec 16, 2024

I'll give that a spin tomorrow

@ozbenh
Copy link
Author

ozbenh commented Dec 17, 2024

Same problem, the cursors are cut off using your client. I will try to spend some time during the next few days (or the holidays) to track this down further client-side, maybe through fltk.. it could be something in one of the underlying X libs...

I built vncviewer from source and I can reproduce the problem. I can see the cursor image being intact in readSetCursorWithAlpha(), I'll try to follow things from there (gdb is a PITA in Ubuntu, I can't seem to source debug into libraries coming from .deb packages easily, I'll need to spend more time on this)

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

No branches or pull requests

2 participants