At 11:39 AM 7/31/00 -0400, you wrote:
>Change log :
> Provide position hints for window managers
>
>Some Window Managers (like Enlightenment) support these position hints (even though
>they are obsolete) and honor them when displaying managed windows for the first time.
>
>Jean-Claude Batista
>Louis-Philippe Gagnon
>Macadamian Technologies Inc (for Corel)
As I posted on wine-devel, I have a problem with this patch; 2 of my test apps (namely
Borland Builder 3 & 4) have their main window badly placed now.
What happens is the following :
- the app call SetWindowPos on the window to position it at 129,244
- it then call again SetWindowPos to position it at 0,0
- it shows it. The MapWindow call generates a ConfigureNotify with
129,244 as coordinates :-/, and X code calls back SetWindowPos
(in EVENT_ConfigureNotify)
The following patch removes this problem:
--- wnd.c.orig Sat Aug 12 11:41:03 2000
+++ wnd.c Sat Aug 12 15:42:17 2000
@@ -679,6 +679,18 @@
}
if (!(winpos->flags & SWP_NOMOVE))
{
+ XSizeHints *size_hints = TSXAllocSizeHints();
+ if (size_hints)
+ {
+ long supplied_return;
+
+ TSXGetWMSizeHints( display, X11DRV_WND_GetXWindow(winposPtr), size_hints,
+ &supplied_return, XA_WM_NORMAL_HINTS);
+ size_hints->flags &= ~PPosition;
+ TSXSetWMSizeHints( display, X11DRV_WND_GetXWindow(winposPtr), size_hints,
+ XA_WM_NORMAL_HINTS );
+ TSXFree(size_hints);
+ }
winChanges.x = winpos->x;
winChanges.y = winpos->y;
changeMask |= CWX | CWY;
Now, is this patch breaking the fix that you did in the first place ?
Does anyone see something wrong in the approach (I have never done any X programming
outside of Wine)
Thanks
Gerard