![]() ![]() Each time you use Xlib's XDefineCursor() or XChangeWindowAttributes(), the window obtains a reference to the cursor and increases the refcnt. When you create a cursor, it will have a refcnt of 1 (the client has a reference to it after all). ![]() ![]() a pointer uses the cursor as part of a grab.The refcnt is used to track how many instances of the cursor are used and to avoid freeing memory too early. The CursorRec contains a number of things, we will focus on the refcnt here. The matching Xlib functions would be XCreateCursor() and XCreateGlyphCursor(). Two functions are responsible for allocating cursors: AllocCursorARGB() and AllocGlyphCursor(). Generally, a CursorRec gets allocated only once and used multiple times to save memory. This is documentation about the cursor handling, not about the cursor rendering! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |