Status bars on managed windows should not have SIZEGRIP style.

This commit is contained in:
Susan Farley 2000-10-13 17:07:08 +00:00 committed by Alexandre Julliard
parent 6e843d7d58
commit 557066db1c
8 changed files with 50 additions and 42 deletions

View File

@ -848,6 +848,7 @@ STATUSBAR_WMCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
LPCREATESTRUCTA lpCreate = (LPCREATESTRUCTA)lParam;
NONCLIENTMETRICSA nclm;
DWORD dwStyle;
RECT rect;
int width, len;
HDC hdc;
@ -898,6 +899,13 @@ STATUSBAR_WMCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
}
}
dwStyle = GetWindowLongA(hwnd, GWL_STYLE);
/* statusbars on managed windows should not have SIZEGRIP style */
if ((dwStyle & SBARS_SIZEGRIP) && lpCreate->hwndParent)
if (GetWindowLongA(lpCreate->hwndParent, GWL_EXSTYLE) & WS_EX_MANAGED)
SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~SBARS_SIZEGRIP);
if ((hdc = GetDC (0))) {
TEXTMETRICA tm;
HFONT hOldFont;
@ -909,7 +917,7 @@ STATUSBAR_WMCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
ReleaseDC(0, hdc);
}
if (GetWindowLongA (hwnd, GWL_STYLE) & SBT_TOOLTIPS) {
if (dwStyle & SBT_TOOLTIPS) {
self->hwndToolTip =
CreateWindowExA (0, TOOLTIPS_CLASSA, NULL, 0,
CW_USEDEFAULT, CW_USEDEFAULT,

View File

@ -154,7 +154,6 @@ typedef struct
#define WIN_NATIVE 0x0020 /* Directly mapped to the window provided by the driver */
#define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
#define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
#define WIN_MANAGED 0x0100 /* Window managed by the window system */
#define WIN_ISDIALOG 0x0200 /* Window is a dialog */
#define WIN_ISWIN32 0x0400 /* Understands Win32 messages */
#define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0800 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */

View File

@ -2441,6 +2441,7 @@ DECL_WINELIB_TYPE_AW(LPICONMETRICS)
/* WINE internal... */
#define WS_EX_TRAYWINDOW 0x80000000L
#define WS_EX_MANAGED 0x40000000L /* Window managed by the window system */
/* Window scrolling */
#define SW_SCROLLCHILDREN 0x0001

View File

@ -592,7 +592,7 @@ static void NC_GetInsideRect( HWND hwnd, RECT *rect )
rect->right = wndPtr->rectWindow.right - wndPtr->rectWindow.left;
rect->bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top;
if ((wndPtr->dwStyle & WS_ICONIC) || (wndPtr->flags & WIN_MANAGED)) goto END;
if ((wndPtr->dwStyle & WS_ICONIC) || (wndPtr->dwExStyle & WS_EX_MANAGED)) goto END;
/* Remove frame from rectangle */
if (HAS_THICKFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
@ -631,7 +631,7 @@ NC_GetInsideRect95 (HWND hwnd, RECT *rect)
rect->right = wndPtr->rectWindow.right - wndPtr->rectWindow.left;
rect->bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top;
if ((wndPtr->dwStyle & WS_ICONIC) || (wndPtr->flags & WIN_MANAGED)) goto END;
if ((wndPtr->dwStyle & WS_ICONIC) || (wndPtr->dwExStyle & WS_EX_MANAGED)) goto END;
/* Remove frame from rectangle */
if (HAS_THICKFRAME (wndPtr->dwStyle, wndPtr->dwExStyle))
@ -681,7 +681,7 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
if (wndPtr->dwStyle & WS_MINIMIZE) return HTCAPTION;
if (!(wndPtr->flags & WIN_MANAGED))
if (!(wndPtr->dwExStyle & WS_EX_MANAGED))
{
/* Check borders */
if (HAS_THICKFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
@ -816,7 +816,7 @@ static LONG NC_DoNCHitTest95 (WND *wndPtr, POINT pt )
if (wndPtr->dwStyle & WS_MINIMIZE) return HTCAPTION;
if (!(wndPtr->flags & WIN_MANAGED))
if (!(wndPtr->dwExStyle & WS_EX_MANAGED))
{
/* Check borders */
if (HAS_THICKFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
@ -978,7 +978,7 @@ void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down )
HBITMAP hbitmap;
WND *wndPtr = WIN_FindWndPtr( hwnd );
if( !(wndPtr->flags & WIN_MANAGED) )
if( !(wndPtr->dwExStyle & WS_EX_MANAGED) )
{
NC_GetInsideRect( hwnd, &rect );
hdcMem = CreateCompatibleDC( hdc );
@ -1002,7 +1002,7 @@ static void NC_DrawMaxButton( HWND hwnd, HDC16 hdc, BOOL down )
WND *wndPtr = WIN_FindWndPtr( hwnd );
HDC hdcMem;
if( !(wndPtr->flags & WIN_MANAGED) )
if( !(wndPtr->dwExStyle & WS_EX_MANAGED) )
{
NC_GetInsideRect( hwnd, &rect );
hdcMem = CreateCompatibleDC( hdc );
@ -1028,7 +1028,7 @@ static void NC_DrawMinButton( HWND hwnd, HDC16 hdc, BOOL down )
WND *wndPtr = WIN_FindWndPtr( hwnd );
HDC hdcMem;
if( !(wndPtr->flags & WIN_MANAGED) )
if( !(wndPtr->dwExStyle & WS_EX_MANAGED) )
{
NC_GetInsideRect( hwnd, &rect );
hdcMem = CreateCompatibleDC( hdc );
@ -1065,7 +1065,7 @@ NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down)
{
WND *wndPtr = WIN_FindWndPtr( hwnd );
if( !(wndPtr->flags & WIN_MANAGED) )
if( !(wndPtr->dwExStyle & WS_EX_MANAGED) )
{
HICON hIcon;
RECT rect;
@ -1112,7 +1112,7 @@ static void NC_DrawCloseButton95 (HWND hwnd, HDC hdc, BOOL down, BOOL bGrayed)
HDC hdcMem;
WND *wndPtr = WIN_FindWndPtr( hwnd );
if( !(wndPtr->flags & WIN_MANAGED) )
if( !(wndPtr->dwExStyle & WS_EX_MANAGED) )
{
BITMAP bmp;
HBITMAP hBmp, hOldBmp;
@ -1187,7 +1187,7 @@ static void NC_DrawMaxButton95(HWND hwnd,HDC16 hdc,BOOL down, BOOL bGrayed)
HDC hdcMem;
WND *wndPtr = WIN_FindWndPtr( hwnd );
if( !(wndPtr->flags & WIN_MANAGED))
if( !(wndPtr->dwExStyle & WS_EX_MANAGED))
{
BITMAP bmp;
HBITMAP hBmp,hOldBmp;
@ -1246,7 +1246,7 @@ static void NC_DrawMinButton95(HWND hwnd,HDC16 hdc,BOOL down, BOOL bGrayed)
HDC hdcMem;
WND *wndPtr = WIN_FindWndPtr( hwnd );
if( !(wndPtr->flags & WIN_MANAGED))
if( !(wndPtr->dwExStyle & WS_EX_MANAGED))
{
BITMAP bmp;
@ -1460,7 +1460,7 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd,
WND * wndPtr = WIN_FindWndPtr( hwnd );
char buffer[256];
if (wndPtr->flags & WIN_MANAGED)
if (wndPtr->dwExStyle & WS_EX_MANAGED)
{
WIN_ReleaseWndPtr(wndPtr);
return;
@ -1566,7 +1566,7 @@ static void NC_DrawCaption95(
HPEN hPrevPen;
HMENU hSysMenu;
if (wndPtr->flags & WIN_MANAGED)
if (wndPtr->dwExStyle & WS_EX_MANAGED)
{
WIN_ReleaseWndPtr(wndPtr);
return;
@ -1685,7 +1685,7 @@ static void NC_DoNCPaint( WND* wndPtr, HRGN clip, BOOL suppress_menupaint )
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
if (!(wndPtr->flags & WIN_MANAGED))
if (!(wndPtr->dwExStyle & WS_EX_MANAGED))
{
if (HAS_ANYFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
{
@ -1816,7 +1816,7 @@ static void NC_DoNCPaint95(
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
if(!(wndPtr->flags & WIN_MANAGED)) {
if(!(wndPtr->dwExStyle & WS_EX_MANAGED)) {
if (HAS_BIGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle)) {
DrawEdge (hdc, &rect, EDGE_RAISED, BF_RECT | BF_ADJUST);
}
@ -2139,7 +2139,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
capturePoint = pt;
if (IsZoomed(hwnd) || !IsWindowVisible(hwnd) ||
(wndPtr->flags & WIN_MANAGED)) goto END;
(wndPtr->dwExStyle & WS_EX_MANAGED)) goto END;
if ((wParam & 0xfff0) == SC_MOVE)
{

View File

@ -2675,7 +2675,7 @@ BOOL WIN_InternalShowOwnedPopups( HWND owner, BOOL fShow, BOOL unmanagedOnly )
{
if ( IsWindowVisible(pWnd[count]->hwndSelf) && /* hide only if window is visible */
!( pWnd[count]->flags & WIN_NEEDS_INTERNALSOP ) && /* don't hide if previous call already did it */
!( unmanagedOnly && (pWnd[count]->flags & WIN_MANAGED ) ) ) /* don't hide managed windows if unmanagedOnly is TRUE */
!( unmanagedOnly && (pWnd[count]->dwExStyle & WS_EX_MANAGED) ) ) /* don't hide managed windows if unmanagedOnly is TRUE */
{
/*
* Call ShowWindow directly because an application can intercept WM_SHOWWINDOW messages

View File

@ -461,7 +461,7 @@ INT16 WINPOS_WindowFromPoint( WND* wndScope, POINT16 pt, WND **ppWnd )
goto end;
}
if( wndScope->flags & WIN_MANAGED )
if( wndScope->dwExStyle & WS_EX_MANAGED)
{
/* In managed mode we have to check wndScope first as it is also
* a window which received the mouse event. */
@ -1112,7 +1112,7 @@ BOOL WINPOS_ShowIconTitle( WND* pWnd, BOOL bShow )
{
LPINTERNALPOS lpPos = (LPINTERNALPOS)GetPropA( pWnd->hwndSelf, atomInternalPos );
if( lpPos && !(pWnd->flags & WIN_MANAGED))
if( lpPos && !(pWnd->dwExStyle & WS_EX_MANAGED))
{
HWND16 hWnd = lpPos->hwndIconTitle;
@ -1159,7 +1159,7 @@ void WINPOS_GetMinMaxInfo( WND *wndPtr, POINT *maxSize, POINT *maxPos,
MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXSCREEN);
MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYSCREEN);
if (wndPtr->flags & WIN_MANAGED) xinc = yinc = 0;
if (wndPtr->dwExStyle & WS_EX_MANAGED) xinc = yinc = 0;
else if (HAS_DLGFRAME( wndPtr->dwStyle, wndPtr->dwExStyle ))
{
xinc = GetSystemMetrics(SM_CXDLGFRAME);
@ -1824,7 +1824,7 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
if( IsIconic( hwndPrevActive ) ) WINPOS_RedrawIconTitle(hwndPrevActive);
/* managed windows will get ConfigureNotify event */
if (wndPtr && !(wndPtr->dwStyle & WS_CHILD) && !(wndPtr->flags & WIN_MANAGED))
if (wndPtr && !(wndPtr->dwStyle & WS_CHILD) && !(wndPtr->dwExStyle & WS_EX_MANAGED))
{
/* check Z-order and bring hWnd to the top */
for (wndTemp = WIN_LockWndPtr(WIN_GetDesktop()->child); wndTemp; WIN_UpdateWndPtr(&wndTemp,wndTemp->next))
@ -2785,7 +2785,7 @@ Pos: /* -----------------------------------------------------------------------
* only the nonclient area by setting bit gravity hint for the host window system.
*/
if( !(wndPtr->flags & WIN_MANAGED) )
if( !(wndPtr->dwExStyle & WS_EX_MANAGED) )
{
HRGN hrgn = CreateRectRgn( 0, 0, newWindowRect.right - newWindowRect.left,
newWindowRect.bottom - newWindowRect.top);
@ -2816,7 +2816,7 @@ Pos: /* -----------------------------------------------------------------------
wndPtr->dwStyle |= WS_VISIBLE;
if (wndPtr->flags & WIN_MANAGED) resync = TRUE;
if (wndPtr->dwExStyle & WS_EX_MANAGED) resync = TRUE;
/* focus was set to unmapped window, reset host focus
* since the window is now visible */

View File

@ -487,12 +487,12 @@ static BOOL __check_query_condition( WND** pWndA, WND** pWndB )
/* return TRUE if we have at least two managed windows */
for( *pWndB = NULL; *pWndA; *pWndA = (*pWndA)->next )
if( (*pWndA)->flags & WIN_MANAGED &&
(*pWndA)->dwStyle & WS_VISIBLE ) break;
if( ((*pWndA)->dwExStyle & WS_EX_MANAGED) &&
((*pWndA)->dwStyle & WS_VISIBLE )) break;
if( *pWndA )
for( *pWndB = (*pWndA)->next; *pWndB; *pWndB = (*pWndB)->next )
if( (*pWndB)->flags & WIN_MANAGED &&
(*pWndB)->dwStyle & WS_VISIBLE ) break;
if( ((*pWndB)->dwExStyle & WS_EX_MANAGED) &&
((*pWndB)->dwStyle & WS_VISIBLE )) break;
return ((*pWndB) != NULL);
}
@ -584,7 +584,7 @@ static HWND EVENT_QueryZOrder( HWND hWndCheck)
if( pWnd != pWndCheck )
{
if( !(pWnd->flags & WIN_MANAGED) ||
if( !(pWnd->dwExStyle & WS_EX_MANAGED) ||
!(w = __get_top_decoration( X11DRV_WND_GetXWindow(pWnd), parent )) )
continue;
pos = __td_lookup( w, children, total );
@ -1827,7 +1827,7 @@ void EVENT_MapNotify( HWND hWnd, XMapEvent *event )
HWND hwndFocus = GetFocus();
WND *wndFocus = WIN_FindWndPtr(hwndFocus);
WND *pWnd = WIN_FindWndPtr(hWnd);
if (pWnd && (pWnd->flags & WIN_MANAGED))
if (pWnd && (pWnd->dwExStyle & WS_EX_MANAGED))
{
DCE_InvalidateDCE( pWnd, &pWnd->rectWindow );
pWnd->dwStyle &= ~WS_MINIMIZE;
@ -1851,7 +1851,7 @@ void EVENT_MapNotify( HWND hWnd, XMapEvent *event )
void EVENT_UnmapNotify( HWND hWnd, XUnmapEvent *event )
{
WND *pWnd = WIN_FindWndPtr(hWnd);
if (pWnd && (pWnd->flags & WIN_MANAGED))
if (pWnd && (pWnd->dwExStyle & WS_EX_MANAGED))
{
EndMenu();
if( pWnd->dwStyle & WS_VISIBLE )

View File

@ -320,7 +320,7 @@ BOOL X11DRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCTA *cs, BO
ButtonPressMask | ButtonReleaseMask |
FocusChangeMask | StructureNotifyMask;
win_attr.override_redirect = FALSE;
wndPtr->flags |= WIN_MANAGED;
wndPtr->dwExStyle |= WS_EX_MANAGED;
} else {
win_attr.event_mask = ExposureMask | KeyPressMask |
KeyReleaseMask | PointerMotionMask |
@ -365,7 +365,7 @@ BOOL X11DRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCTA *cs, BO
if (wndPtr->dwExStyle & WS_EX_TRAYWINDOW)
X11DRV_WND_DockWindow(wndPtr);
if (wndPtr->flags & WIN_MANAGED)
if (wndPtr->dwExStyle & WS_EX_MANAGED)
{
XClassHint *class_hints = TSXAllocClassHint();
XSizeHints* size_hints = TSXAllocSizeHints();
@ -417,7 +417,7 @@ BOOL X11DRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCTA *cs, BO
wm_hints->flags = InputHint | StateHint | WindowGroupHint;
wm_hints->input = True;
if( wndPtr->flags & WIN_MANAGED )
if (wndPtr->dwExStyle & WS_EX_MANAGED)
{
X11DRV_WND_IconChanged(wndPtr);
X11DRV_WND_SetIconHints(wndPtr, wm_hints);
@ -555,7 +555,7 @@ void X11DRV_WND_ForceWindowRaise(WND *wndPtr)
return;
}
if( !wndPtr || !X11DRV_WND_GetXWindow(wndPtr) || (wndPtr->flags & WIN_MANAGED) )
if( !wndPtr || !X11DRV_WND_GetXWindow(wndPtr) || (wndPtr->dwExStyle & WS_EX_MANAGED) )
{
WIN_ReleaseDesktop();
return;
@ -589,7 +589,7 @@ void X11DRV_WND_ForceWindowRaise(WND *wndPtr)
*/
static Window X11DRV_WND_FindDesktopXWindow( WND *wndPtr )
{
if (!(wndPtr->flags & WIN_MANAGED))
if (!(wndPtr->dwExStyle & WS_EX_MANAGED))
return X11DRV_WND_GetXWindow(wndPtr);
else
{
@ -658,7 +658,7 @@ void X11DRV_WND_SetWindowPos(WND *wndPtr, const WINDOWPOS *winpos, BOOL bChangeP
/* Tweak dialog window size hints */
if ((winposPtr->flags & WIN_MANAGED) &&
if ((winposPtr->dwExStyle & WS_EX_MANAGED) &&
HAS_DLGFRAME(winposPtr->dwStyle,winposPtr->dwExStyle))
{
XSizeHints *size_hints = TSXAllocSizeHints();
@ -821,7 +821,7 @@ void X11DRV_WND_SetFocus(WND *wndPtr)
while (w && !((X11DRV_WND_DATA *) w->pDriverData)->window)
w = w->parent;
if (!w) w = wndPtr;
if (w->flags & WIN_MANAGED) return;
if (w->dwExStyle & WS_EX_MANAGED) return;
if (!hwnd) /* If setting the focus to 0, uninstall the colormap */
{
@ -1038,7 +1038,7 @@ BOOL X11DRV_WND_SetHostAttr(WND* wnd, INT ha, INT value)
if (X11DRV_WND_IsZeroSizeWnd(wnd))
return TRUE;
if( (wnd->flags & WIN_MANAGED) )
if( (wnd->dwExStyle & WS_EX_MANAGED) )
{
if( value )
{
@ -1095,13 +1095,13 @@ BOOL X11DRV_WND_SetHostAttr(WND* wnd, INT ha, INT value)
return TRUE;
case HAK_ICONS: /* called when the icons change */
if ( (wnd->flags & WIN_MANAGED) )
if ( (wnd->dwExStyle & WS_EX_MANAGED) )
X11DRV_WND_UpdateIconHints(wnd);
return TRUE;
case HAK_ACCEPTFOCUS: /* called when a window is disabled/enabled */
if( (wnd->flags & WIN_MANAGED) )
if( (wnd->dwExStyle & WS_EX_MANAGED) )
return X11DRV_SetWMHint( display, wnd, InputHint, value );
}
}