gnustep-dev
[Top][All Lists]
Advanced

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

Display server and window interaction


From: Fred Kiefer
Subject: Display server and window interaction
Date: Thu, 11 Apr 2002 23:00:32 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:0.9.4) Gecko/20011019 Netscape6/6.2

With the new split of the back end functionality a new class GSDisplayServer was introduced. As we may in principle have a lot of those, we must find the correct one for a given window, before we send it any window operation. This happens mostly in the NSWindow.m file and is an operation that need an extra mapping table and gives us the overhead of two function calls and one method call. The later could be optimized away if we directly supplied the window number to the GSServerForWindow() function. But I want to question the existence of this function at all. Would it not be better to store the responsible server as an ivar in the window, and access it from there? This could be set in the _initBackendWindow method. To access and maybe change the server we could add to methods to NSWindow, but currently the only use for this could be the clean up in NSApplication.

For most operation that involve the Display Server we can be sure that the server ivar is already set otherwise the window number would also not be available. The remaining place where GSServerForWindow might be called without the ivar being set, involve the dragging, which is a not that common operation. So we could changed these to use the new method [NSWindow displayServer] that would return the default server, if none was setup.

Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]