xlib questions

xlib questions

Erez D erez0001 at gmail.com
Tue Jan 26 15:03:24 IST 2010


On Tue, Jan 26, 2010 at 2:57 PM, ik <idokan at gmail.com> wrote:

>
>
>
> 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 ?
>
nope, i have a program (which i didn't write or have access to the sources)
which just defined a new cursor which has not been displayed yet.
i have the cursor XID (i intercepted it's XDefineCursor call) and i need
it's picture

You know what is the handle of the mouse cursor right ?
>
yes

>
> Now tranlsate the mouse cursor handle to it's image.
>
how ? this is the question I asked to start with.

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/6d9342b4/attachment-0001.html>


More information about the Linux-il mailing list