At 02:19 PM 9/21/00 +0800, you wrote:
>gerard patel <[EMAIL PROTECTED]> wrote:
>
>I have downloaded WinEdt 5.1. But I didn't manage to crash it with my
>patch. My WM is KDE 1.1.1.
Strange. I use it too.
> Although WinEdt doesn't crash for me, it
>exhibits some flaws in the way Wine manages windows. For instance main
>WinEdt window has only close box on it, though in Windows all three
>standard buttons showed.
Yes, Winedt is not behaving perfectly - frankly I use it only as a test for
Wine, so I don't care much. But I would like it does not crash my server :-)
>My patch adds another "feature": after any dialog box was shown, bitmap
>on the system menu along with the sole close box on the main window caption
>disappear and don't get restored after the main window was enabled back.
I had not even seen that, of course...But I don't even see it (unless I don't
understand what you mean), even after I have found a hack to avoid the
crash (see below)
>But I'm not a X programming expert, and I couldn't say what is happening wrong.
>I just reused code, which already works in wine/windows/x11drv/wnd.c, lines 661-678,
>and it worked fine for enabling/disabling windows in my test programs.
>
>My experiments with replacing XGetWMSizeHints/XSetWMSizeHints by
>XGetWMNormalHints/XSetWMNormalHints didn't change anything. Man page for them
>doesn't mention any special tricks that could be used.
I investigated further, without great success.
It's difficult to trace since the end of the trace disappear, I ended up adding
a sync() call at this point. What happens is that the main window (the one being
disabled) get an UnmapNotify event almost immediately after the new size is set.
That's incorrect as it's not what the program asked.
If I comment only the line setting the min and max height, the main window is not
unmapped and the app works correctly.
The only hack I found to eliminate the crash it to don't have min=max, for example :
size_hints->min_width = wnd->rectWindow.right - wnd->rectWindow.left;
size_hints->max_width = size_hints->min_width + 1;
size_hints->min_height = wnd->rectWindow.bottom - wnd->rectWindow.top;
size_hints->max_height = size_hints->min_height + 1;
No crash then...
If someone has an idea to explain what is happening to me, it would be great :-)
Gerard