http://bugs.winehq.com/show_bug.cgi?id=1266
------- Additional Comments From dclark(a)akamail.com 2003-02-10 17:31 -------
Oh, cool. The patch I put on bug 1265 also fixes this one.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1266>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://bugs.winehq.com/show_bug.cgi?id=1265
------- Additional Comments From dclark(a)akamail.com 2003-02-10 16:35 -------
It looks like this is a much better fix.
Index: dlls/x11drv/winpos.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/winpos.c,v
retrieving revision 1.63
diff -u -r1.63 winpos.c
--- dlls/x11drv/winpos.c 8 Jan 2003 21:09:26 -0000 1.63
+++ dlls/x11drv/winpos.c 10 Feb 2003 22:33:20 -0000
@@ -887,6 +887,9 @@
UINT wvrFlags = 0;
BOOL bChangePos;
+ /* This is needed to flush pending X ConfigureNotify events on this window */
+ MsgWaitForMultipleObjectsEx( 0, NULL, 0, 0, 0 );
+
TRACE( "hwnd %p, swp (%i,%i)-(%i,%i) flags %08x\n",
winpos->hwnd, winpos->x, winpos->y,
winpos->x + winpos->cx, winpos->y + winpos->cy, winpos->flags);
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1265>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://bugs.winehq.com/show_bug.cgi?id=1265
------- Additional Comments From dclark(a)akamail.com 2003-02-10 15:48 -------
And it looks like this patch fixes this bug. I am not real sure why this code is
here, so will have to study more before submitting. And there are already lots
of patches setting in the queue already :-)
An X ConfigureNotify event is a notification that a window has just been
changed. So it is not clear to me why Wine immediately then changes it again. I
will have to test with a bunch of apps to see if I can figure out what (if
anything) it is needed for.
Watch out for word wrap.
Index: dlls/x11drv/winpos.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/winpos.c,v
retrieving revision 1.63
diff -u -r1.63 winpos.c
--- dlls/x11drv/winpos.c 8 Jan 2003 21:09:26 -0000 1.63
+++ dlls/x11drv/winpos.c 10 Feb 2003 21:41:08 -0000
@@ -1609,8 +1611,8 @@
/* if nothing changed, don't do anything */
if (winpos.flags == (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
SWP_NOACTIVATE)) return;
- SetWindowPos( hwnd, winpos.hwndInsertAfter, winpos.x, winpos.y,
- winpos.cx, winpos.cy, winpos.flags | SWP_WINE_NOHOSTMOVE );
+/* SetWindowPos( hwnd, winpos.hwndInsertAfter, winpos.x, winpos.y,
+ winpos.cx, winpos.cy, winpos.flags | SWP_WINE_NOHOSTMOVE );*/
}
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1265>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://bugs.winehq.com/show_bug.cgi?id=1272
------- Additional Comments From felipewd(a)elipse.com.br 2003-02-10 13:53 -------
You're right.
It turned out to be a Window Maker bug.
I tried the same program with gnome and it worked fine.
So, ok...the "main" bug is not a wine bug...but a minor bug still exists: The
window gets resized to a really tiniy value when minimized.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1272>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://bugs.winehq.com/show_bug.cgi?id=1272
------- Additional Comments From dclark(a)akamail.com 2003-02-10 13:25 -------
I finally figured out that the attachments were gzip files. Netscape 7 thinks
they are named showattachment.cgi, and there were no other clues that I could
see to what they were. The "executable" unpacks into a .so file for some reason.
When I execute, it says I need libstdc++.so.5.
Anyway, I was able to compile from the source and run that. And yes, my patch
does not fix your app. On the otherhand, I don't get the symptom of it locking
up. Yes it is restored to a tiny window and I have to resize it by hand, but the
"hello world" is displayed just fine for me.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1272>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://bugs.winehq.com/show_bug.cgi?id=1265
------- Additional Comments From dclark(a)akamail.com 2003-02-10 13:03 -------
This is being caused because this sequence of events is taking place. Early on
the app creates two DCs for the tooltip with a default size of 66x20 pixels. One
is an offscreen DC for working in (ends up being 0xa18 on my system), and the
other is the DC that is used to actually display the tooltip on the screen
(0xa14). When it comes time to show the tooltip, the app moves and resizes both
DCs, and paints and writes in the text to the offscreen DC. It then copies this
into the screen DC and sends a signal to make it visible. Up to this point
everything is fine.
When the window is made visible, some events are received from the X queue,
which "catch up" the app. It sends two resize events to the offscreen DC, the
first resizes back to 66x20, which effectively clips the rest of the tooltip,
and the second resizes it back to the correct size. Unfortunately the contents
are now corrupted, but the app is assuming the offscreen DC is ok. The corrupted
offscreen DC is then copied to the screen DC.
When the tooltip is hidden and redisplayed, the same sequence of events occurs.
Except this time, the DCs were already at the correct size for the tooltip, so
no resizing back to 66x20 occurs, and the offscreen DC is not corrupted this
time. Even when the window is closed and reopened, it continues to use the DCs
it has already created, so no problem occurs.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1265>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://bugs.winehq.com/show_bug.cgi?id=1272
------- Additional Comments From felipewd(a)elipse.com.br 2003-02-10 12:43 -------
Well, Duane...I guess it got rejected because it does not work :)
The problem still exists...in fact, what seems to happen is that when the
window is SW_SHOWMINIMIZED, it also is resized to 0,0, it's not only minimized.
And when the user tries to restore the windows to normal (having to manually
resize the window to the "normal" size) state, the main window is locked, but
the menu seem to work (could be some flag not being set correctly).
To download the attachments...just click on them. They're are also available here:
ftp://ftp.elipse.com.br/pub/showWindow/showWindow-exe.tar.gz
ftp://ftp.elipse.com.br/pub/showWindow/showWindow-src.tar.gz
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1272>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://bugs.winehq.com/show_bug.cgi?id=1272
------- Additional Comments From dclark(a)akamail.com 2003-02-10 12:35 -------
It was quick because I have been using this patch for quite awhile now :-) It
was even submitted to CVS, but rejected:
http://www.winehq.com/hypermail/wine-devel/2002/08/0360.html
I guess maybe an attempt needs to be made to figure out the right fix.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1272>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://bugs.winehq.com/show_bug.cgi?id=1272
------- Additional Comments From andi(a)rhlx01.fht-esslingen.de 2003-02-10 12:10 -------
OK, *my* issue is not quite a bug.
My Win98SE copy has horribly negative values for almost all WindowMetrics keys,
so Wine picks up these values and uses them in an uncorrected manner.
I'll try to find out what Windows does in case of negative values, and I'll
change Wine to handle that if required.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1272>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://bugs.winehq.com/show_bug.cgi?id=1272
------- Additional Comments From andi(a)rhlx01.fht-esslingen.de 2003-02-10 11:47 -------
Whoa, that was fast!
I've also been looking at this bug, and I found something different:
I have used Win98 notepad.exe in a desktopified Wine environment for testing.
I started it, minimized notepad, and watched in amazement as it totally
disappeared (no icon anywhere!).
So in fact I uncovered a second bug while investigating that bug. Cool, huh?
Call trace:
X11DRV_ShowWindow
WINPOS_MinMaximize(hwnd, SW_MINIMIZE, &newPos)
GetWindowPlacement(hwnd, &wpl)
WINPOS_InitInternalPos()
WINPOS_FindIconPos(wndPtr, wp l.ptMinPosition [-1, -1]);
(rectParent 0/0 - 1400/1050: desktop window!)
SetRect(newPos, wpl.ptMaxPosition.x, wpl.ptMaxPosition.y,
GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON); --> 21/1596 - 32/32
---> WAY below
Wine Desktop window!!!!
What seems to happen is that WINPOS_InitInternalPos returns -1, -1
(no position information stored yet for window).
WINPOS_FindIconPos can't deal with -1, -1 properly, it seems.
I tried your patch to check whether it'd also fix this issue,
but it doesn't.
Any idea about my problem?
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1272>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.