Does libX11 use shared memory between several clients?



Hi,

Currently I am looking at libX11's source code, I am curios many
libX11 doesn't send the message to the server but only modify some
structure in the local memory, such as:

void
_XRegisterFilterByType(
    Display *display,
    Window window,
    int start_type,
    int end_type,
    Bool (*filter)(
                   Display*, Window, XEvent*, XPointer
                   ),
    XPointer client_data)
{
    XFilterEventRec             *rec;

    rec = (XFilterEventList)Xmalloc(sizeof(XFilterEventRec));
    if (!rec)
        return;
    rec->window = window;
    rec->event_mask = 0;
    rec->start_type = start_type;
    rec->end_type = end_type;
    rec->filter = filter;
    rec->client_data = client_data;
    LockDisplay(display);
    rec->next = display->im_filters;
    display->im_filters = rec;
    display->free_funcs->im_filters = _XFreeIMFilters;
    UnlockDisplay(display);
}

I can't see any code to transfer modified "display" structure to the
server, this API is invoked by a XIM server so obviously the register
stuff need to be accessed by other process, is there any shared memory
trick in libX11?

Thanks.
Bin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]