Re: Does libX11 use shared memory between several clients?
On Jan 29, 2008 5:35 AM, Bin Chen [EMAIL PROTECTED] wrote: [...] 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? Yes, but this is not one of those tricks I would think. When connecting to the X server, XOpenDisplay establishes a connection and returns a locally allocated Display structure to be used for all your api calls. All commands to the X server are sent and queued so to speak on the display. I dont know much about the guts of XIM but it looks like _XRegisterFilterByType doesnt need to tell the server anything... only needs to tell Xlib locally how to handle input when it comes from the X server. Cheers, -Tristan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Does libX11 use shared memory between several clients?
Bin Chen wrote: 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: This is the gtk-app-devel list, not the place where you'd discuss libX11 issues! You'll have more luck asking in [EMAIL PROTECTED] tom ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
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 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list