Francois Methot <[EMAIL PROTECTED]> wrote:

>This patch prevent a system menu from appearing on a docker by filtering the
>Style and ExStyle of a window.
>The system menu won't be displayed if a given window has the following
>style:
>WS_EX_TOOL_WINDOW
>
>However to display it, it requires those:
>WS_SYSMENU &
>WS_CAPTION
>
>I choosed these styles based on test I made with Window.

...
-                if (pt.x <= rect.left) return HTSYSMENU;
+                if (pt.x < rect.left) {
+                    if ((wndPtr->dwStyle & WS_CAPTION) && !(wndPtr->dwExStyle & 
+WS_EX_TOOLWINDOW))
+                        return HTSYSMENU;
+                    else
+                        return HTCAPTION;                    
+                }
...

in winuser.h WS_CAPTION defined as
#define WS_CAPTION          0x00C00000L     /* WS_BORDER | WS_DLGFRAME  */

so, test "if (wndPtr->dwStyle & WS_CAPTION)" is not correct. Everywhere in Wine
the construction like "if ((wndPtr->dwStyle & WS_CAPTION) == WS_CAPTION)" is widely
used.

Dmitry.


Reply via email to