xlib questions

xlib questions

ik idokan at gmail.com
Tue Jan 26 14:57:43 IST 2010


On Tue, Jan 26, 2010 at 13:16, Erez D <erez0001 at gmail.com> wrote:

>
>
> On Tue, Jan 26, 2010 at 1:04 PM, ik <idokan at gmail.com> wrote:
>
>> 2010/1/26 Erez D <erez0001 at gmail.com>
>>
>> i need your help
>>>
>>>
>>> i am trying to grab a cursor image (i have the cursor's XID).
>>>
>>> xlib doesn't have any functions that does that.
>>> xfixes have a function that reads the cursor image, but only the current
>>> cursor
>>> and i am trying to get a cursor which i have i'ts XID.
>>>
>>> XCopyArea(display,mycursor,...)  gives me a "bad drawable" error.
>>>
>>> anyone ?
>>>
>>
>> Not a direct X answer, but rather a way to approach it.
>> Draw the cursor image you have the XID above the captured image you have
>> in the proper location for it.
>> So you will have to combine two bitmaps into one.
>>
>>
> i didn't really get wht you mean, but drawing using the cursor XID i have
> gives me a "bad drawable" error.
>

You have the image you captured of the "desktop" (rootwindow) right ?
You know what is the handle of the mouse cursor right ?

Now tranlsate the mouse cursor handle to it's image. then paint it above the
"desktop" image at X,Y and you have it.
Unless I'm completely not understanding what you wish to do.



>
>
>> Don't forget to mask the pointer prior to add it into the "background"
>> image you place it on.
>>
>>
>>
>>
>>
>>>
>>> _______________________________________________
>>> Linux-il mailing list
>>> Linux-il at cs.huji.ac.il
>>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>>
>>>
>> Ido
>> http://ik.homelinux.org/
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20100126/3c3f470e/attachment.html>


More information about the Linux-il mailing list