On Mon, Apr 22, 2002, Ilya Konstantinov wrote about "Re: X server crashes": > On Mon, 2002-04-22 at 14:55, Alexander Maryanovsky wrote: > Alexander does have a point here. Of course, there are certain things > which can be kept on server only (e.g. server-side stored pixmaps), but > we can easily work around those issues, especially with modern toolkits > which abstract drawing and usually keep the state of their widgets and > drawing boards in memory anyway. > > So, all in all, this is not technically infeasible (i.e. X11 is not the > showstopper) -- it just that nobody went ahead and coded it yet.
Doing this is harder than might first appear, and indeed I don't know of any program (or widget set or Xlib wrapper) that knows how to do this. One problem you mention is server-cached objects like pixmaps, graphics contexts, fonts, and things like that. When the server connection is lost and a new one is gained, you'll need to send these things to the new server again, so you'll need to remember which such objects your program has (a good library like Qt/Gtk/Xt/Tk probably already keeps track of these things). Another problem is server information: when you attach to a new server, the new server might have a different resolution, different depth or different colormap, different selection of fonts, different extensions, and so on, than the old server, and your program should somehow handle this change gracefully. Imagine your divx viewing program suddenly "reappearing" in the middle of its lifetime, on a monochrome display without the (say) SHM extension, and without the "fancy-shmancy-font-*-*-*-10" it used to display with. Yet another problem is recreating all the client's resources, and mainly windows (and other stuff like atoms). After the connection breakup, all your widget now point to invalid window identifiers - and when the connection is restarted the entire window heirarchy should be recreated and the new identifiers assigned remembered by the widgets. The client doesn't always know all the information about its windows (e.g., where the window manager moved them, extra atoms the window manager put in its window, such as CTWM's atom that determines the "room" on the virtual desktop the window is in, etc.) so if it cares about these things it will need to catch such events (geometry notify, property notify, etc.). When recreating the window heirarchy, different server features (e.g., different resolution, different fonts) might mean that the windows should be resized at this time. Doable, but certainly quite complicated. -- Nadav Har'El | Monday, Apr 22 2002, 11 Iyyar 5762 [EMAIL PROTECTED] |----------------------------------------- Phone: +972-53-245868, ICQ 13349191 |When everything's coming your way, you're http://nadav.harel.org.il |in the wrong lane. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
