Author: toshok
Date: 2006-10-06 17:23:57 -0400 (Fri, 06 Oct 2006)
New Revision: 66380
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
* XplatUIX11.cs: This is perhaps a dangerous change, but it seems
to have no evil effects.
- Stop selecting StructureNotifyMask on non-toplevel windows.
The only way children should be resized is by using the SWF api,
and we already send WM_WINDOWPOSCHANGED messages in those cases.
Toplevel windows can be interacted with via the window manager,
and so we keep the input mask there.
The other event StructureNotifyMask gives us (that we care
about) is DestroyNotify. The code is already structured such
that it assumes we won't be getting a DestroyNotify event for
the window we pass to XDestroyWindow (which is what
StructureNotifyMask is supposed to guarantee.) So, that code
shouldn't be affected by this either.
- Stop selecting VisibilityChangeMask altogether.
We weren't doing anything with the resulting events anyway.
This vastly reduces the number of X requests and events we see
when resizing/laying out a large ui.
2006-10-06 Chris Toshok <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-10-06 21:22:36 UTC (rev 66379)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-10-06 21:23:57 UTC (rev 66380)
@@ -1,5 +1,31 @@
2006-10-06 Chris Toshok <[EMAIL PROTECTED]>
+ * XplatUIX11.cs: This is perhaps a dangerous change, but it seems
+ to have no evil effects.
+
+ - Stop selecting StructureNotifyMask on non-toplevel windows.
+
+ The only way children should be resized is by using the SWF api,
+ and we already send WM_WINDOWPOSCHANGED messages in those cases.
+ Toplevel windows can be interacted with via the window manager,
+ and so we keep the input mask there.
+
+ The other event StructureNotifyMask gives us (that we care
+ about) is DestroyNotify. The code is already structured such
+ that it assumes we won't be getting a DestroyNotify event for
+ the window we pass to XDestroyWindow (which is what
+ StructureNotifyMask is supposed to guarantee.) So, that code
+ shouldn't be affected by this either.
+
+ - Stop selecting VisibilityChangeMask altogether.
+
+ We weren't doing anything with the resulting events anyway.
+
+ This vastly reduces the number of X requests and events we see
+ when resizing/laying out a large ui.
+
+2006-10-06 Chris Toshok <[EMAIL PROTECTED]>
+
* ScrollableControl.cs (DisplayRectangle): we need to take into
account the DockPadding regardless of whether or not auto_scroll
== true. rework this slightly to this effect, and fix bug #79606,
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-10-06 21:22:36 UTC (rev 66379)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
2006-10-06 21:23:57 UTC (rev 66380)
@@ -211,18 +211,16 @@
// 'Constants'
private static int DoubleClickInterval; //
msec; max interval between clicks to count as double click
- const EventMask SelectInputMask = EventMask.ButtonPressMask |
- EventMask.ButtonReleaseMask |
- EventMask.KeyPressMask |
- EventMask.KeyReleaseMask |
- EventMask.EnterWindowMask |
- EventMask.LeaveWindowMask |
- EventMask.ExposureMask |
- EventMask.FocusChangeMask |
- EventMask.PointerMotionMask |
-
EventMask.VisibilityChangeMask |
-
EventMask.SubstructureNotifyMask |
- EventMask.StructureNotifyMask;
+ const EventMask SelectInputMask = (EventMask.ButtonPressMask |
+ EventMask.ButtonReleaseMask
|
+ EventMask.KeyPressMask |
+ EventMask.KeyReleaseMask |
+ EventMask.EnterWindowMask |
+ EventMask.LeaveWindowMask |
+ EventMask.ExposureMask |
+ EventMask.FocusChangeMask |
+ EventMask.PointerMotionMask
|
+
EventMask.SubstructureNotifyMask);
static readonly object lockobj = new object ();
@@ -2343,7 +2341,13 @@
}
lock (XlibLock) {
- XSelectInput(DisplayHandle, hwnd.whole_window,
new IntPtr ((int)SelectInputMask));
+ EventMask whole_window_mask = SelectInputMask;
+ /* if we're a toplevel form, we want
+ * to know about user-driven resizes.
+ * otherwise, ignore them. */
+ if (!StyleSet (cp.Style, WindowStyles.WS_CHILD))
+ whole_window_mask |=
EventMask.StructureNotifyMask;
+ XSelectInput(DisplayHandle, hwnd.whole_window,
new IntPtr ((int)whole_window_mask));
XSelectInput(DisplayHandle, hwnd.client_window,
new IntPtr ((int)SelectInputMask));
if (StyleSet (cp.Style,
WindowStyles.WS_VISIBLE)) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches