I'm still having this problem. Here is what I found so far: - All Delphi apps don't minimize properly because they depend on WM_SYSCOMMAND SC_MINIMIZE, SC_RESTORE etc. - If I insert these messages before WM_SHOWWINDOW in X11DRV_MapNotify / X11DRV_UnmapNotify it still doesn't work. App makes few more steps but does not minimize. Instead it changes size of the main window and shows an extra window (hidden Delphi Application window). - Comparing messages received by app I see WM_ACTIVATEAPP sent prematurely and WM_KILLFOCUS too late.
Does any one have suggestions where to insert this messages? Also, could someone enlighten my on how and where do we handle window management stuff? I see to many places (server, x11drv, user). I guess what I'm trying to find how they all are link together?
Here is a comparison of messages received by hidden application window while handling minimize request.
wine native WM_SYSCOMMAND SC_MINIMIZE WM_SYSCOMMAND SC_MINIMIZE Minimize start WM_QUERYNEWPALETTE WM_ACTIVATEAPP WM_WINDOWPOSCHANGING WM_NCACTIVATE WM_NCACTIVATE WM_ACTIVATE WM_ACTIVATE WM_SETFOCUS WM_SETFOCUS WM_WINDOWPOSCHANGING WM_WINDOWPOSCHANGING WM_NCCALCSIZE WM_NCCALCSIZE WM_WINDOWPOSCHANGED WM_WINDOWPOSCHANGED WM_MOVE WM_MOVE WM_SIZE WM_SIZE WM_KILLFOCUS WM_GETTEXT WM_WINDOWPOSCHANGING WM_WINDOWPOSCHANGING WM_NCCALCSIZE WM_NCCALCSIZE WM_WINDOWPOSCHANGED WM_WINDOWPOSCHANGED WM_MOVE WM_MOVE WM_SIZE WM_SIZE WM_NCACTIVATE WM_GETTEXT WM_ACTIVATE WM_ACTIVATEAPP Minimize end WM_WINDOWPOSCHANGING WM_WINDOWPOSCHANGED WM_MOVE WM_NCACTIVATE WM_ACTIVATE WM_KILLFOCUS