Author: pbartok
Date: 2006-08-27 17:22:19 -0400 (Sun, 27 Aug 2006)
New Revision: 64449
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2006-08-27 Peter Dennis Bartok <[EMAIL PROTECTED]>
* XplatUIX11.cs: PostQuitMessage is thread-specific not app-specific.
Prevent other threads from exiting when calling thread sets quit
state.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-08-27 21:04:02 UTC (rev 64448)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-08-27 21:22:19 UTC (rev 64449)
@@ -1,3 +1,8 @@
+2006-08-27 Peter Dennis Bartok <[EMAIL PROTECTED]>
+
+ * XplatUIX11.cs: PostQuitMessage is thread-specific not app-specific.
+ Prevent other threads from exiting when calling thread sets quit
state.
+
2006-08-27 Chris Toshok <[EMAIL PROTECTED]>
* AsyncMethodData.cs: add a slot for the window handle.
@@ -9,14 +14,14 @@
the AsyncMethodData.
-2006-08-23 Peter Dennis Bartok <[EMAIL PROTECTED]>
+2006-08-27 Peter Dennis Bartok <[EMAIL PROTECTED]>
* XplatUIX11.cs:
- PostQuitMessage: Removed resetting S.D display handle, we might have
another loop started after calling PostQuitMessage (Fixes #79119)
- Created destructor to reset S.D handle
-2006-08-23 Peter Dennis Bartok <[EMAIL PROTECTED]>
+2006-08-27 Peter Dennis Bartok <[EMAIL PROTECTED]>
* XplatUIX11.cs (SetCursor): Issue flush after setting the cursor
(#79168)
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-08-27 21:04:02 UTC (rev 64448)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-08-27 21:22:19 UTC (rev 64449)
@@ -85,7 +85,6 @@
private static IntPtr FosterParent; //
Container to hold child windows until their parent exists
private static XErrorHandler ErrorHandler; //
Error handler delegate
private static bool ErrorExceptions; //
Throw exceptions on X errors
- private static bool PostQuitState; // True
if we've got an pending exit
// Clipboard
private static IntPtr ClipMagic = new
IntPtr(27051977);
@@ -405,8 +404,6 @@
Keyboard = new X11Keyboard(DisplayHandle,
FosterParent);
Dnd = new X11Dnd (DisplayHandle);
- PostQuitState = false;
-
DoubleClickInterval = 500;
HoverState.Interval = 500;
@@ -2943,14 +2940,14 @@
} else if (((XEventQueue)queue_id).Paint.Count
> 0) {
xevent =
((XEventQueue)queue_id).Paint.Dequeue();
} else {
- if (!PostQuitState) {
+ if
(!ThreadQueue(Thread.CurrentThread).PostQuitState) {
msg.hwnd= IntPtr.Zero;
msg.message = Msg.WM_ENTERIDLE;
return true;
}
// We reset ourselves so GetMessage can
be called again
- PostQuitState = false;
+
ThreadQueue(Thread.CurrentThread).PostQuitState = false;
return false;
}
@@ -3321,7 +3318,7 @@
}
case XEventName.ConfigureNotify: {
- if (PostQuitState || !client &&
(xevent.ConfigureEvent.xevent == xevent.ConfigureEvent.window)) { //
Ignore events for children (SubstructureNotify) and client areas
+ if
(ThreadQueue(Thread.CurrentThread).PostQuitState|| !client &&
(xevent.ConfigureEvent.xevent == xevent.ConfigureEvent.window)) { //
Ignore events for children (SubstructureNotify) and client areas
#if DriverDebugExtra
Console.WriteLine("GetMessage(): Window {0:X} ConfigureNotify x={1} y={2}
width={3} height={4}", hwnd.client_window.ToInt32(), xevent.ConfigureEvent.x,
xevent.ConfigureEvent.y, xevent.ConfigureEvent.width,
xevent.ConfigureEvent.height);
#endif
@@ -3363,7 +3360,7 @@
}
case XEventName.Expose: {
- if (PostQuitState || !hwnd.Mapped) {
+ if
(ThreadQueue(Thread.CurrentThread).PostQuitState || !hwnd.Mapped) {
if (client) {
hwnd.expose_pending =
false;
} else {
@@ -3871,8 +3868,9 @@
}
internal override void PostQuitMessage(int exitCode) {
+
XFlush(DisplayHandle);
- PostQuitState = true;
+ ThreadQueue(Thread.CurrentThread).PostQuitState = true;
}
internal override void RequestNCRecalc(IntPtr handle) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches