! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[patch] capture the visible cursor through XFIXES when possible
Status:
RESOLVED: FIXED
Product:
Xfce4-screenshooter
Component:
General

Comments

Description Guido Berhoerster 2011-05-03 14:06:14 CEST
Created attachment 3651 
capture the visible cursor through XFIXES when possible

Currently the cursor image is hardcoded to GDK_LEFT_PTR and may not reflect the visible cursor. The XFIXES extension provides a method to actually capture the currently visible cursor image (see GetCursorImage in http://cgit.freedesktop.org/xorg/proto/fixesproto/plain/fixesproto.txt). The attached patch optionally makes use of the XFIXES GetCursorImage method to obtain the cursor image and gracefully falls back to the previous method if XFIXES support was not present in Xlib or explicitly disabled at compile time or if it is not supported by the X server.
Comment 1 Jérôme Guelfucci editbugs 2011-05-10 10:00:57 CEST
Hello,

The patch looks fine, thanks a lot! I have an issue with this though, the mouse cursor shape is correct but it's always white (I'll attach a screenshot to show that). Is this an XFIXES limitation or a bug in the code?

I tried this using different icon themes and can always reproduce.

Cheers,

Jérôme
Comment 2 Guido Berhoerster 2011-05-10 20:07:48 CEST
Created attachment 3663 
capture the visible cursor through XFIXES when possible

(In reply to comment #1)
> The patch looks fine, thanks a lot! I have an issue with this though, the mouse
> cursor shape is correct but it's always white (I'll attach a screenshot to show
> that). Is this an XFIXES limitation or a bug in the code?

That's a bug and I didn't notice it myself since I didn't test on my amd64 box. I actually put a comment in the code about the Xlib stupidity of storing 32-Bit ARGB data in longs and then forgot to truncate them, d'uh. Please try the new patch.
Comment 3 Jérôme Guelfucci editbugs 2011-05-11 01:21:09 CEST
Thanks works fine now. I pushed this to git master branch, expect a release with this before the end of the month! This is a nice improvement, I already had several users complaining about the cursor aspect.

Cheers,

Jérôme

Bug #7567

Reported by:
Guido Berhoerster
Reported on: 2011-05-03
Last modified on: 2011-05-11

People

Assignee:
Jérôme Guelfucci
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information