CYGWIN 1.5.17(0.129/4/2) or higher CYGWIN CYGWIN_NT-5.1 CYGWIN 2005-05-25 19:38 September 29, 2005 Fixed in this release: fixed a compile errors when the debug flags were activated Removed Detailed Documentation that was mistakenly release in august backend now reads and writes correctly to the defaults db New Features: Fully impliment window style mapping to allow for native win32 look. The Main menu still looks like the standard GNUstep menu sence it is unique to Gnustep. All other window look and act like win32 windows GSUseWMTaskbar is now working correctly, and I have also added another defaults flag called GSUseWMStyles which tells cygwin what style of windows it should use. There is now a small configure panel which can be accessed in the app menu under info -> server Preferneces. This will allow you to select win32 style windows, Gnustep style window, or a combination of each if you like. All of the notification related code has been moved to w32_notifications.m inorder to keep it in one place for managability. Future release: complete context menu handling More robust window registration under win32. Parent - child window mapping down to the win32 level. This should give access to more events and improve server to server communication, and hopfully get a step closer to native evwent handling. display of custom app icons on the taskbar. Rect tracing when resizing windows log file manager; this is allready in progress but not ready for release integration with GSWorkspace re impliment keyboard events so that cut copy past and other key equivilents work PLEASE try it out and send FEEDBACK Tom MacSween macsweent@sympatico.ca August 22, 2005 Project OverView: I started this to simply fix the display of toolbars under cygwin... Well I wound up doing a whole lot more: Fixed in this release view resizing issues related to toolbars and minimizing of windows application hiding - main menu has a taskbar icon everything else hides Menu positioning bug - on activate after a hide - menu now does what it should App windows - now have a named taskbar icon window styles mapping - completed but not implimented; A future release will support native win32 decorations. tear off Menus - now have a close button and an icon on the taskbar Context Menu - working much better not fully completed but very usable notifications - backend now receives key notifications from the App that it is displaying. see details view for more info. structure - backend is more managable with event type catagories. It will also support subclassing more easily. Positioned for a native backend implimentation (future) Other window evwnts not currently managed are stubbed and ready for a future release debugging - with the right defines the backend will produce rich and readable log files. See detail in the details view details view: Styles are mapped between the two systems note that this release does not utilize them but I have left them here for a future release. I have also removed the check for useWMTaskBar in this release. behavior is native win32 - at this point I do not have gworkspace running under cygwin so it is not relivant. I do not use the handlesWindowDecorations in my code but it is still set for use by the original code. I have not changed current inplimentation of mouse or keyboard events. The WM_SETTEXT is removed from the event loop. win32 will handle this nicely for us. It will give us nice taskbar icons with window titles! Window events are not posted - window events are either handled directly by the server or are sent directly to the window that they were called on using: [EVENT_WINDOW(hwnd) sendEvent:anEvent] This fixes any issues with view related display problems... like toolbars for example. Mouse and Keyboard events are posted and qued as usual. New debug features: controls are found in w32_config.h #define _logging use to log messages to NSDebuglog define any of these at compile time or uncomment them in the w32_config.h and get a bucket to catch stdout! note: do not divert the out put from these next defines to NSDebuglog there is so much data that it will clog the works. I also do not recommend these be used unless you are debugging the back end #define __W32_debug__ activate the debug code in the main event server output is to standard out only #define __W32_debug_Event_loop special flag for event loops and counts all posted events are displayed in the log file. __W32_debug__ must be defined for this to work output is to standard out only #define __STATE (YES or NO) when set to yes, events that are not currently implimented but monitered in the event loop will be included in the log output __W32_debug__ must be defined for this to work output is to standard out only Event_format.sed pipe the output through sed with this file and it will clean up the output and make it more reader friendly. Notifications: The backend now has better communication between it and the application. A display server needs to know what the app is doing in order to manage the task of displaying windows for it. To that end the backend is registerd for the following notifications: NSApplicationWillHideNotification Catch the hide event and set flags so that the backend will defer to the native server (winxp NT or 9x) and allow the App to hide. NSApplicationWillFinishLaunching registered but not utilized at this point (planned future development) NSApplicationDidFinishLaunching Catch the main menu and finalize its setup for use in the win32 environment. I have used some native win32 code here to accomplish this task. In future other tasks could also be carried out here. NSWindowWillMiniaturizeNotification Basically this is done for the same reason as catching the hide. Set flags so that the backend will defer to the native server (winxp NT or 9x) and allow the window to miniturize without disturbing the views that it contains. The next two Notifications are custom and unique to the win32 server and are implimented to manage specific menu events. I have overriden two internal NSMenu methods so that the notifications get sent. See notes on overrides. NSMenuWillTearOff Set the win32 style on the menu window so that it will display an icon on the taskbar with a title. A tear of menu will always have a title that looks like: 'MENU submenu title' this makes it easy to find a tear off menu that could be hidden under any number of other windows. NSMenuwillPopUP This allows the backend to setup and manage the behavior of a context menu in the win32 environment. This is not fully implimented but the behavior of the context menu is greatly improved. More work will be done on this in s future release. Note: when debug is active (#define __W32_debug__) the server will register for all NSWindow notifications and some NSView notifications. Helps to show where appevents and server events are happening relitive to each other. these are all dumpted to a formatter for display in the log output. Overrides of key methods: In order the get the behavior I wanted the following methods from NSMenu have been overriden: - (void) _rightMouseDisplay: (NSEvent*)theEvent; Modified by override to send NSMenuwillPopUP notification to the server. - (void) setTornOff: (BOOL)flag; Modified by override to send NSMenuWillTearOff notification to the server code Organization: The code has been restructured to allow for more flexibility, managability and future development. The main event code is organized as catagories of WIN32Server in the following files: w32_config.h: manage all of the defines need to control the debug output w32_debug.m: all of the main debug log generation is done here GSDisplayServer_details.m: (special catagory for debug hooks) WIN32Server.m: main entry point for event handling w32_Events.h: declarations of catagories and methods implimented in the follow files (see the code for more details) w32_activate.m w32_create.m w32_debug.m w32_general.m w32_movesize.m w32_text_focus.m w32_windowdisplay.m