2006-11-28 Chris Toshok * X11Hwnd.cs, XplatUIX11-new.cs: remove spew, and ^M's. 2006-11-28 Rolf Bjarne Kvinge * XplatUIX11-new.cs: * X11Hwnd.cs: - Added RequestAdditionalWM_NCMessages for windows to opt in for WM_NCMOUSELEAVE and WM_NCMOUSEHOVER. 2006-11-28 Chris Toshok * X11Display.cs (XEventThread): move to a polling strategy again, since XNextEvent locks the display - without this, nothing can happen with any toplevel X call until there's an event. So we poll on the XConnectionNumber, then consume all available events before polling again. (DispatchMessage): move this here. (SetCursor): same. (OverrideCursor): same. (RedirectMsgToEnabledAncestor): make this code work for any XEvent by removing the XEvent from the arg list. (GetMessage): pretty major overhaul. we now have a 3 loops. We loop over all the X events in the queue until there aren't any, calling AddExpose and AddConfigureNotify for Expose and Configure events respectively. Those methods end up queueing up special "events" in the thread queue's Paint and Configure queues. Once the X event loop is finished, we check to see if there are pending configure/paint events, and handle any that are present. (DoEvents): move here. * X11ThreadQueue.cs: make DequeueUnlocked only dequeue X events. if there are no x events and there *are* paint or configure events, return early. add a "configure queue" which is almost identical to the "paint queue" except for the events it generates. this needs refactoring so the code can be shared. * XplatUIX11-new.cs: move the DefWndProc to X11Hwnd. Move SetCursor, OverrideCursor, DispatchMessage and DoEvents to X11Display. * X11Hwnd.cs (Update): do all this under the queue lock.. theorize about whether or not the SendMessage (WM_PAINT) should be called from under the lock. (DefWndProc): move this here. (PendingExpose,PendingNCExpose): new properties, which should eventually be pushed into Hwnd (and made abstract?) Move all the queue manipulation here. (PaintEventStart): restrict the queue lock code a bit more. (PerformNCCalc): remove the optimization - it keeps client windows from resizing along with their parent. (SetPosition): track change Rolf made to XplatUIX11.cs on 2006-11-22. 2006-11-21 Chris Toshok * X11Hwnd.cs: the IntPtr atom change broke the Array.Sort stuff I was doing. Just remove it. * XplatUIX11-new.cs: add a message if Xlib.XInitThreads fails. * X11ThreadQueue.cs: another Date.Now -> Date.UtcNow fix. * X11RootHwnd.cs: remove the setting of Display.ActiveWindow from here. move all the logic into X11Display.SetActiveWindow. * X11Display.cs: move the logic for setting ActiveWindow here, and make ModalWindows private. 2006-11-21 Chris Toshok * Xlib.cs: remove the static keyword from the class 2006-11-21 Chris Toshok * XplatUIX11-new.cs: implement the Idle event by adding/removing it from the applicable X11ThreadQueue and remove the OnIdle method. Also, implement the new InvalidateNC method. * X11Display.cs: remove the idle dispatch code, as it can't be generated by the XEventThread. It has to be generated by the threads running the various message pumps, as it has to be invoked on that same thread. Factor out the use of Hwnd.EnabledHwnd along with the accompanying call to XTranslateCoordinates to a separate function (RedirectMsgToEnabledAncestor). Fix some NRE's accessing FocusWindow, since it's not an IntPtr anymore but a X11Hwnd. * X11ThreadQueue.cs: move the Idle dispatch stuff here. Also, correct the first arg to Idle - it's not the XplatUI, it's the Thread. * X11Hwnd.cs: numerous formatting changes, change the logic of some if statements to make things cleaner. Factor out the USER_TIME manipulation from a few places. Change all atom manipulation to use IntPtr's instead of int's the way the old XplatUIX11 stuff worked. This might help fix things for 64-bit platforms.. more work needed there. Also, add the new InvalidateNC support (basically the same as the old InvalidateWholeWindow), and remove the InvalidateWholeWindow calls. 2006-11-17 Chris Toshok * X11Hwnd.cs: port the XplatUIX11.ScrollWindow fix from 68061. 2006-11-14 Chris Toshok * X11Hwnd.cs, X11RootHwnd.cs, X11Atoms.cs, X11Display.cs, X11Exception.cs, Xlib.cs: Initial pass at refactoring the X11 backend.