2006-11-29  Chris Toshok  <toshok@ximian.com>

	* X11Hwnd.cs: implement GetWindowTransparency, and also add
	caching for WINDOW_TYPE and _NET_WM_WINDOW_OPACITY.  We invalidate
	the cache when we get a PropertyNotify on that atom.

	* X11Display.cs: return GetSet from SupportsTransparency if we
	have a compositor running.  otherwise return None.

	* XplatUIX11-new.cs: pass SupportsTransparency off onto the
	X11Display, and pass GetWindowTransparency off onto the X11Hwnd.

2006-11-29  Chris Toshok  <toshok@ximian.com>

	* X11ThreadQueue.cs (EnqueueUnlocked): add the switch motionnotify
	compression/NeedDispatchIdle assignment found in X11Hwnd here.
	(RemovePaintUnlocked): nuke
	(AddPaintUnlocked): nuke
	(AddConfigureUnlocked): rename to AddConfigure.

	Add some debug stuff to HwndEventQueue so we can see the stack
	trace of where the hwnd was added to the queue, in case we somehow
	try to add it multiple times.

	* X11Hwnd.cs (AddExpose): there's no need for this to have locks
	around it - it should only ever be called from operations on the
	hwnd's thread (from ScrollWindow, from GetMessage, from
	Invalidate).
	(AddConfigureNotify): same goes here.
	(HandleConfigureNotify): remove configure_lock reference.
	(EnqueueEvent): nuke this.
	(PaintEventStart): remove locking.
	(ScrollWindow): remove locking.
	
	also, remove all references to
	AddPaintUnlocked/RemovePaintUnlocked/AddConfigureUnlocked.  since
	we don't need to lock around them, there's not need.
	
	* X11Display.cs (XEventThread) switch from hwnd.EnqueueEvent to
	hwnd.Queue.Enqueue.

2006-11-28  Chris Toshok  <toshok@ximian.com>

	* X11ThreadQueue.cs: factor out all the commonality from
	PaintQueue/ConfigureQueue.  Add a comment about XEventQueue.  stop
	using % from the XEventQueue.  if we're going for performance,
	it's much quicker to use a multiple of 2 size for the array and
	use & for wrapping.  Also, fix XEventQueue.Grow().  it was
	reordering the queue before.

	* X11Hwnd.cs, XplatUIX11-new.cs: remove spew, and ^M's.

2006-11-28  Rolf Bjarne Kvinge <RKvinge@novell.com>
	
	* XplatUIX11-new.cs:
	* X11Hwnd.cs:
	- Added RequestAdditionalWM_NCMessages for windows to 
	  opt in for WM_NCMOUSELEAVE and WM_NCMOUSEHOVER.

2006-11-28  Chris Toshok  <toshok@ximian.com>

	* 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  <toshok@ximian.com>

	* 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  <toshok@ximian.com>

	* Xlib.cs: remove the static keyword from the class

2006-11-21  Chris Toshok  <toshok@ximian.com>

	* 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  <toshok@ximian.com>

	* X11Hwnd.cs: port the XplatUIX11.ScrollWindow fix from 68061.

2006-11-14  Chris Toshok  <toshok@ximian.com>

	* X11Hwnd.cs, X11RootHwnd.cs, X11Atoms.cs, X11Display.cs,
	X11Exception.cs, Xlib.cs: Initial pass at refactoring the X11
	backend.

