Earle, Thank you for your comments and commits. That not only fixes a-o-t problems but also gives hints for the ongoing restacking problem. Let me confirm some points to make things clear.
> Minimized > always-on-top windows never disappear from in front of other > X windows in all the tests I've tried. I can't reproduce this behaviour with release-59. I made two windows overlapped, set one of them as a-o-t, then minimized the a-o-t window. The second window was shown correctly. Could you show me how to reproduce it? > And when a non-aot > window is created on top of an a-o-t one, it is popped to the > top of the X window stack, even if there is an a-o-t window > in Win32 space above it. It's as if a chunk of the window > below the aot window is showing through, and a real pain. (It's > caused by XRaiseWindow()ing a window that's not really at the > top of the Win32 stack...) I can't reproduce it with release-59. Maybe I am doing the tests in a wrong way... Could you point it out? > I've cleaned all this up in my local copy, and made Emacs/xterm > menus work properly in a-o-t mode (they don't disappear!) without > stepping on any of Takuma's changes. Popups on a-o-t windows are having problems and should be fixed. Did you fix it without reviving fAlwaysOnTop? I'm interested in the solution. > However, I can't get > minimization to work without turning off the Win32 a-o-t setting > on the window during the minimize... As I wrote above, I think it is achieved in current releases. > The old behavior was to copy the current a-o-t state to a private > flag in pWinPriv on a minimize, remove the a-o-t bit from the window, > and on a restore set the a-o-t flag back on the Win32 window if so > cached. > > If I put this flag and behavior back I can get things working > 100% AFAICT: a-o-t windows minimized from the taskbar, the > system menu, or the button disappear. > > Takuma, if you're reading the list, can you give some insight as to > why you took out the old private flag? (I agree it should be > cached in the wndproc on the WM_SIZE message, not the SC_* menu > handler where it was, that's where I've got it placed presently, > and it now works for all different methods of minimizing a window > I can think of...) In the change I fixed window manipulation (remove, resize, minimize and maximize). My principle is to have Windows do as much work as possible; I let Windows all window operations and propagate the resulting position and size to underlying X windows through winAdjustXWindow(). Within the process I removed some cache variables including fAlwaysOnTop since they seemed unnecessary. I did basic tests so minimization of a-o-t windows should be work fine. I want to go on without fAlwaysOnTop flag if we can. However popups on a-o-t windows are surely broken, it is my fault. I built and ran on the latest CVS. It works fine with popups on a-o-t windows (it yields some BadWindow errors but they cause no actual faults.) It could be the best solution. What we should verify now are: 1) Is minimization of a-o-t windows broken on release-59? 2) Does the CVS build fix restacking problem? I appreciate anyone who gives feedbacks on item 1. Item 2 is about the problem on which Harold and I are working so Harold can verify it. Takuma Murakami