[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnetlib/Xsharp TopLevelWindow.cs,1.12,1.13
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnetlib/Xsharp TopLevelWindow.cs,1.12,1.13 |
Date: |
Sun, 30 Nov 2003 00:59:54 +0000 |
Update of /cvsroot/dotgnu-pnet/pnetlib/Xsharp
In directory subversions:/tmp/cvs-serv12022/Xsharp
Modified Files:
TopLevelWindow.cs
Log Message:
Fix a bug in the handling of resize events that caused it to confuse
ConfigureNotify's that arose from application-requested and window
manager-requested resizes.
Index: TopLevelWindow.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/TopLevelWindow.cs,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** TopLevelWindow.cs 29 Nov 2003 23:40:46 -0000 1.12
--- TopLevelWindow.cs 30 Nov 2003 00:59:52 -0000 1.13
***************
*** 47,50 ****
--- 47,51 ----
private TopLevelWindow transientFor;
private Timer resizeTimer;
+ private int expectedWidth, expectedHeight;
/// <summary>
***************
*** 127,130 ****
--- 128,134 ----
this.inputType = MotifInputType.Normal;
this.transientFor = null;
+ this.resizeTimer = null;
+ this.expectedWidth = -1;
+ this.expectedHeight = -1;
// Set the initial WM properties.
***************
*** 213,216 ****
--- 217,225 ----
hints.height = newHeight;
Xlib.XSetWMNormalHints(display, handle,
ref hints);
+ if(newWidth != width || newHeight !=
height)
+ {
+ expectedWidth = newWidth;
+ expectedHeight = newHeight;
+ }
base.PerformMoveResize
(display, newX, newY, newWidth,
newHeight);
***************
*** 227,230 ****
--- 236,241 ----
changes.width = newWidth;
changes.height = newHeight;
+ expectedWidth = newWidth;
+ expectedHeight = newHeight;
mask = ConfigureWindowMask.CWX |
ConfigureWindowMask.CWY |
***************
*** 244,247 ****
--- 255,260 ----
changes.width = newWidth;
changes.height = newHeight;
+ expectedWidth = newWidth;
+ expectedHeight = newHeight;
mask = ConfigureWindowMask.CWWidth |
ConfigureWindowMask.CWHeight;
***************
*** 846,849 ****
--- 859,864 ----
resizeTimer = null;
}
+ expectedWidth = -1;
+ expectedHeight = -1;
OnResize(width, height);
}
***************
*** 1007,1015 ****
}
if(xevent.xconfigure.width !=
width ||
! xevent.xconfigure.height !=
height)
{
// The size has been
changed by the window manager.
! width =
xevent.xconfigure.width;
! height =
xevent.xconfigure.height;
if(resizeTimer == null)
{
--- 1022,1044 ----
}
if(xevent.xconfigure.width !=
width ||
! xevent.xconfigure.height !=
height ||
! expectedWidth != -1)
{
// The size has been
changed by the window manager.
! if(expectedWidth == -1)
! {
! // Resize from
the window manager, not us.
! width =
xevent.xconfigure.width;
! height =
xevent.xconfigure.height;
! }
! else if(expectedWidth
== xevent.xconfigure.width &&
!
expectedHeight == xevent.xconfigure.height)
! {
! // This is the
size that we were expecting.
! // Further
ConfigureNotify's will be from
! // the window
manager instead of from us.
! expectedWidth =
-1;
! expectedHeight
= -1;
! }
if(resizeTimer == null)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnetlib/Xsharp TopLevelWindow.cs,1.12,1.13,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] pnetlib/System.Windows.Forms GridLayout.cs, 1.1, 1.2 HBoxLayout.cs, 1.3, 1.4 MessageBox.cs, 1.7, 1.8 VBoxLayout.cs, 1.2, 1.3
- Next by Date:
[Dotgnu-pnet-commits] pnetlib ChangeLog,1.1557,1.1558
- Previous by thread:
[Dotgnu-pnet-commits] pnetlib/System.Windows.Forms GridLayout.cs, 1.1, 1.2 HBoxLayout.cs, 1.3, 1.4 MessageBox.cs, 1.7, 1.8 VBoxLayout.cs, 1.2, 1.3
- Next by thread:
[Dotgnu-pnet-commits] pnetlib ChangeLog,1.1557,1.1558
- Index(es):