2 * Window related functions
4 * Copyright 1993, 1994, 1995, 1996, 2001 Alexandre Julliard
5 * Copyright 1993 David Metcalfe
6 * Copyright 1995, 1996 Alex Korobka
18 #include "debugtools.h"
24 DEFAULT_DEBUG_CHANNEL(win);
26 extern Pixmap X11DRV_BITMAP_Pixmap( HBITMAP );
28 #define HAS_DLGFRAME(style,exStyle) \
29 ((!((style) & WS_THICKFRAME)) && (((style) & WS_DLGFRAME) || ((exStyle) & WS_EX_DLGMODALFRAME)))
31 /* X context to associate a hwnd to an X window */
32 XContext winContext = 0;
34 Atom wmProtocols = None;
35 Atom wmDeleteWindow = None;
36 Atom dndProtocol = None;
37 Atom dndSelection = None;
38 Atom wmChangeState = None;
39 Atom kwmDockWindow = None;
40 Atom _kde_net_wm_system_tray_window_for = None; /* KDE 2 Final */
43 /***********************************************************************
44 * X11DRV_register_window
46 * Associate an X window to a HWND.
48 void X11DRV_register_window( Display *display, HWND hwnd, Window win )
50 if (!winContext) winContext = TSXUniqueContext();
51 TSXSaveContext( display, win, winContext, (char *)hwnd );
52 TSXSetWMProtocols( display, win, &wmDeleteWindow, 1 );
56 /***********************************************************************
59 * Set a window manager hint.
61 static void set_wm_hint( Display *display, Window win, int hint, int val )
63 XWMHints* wm_hints = TSXGetWMHints( display, win );
64 if (!wm_hints) wm_hints = TSXAllocWMHints();
67 wm_hints->flags = hint;
71 wm_hints->input = val;
75 wm_hints->initial_state = val;
79 wm_hints->icon_pixmap = (Pixmap)val;
83 wm_hints->icon_window = (Window)val;
86 TSXSetWMHints( display, win, wm_hints );
92 /***********************************************************************
95 * Set the icon wm hints
97 static void set_icon_hints( Display *display, WND *wndPtr, XWMHints *hints )
99 X11DRV_WND_DATA *data = wndPtr->pDriverData;
100 HICON hIcon = GetClassLongA( wndPtr->hwndSelf, GCL_HICON );
102 if (data->hWMIconBitmap) DeleteObject( data->hWMIconBitmap );
103 if (data->hWMIconMask) DeleteObject( data->hWMIconMask);
107 data->hWMIconBitmap = 0;
108 data->hWMIconMask = 0;
109 hints->flags &= ~(IconPixmapHint | IconMaskHint);
119 GetIconInfo(hIcon, &ii);
121 X11DRV_CreateBitmap(ii.hbmMask);
122 X11DRV_CreateBitmap(ii.hbmColor);
124 GetObjectA(ii.hbmMask, sizeof(bmMask), &bmMask);
127 rcMask.right = bmMask.bmWidth;
128 rcMask.bottom = bmMask.bmHeight;
130 hDC = CreateCompatibleDC(0);
131 hbmOrig = SelectObject(hDC, ii.hbmMask);
132 InvertRect(hDC, &rcMask);
133 SelectObject(hDC, hbmOrig);
136 data->hWMIconBitmap = ii.hbmColor;
137 data->hWMIconMask = ii.hbmMask;
139 hints->icon_pixmap = X11DRV_BITMAP_Pixmap(data->hWMIconBitmap);
140 hints->icon_mask = X11DRV_BITMAP_Pixmap(data->hWMIconMask);
141 hints->flags |= IconPixmapHint | IconMaskHint;
146 /***********************************************************************
149 * Set the X Property of the window that tells the windowmanager we really
150 * want to be in the systray
152 * KDE: set "KWM_DOCKWINDOW", type "KWM_DOCKWINDOW" to 1 before a window is
155 * all others: to be added ;)
157 inline static void dock_window( Display *display, Window win )
160 if (kwmDockWindow != None)
161 TSXChangeProperty( display, win, kwmDockWindow, kwmDockWindow,
162 32, PropModeReplace, (char*)&data, 1 );
163 if (_kde_net_wm_system_tray_window_for != None)
164 TSXChangeProperty( display, win, _kde_net_wm_system_tray_window_for, XA_WINDOW,
165 32, PropModeReplace, (char*)&win, 1 );
169 /**********************************************************************
172 static void create_desktop( Display *display, WND *wndPtr )
174 X11DRV_WND_DATA *data = wndPtr->pDriverData;
176 wmProtocols = TSXInternAtom( display, "WM_PROTOCOLS", True );
177 wmDeleteWindow = TSXInternAtom( display, "WM_DELETE_WINDOW", True );
178 dndProtocol = TSXInternAtom( display, "DndProtocol" , False );
179 dndSelection = TSXInternAtom( display, "DndSelection" , False );
180 wmChangeState = TSXInternAtom (display, "WM_CHANGE_STATE", False);
181 kwmDockWindow = TSXInternAtom( display, "KWM_DOCKWINDOW", False );
182 _kde_net_wm_system_tray_window_for = TSXInternAtom( display, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False );
184 data->window = root_window;
185 if (root_window != DefaultRootWindow(display))
187 wndPtr->flags |= WIN_NATIVE;
188 X11DRV_create_desktop_thread();
193 /**********************************************************************
194 * CreateWindow (X11DRV.@)
196 BOOL X11DRV_CreateWindow( HWND hwnd )
198 Display *display = thread_display();
199 X11DRV_WND_DATA *data;
200 WND *wndPtr = WIN_FindWndPtr( hwnd );
201 int x = wndPtr->rectWindow.left;
202 int y = wndPtr->rectWindow.top;
203 int cx = wndPtr->rectWindow.right - wndPtr->rectWindow.left;
204 int cy = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top;
206 if (!(data = HeapAlloc(GetProcessHeap(), 0, sizeof(X11DRV_WND_DATA))))
208 WIN_ReleaseWndPtr( wndPtr );
212 wndPtr->pDriverData = data;
216 create_desktop( display, wndPtr );
217 WIN_ReleaseWndPtr( wndPtr );
221 /* Create the X window (only for top-level windows, and then only */
222 /* when there's no desktop window) */
224 if ((root_window == DefaultRootWindow(display))
225 && (wndPtr->parent->hwndSelf == GetDesktopWindow()))
229 XSetWindowAttributes win_attr;
231 /* Create "managed" windows only if a title bar or resizable */
232 /* frame is required. */
233 if (WIN_WindowNeedsWMBorder(wndPtr->dwStyle, wndPtr->dwExStyle))
235 win_attr.event_mask = ExposureMask | KeyPressMask |
236 KeyReleaseMask | PointerMotionMask |
237 ButtonPressMask | ButtonReleaseMask |
238 FocusChangeMask | StructureNotifyMask;
239 win_attr.override_redirect = FALSE;
240 wndPtr->dwExStyle |= WS_EX_MANAGED;
244 win_attr.event_mask = ExposureMask | KeyPressMask |
245 KeyReleaseMask | PointerMotionMask |
246 ButtonPressMask | ButtonReleaseMask |
248 win_attr.override_redirect = TRUE;
250 wndPtr->flags |= WIN_NATIVE;
254 win_attr.bit_gravity = (wndPtr->clsStyle & (CS_VREDRAW | CS_HREDRAW)) ? ForgetGravity : NorthWestGravity;
255 win_attr.colormap = X11DRV_PALETTE_PaletteXColormap;
256 win_attr.backing_store = NotUseful;
257 win_attr.save_under = ((wndPtr->clsStyle & CS_SAVEBITS) != 0);
258 win_attr.cursor = X11DRV_GetCursor( display, GlobalLock16(GetCursor()) );
260 data->hWMIconBitmap = 0;
261 data->hWMIconMask = 0;
262 data->bit_gravity = win_attr.bit_gravity;
264 /* Zero-size X11 window hack. X doesn't like them, and will crash */
265 /* with a BadValue unless we do something ugly like this. */
266 /* Zero size window won't be mapped */
270 data->window = XCreateWindow( display, root_window,
274 CWEventMask | CWOverrideRedirect |
275 CWColormap | CWCursor | CWSaveUnder |
276 CWBackingStore | CWBitGravity,
279 if (win_attr.cursor) XFreeCursor( display, win_attr.cursor );
282 if(!(wGroupLeader = data->window))
284 HeapFree( GetProcessHeap(), 0, data );
285 WIN_ReleaseWndPtr( wndPtr );
289 /* If we are the systray, we need to be managed to be noticed by KWM */
290 if (wndPtr->dwExStyle & WS_EX_TRAYWINDOW) dock_window( display, data->window );
292 if (wndPtr->dwExStyle & WS_EX_MANAGED)
294 XClassHint *class_hints = TSXAllocClassHint();
295 XSizeHints* size_hints = TSXAllocSizeHints();
299 class_hints->res_name = "wineManaged";
300 class_hints->res_class = "Wine";
301 TSXSetClassHint( display, data->window, class_hints );
302 TSXFree (class_hints);
307 size_hints->win_gravity = StaticGravity;
310 size_hints->flags = PWinGravity|PPosition;
312 if (HAS_DLGFRAME(wndPtr->dwStyle,wndPtr->dwExStyle))
314 size_hints->min_width = size_hints->max_width = cx;
315 size_hints->min_height = size_hints->max_height = cy;
316 size_hints->flags |= PMinSize | PMaxSize;
319 TSXSetWMSizeHints( display, X11DRV_WND_GetXWindow(wndPtr),
320 size_hints, XA_WM_NORMAL_HINTS );
325 if (wndPtr->owner) /* Get window owner */
327 Window w = X11DRV_WND_FindXWindow( wndPtr->owner );
330 TSXSetTransientForHint( display, X11DRV_WND_GetXWindow(wndPtr), w );
335 if ((wm_hints = TSXAllocWMHints()))
337 wm_hints->flags = InputHint | StateHint | WindowGroupHint;
338 wm_hints->input = True;
340 if (wndPtr->dwExStyle & WS_EX_MANAGED)
342 set_icon_hints( display, wndPtr, wm_hints );
343 wm_hints->initial_state = (wndPtr->dwStyle & WS_MINIMIZE)
344 ? IconicState : NormalState;
347 wm_hints->initial_state = NormalState;
348 wm_hints->window_group = wGroupLeader;
350 TSXSetWMHints( display, X11DRV_WND_GetXWindow(wndPtr), wm_hints );
353 X11DRV_register_window( display, hwnd, data->window );
356 WIN_ReleaseWndPtr( wndPtr );
361 /***********************************************************************
362 * DestroyWindow (X11DRV.@)
364 BOOL X11DRV_DestroyWindow( HWND hwnd )
366 Display *display = thread_display();
367 WND *wndPtr = WIN_FindWndPtr( hwnd );
368 X11DRV_WND_DATA *data = wndPtr->pDriverData;
371 if (data && (w = data->window))
375 XSync( gdi_display, False ); /* flush any reference to this drawable in GDI queue */
376 XDeleteContext( display, w, winContext );
377 XDestroyWindow( display, w );
378 while( XCheckWindowEvent(display, w, NoEventMask, &xe) );
382 if( data->hWMIconBitmap )
384 DeleteObject( data->hWMIconBitmap );
385 data->hWMIconBitmap = 0;
387 if( data->hWMIconMask )
389 DeleteObject( data->hWMIconMask);
390 data->hWMIconMask= 0;
393 HeapFree( GetProcessHeap(), 0, data );
394 wndPtr->pDriverData = NULL;
395 WIN_ReleaseWndPtr( wndPtr );
400 /*****************************************************************
401 * SetParent (X11DRV.@)
403 HWND X11DRV_SetParent( HWND hwnd, HWND parent )
405 Display *display = thread_display();
411 if (!(wndPtr = WIN_FindWndPtr(hwnd))) return 0;
413 dwStyle = wndPtr->dwStyle;
415 if (!parent) parent = GetDesktopWindow();
417 if (!(pWndParent = WIN_FindWndPtr(parent)))
419 WIN_ReleaseWndPtr( wndPtr );
423 /* Windows hides the window first, then shows it again
424 * including the WM_SHOWWINDOW messages and all */
425 if (dwStyle & WS_VISIBLE) ShowWindow( hwnd, SW_HIDE );
427 retvalue = wndPtr->parent->hwndSelf; /* old parent */
428 if (pWndParent != wndPtr->parent)
430 if ( X11DRV_WND_GetXWindow(wndPtr) )
432 /* Toplevel window needs to be reparented. Used by Tk 8.0 */
433 TSXDestroyWindow( display, X11DRV_WND_GetXWindow(wndPtr) );
434 ((X11DRV_WND_DATA *) wndPtr->pDriverData)->window = None;
436 WIN_UnlinkWindow(wndPtr->hwndSelf);
437 wndPtr->parent = pWndParent;
439 /* Create an X counterpart for reparented top-level windows
440 * when not in the desktop mode. */
441 if (parent == GetDesktopWindow())
443 if(root_window == DefaultRootWindow(display))
444 X11DRV_CreateWindow(wndPtr->hwndSelf);
446 else /* a child window */
448 if( !( wndPtr->dwStyle & WS_CHILD ) )
450 if( wndPtr->wIDmenu != 0)
452 DestroyMenu( (HMENU) wndPtr->wIDmenu );
457 WIN_LinkWindow(wndPtr->hwndSelf, HWND_TOP);
459 WIN_ReleaseWndPtr( pWndParent );
460 WIN_ReleaseWndPtr( wndPtr );
462 /* SetParent additionally needs to make hwnd the topmost window
463 in the x-order and send the expected WM_WINDOWPOSCHANGING and
464 WM_WINDOWPOSCHANGED notification messages.
466 SetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0,
467 SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE|
468 ((dwStyle & WS_VISIBLE)?SWP_SHOWWINDOW:0));
469 /* FIXME: a WM_MOVE is also generated (in the DefWindowProc handler
470 * for WM_WINDOWPOSCHANGED) in Windows, should probably remove SWP_NOMOVE */
476 /*******************************************************************
477 * EnableWindow (X11DRV.@)
479 BOOL X11DRV_EnableWindow( HWND hwnd, BOOL enable )
481 Display *display = thread_display();
486 if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return FALSE;
488 retvalue = ((wndPtr->dwStyle & WS_DISABLED) != 0);
490 if (enable && (wndPtr->dwStyle & WS_DISABLED))
493 wndPtr->dwStyle &= ~WS_DISABLED;
495 if ((wndPtr->dwExStyle & WS_EX_MANAGED) && (w = X11DRV_WND_GetXWindow( wndPtr )))
496 set_wm_hint( display, w, InputHint, TRUE );
498 SendMessageA( hwnd, WM_ENABLE, TRUE, 0 );
500 else if (!enable && !(wndPtr->dwStyle & WS_DISABLED))
502 SendMessageA( wndPtr->hwndSelf, WM_CANCELMODE, 0, 0 );
505 wndPtr->dwStyle |= WS_DISABLED;
507 if ((wndPtr->dwExStyle & WS_EX_MANAGED) && (w = X11DRV_WND_GetXWindow( wndPtr )))
508 set_wm_hint( display, w, InputHint, FALSE );
510 if (hwnd == GetFocus())
511 SetFocus( 0 ); /* A disabled window can't have the focus */
513 if (hwnd == GetCapture())
514 ReleaseCapture(); /* A disabled window can't capture the mouse */
516 SendMessageA( hwnd, WM_ENABLE, FALSE, 0 );
518 WIN_ReleaseWndPtr(wndPtr);
523 /*****************************************************************
524 * SetFocus (X11DRV.@)
527 * Explicit colormap management seems to work only with OLVWM.
529 void X11DRV_SetFocus( HWND hwnd )
531 Display *display = thread_display();
532 XWindowAttributes win_attr;
534 WND *wndPtr = WIN_FindWndPtr( hwnd );
539 /* Only mess with the X focus if there's */
540 /* no desktop window and if the window is not managed by the WM. */
541 if (root_window != DefaultRootWindow(display)) goto done;
543 while (w && !((X11DRV_WND_DATA *) w->pDriverData)->window)
546 if (w->dwExStyle & WS_EX_MANAGED) goto done;
548 if (!hwnd) /* If setting the focus to 0, uninstall the colormap */
550 if (X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_PRIVATE)
551 TSXUninstallColormap( display, X11DRV_PALETTE_PaletteXColormap );
553 else if ((win = X11DRV_WND_FindXWindow(wndPtr)))
555 /* Set X focus and install colormap */
556 if (TSXGetWindowAttributes( display, win, &win_attr ) &&
557 (win_attr.map_state == IsViewable))
559 /* If window is not viewable, don't change anything */
560 TSXSetInputFocus( display, win, RevertToParent, CurrentTime );
561 if (X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_PRIVATE)
562 TSXInstallColormap( display, X11DRV_PALETTE_PaletteXColormap );
563 X11DRV_Synchronize();
568 WIN_ReleaseWndPtr( wndPtr );
572 /*****************************************************************
573 * SetWindowText (X11DRV.@)
575 BOOL X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
577 Display *display = thread_display();
580 static UINT text_cp = (UINT)-1;
582 WND *wndPtr = WIN_FindWndPtr( hwnd );
584 if (!wndPtr) return FALSE;
585 if ((win = X11DRV_WND_GetXWindow(wndPtr)))
587 if (text_cp == (UINT)-1)
589 text_cp = PROFILE_GetWineIniInt("x11drv", "TextCP", CP_ACP);
590 TRACE("text_cp = %u\n", text_cp);
593 /* allocate new buffer for window text */
594 count = WideCharToMultiByte(text_cp, 0, text, -1, NULL, 0, NULL, NULL);
595 if (!(buffer = HeapAlloc( GetProcessHeap(), 0, count * sizeof(WCHAR) )))
597 ERR("Not enough memory for window text\n");
598 WIN_ReleaseWndPtr( wndPtr );
601 WideCharToMultiByte(text_cp, 0, text, -1, buffer, count, NULL, NULL);
603 TSXStoreName( display, win, buffer );
604 TSXSetIconName( display, win, buffer );
605 HeapFree( GetProcessHeap(), 0, buffer );
607 WIN_ReleaseWndPtr( wndPtr );
612 /**********************************************************************
613 * X11DRV_SetWindowIcon
615 * hIcon or hIconSm has changed (or is being initialised for the
616 * first time). Complete the X11 driver-specific initialisation
617 * and set the window hints.
619 * This is not entirely correct, may need to create
620 * an icon window and set the pixmap as a background
622 HICON X11DRV_SetWindowIcon( HWND hwnd, HICON icon, BOOL small )
624 Display *display = thread_display();
625 WND *wndPtr = WIN_FindWndPtr( hwnd );
626 int index = small ? GCL_HICONSM : GCL_HICON;
629 if (!wndPtr) return 0;
631 old = GetClassLongW( hwnd, index );
632 SetClassLongW( hwnd, index, icon );
634 SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE |
635 SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER );
637 if (wndPtr->dwExStyle & WS_EX_MANAGED)
639 Window win = X11DRV_WND_GetXWindow(wndPtr);
640 XWMHints* wm_hints = TSXGetWMHints( display, win );
642 if (!wm_hints) wm_hints = TSXAllocWMHints();
645 set_icon_hints( display, wndPtr, wm_hints );
646 TSXSetWMHints( display, win, wm_hints );
651 WIN_ReleaseWndPtr( wndPtr );
656 /*************************************************************************
659 static BOOL fix_caret(HWND hWnd, LPRECT lprc, UINT flags)
661 HWND hCaret = CARET_GetHwnd();
666 CARET_GetRect( &rc );
667 if( hCaret == hWnd ||
668 (flags & SW_SCROLLCHILDREN && IsChild(hWnd, hCaret)) )
673 MapWindowPoints( hCaret, hWnd, (LPPOINT)&rc, 2 );
674 if( IntersectRect(lprc, lprc, &rc) )
687 /*************************************************************************
688 * ScrollWindowEx (X11DRV.@)
690 INT X11DRV_ScrollWindowEx( HWND hwnd, INT dx, INT dy,
691 const RECT *rect, const RECT *clipRect,
692 HRGN hrgnUpdate, LPRECT rcUpdate, UINT flags )
694 INT retVal = NULLREGION;
695 BOOL bCaret = FALSE, bOwnRgn = TRUE;
697 WND* wnd = WIN_FindWndPtr( hwnd );
699 if( !wnd || !WIN_IsWindowDrawable( wnd, TRUE ))
705 GetClientRect(hwnd, &rc);
706 if (rect) IntersectRect(&rc, &rc, rect);
708 if (clipRect) IntersectRect(&cliprc,&rc,clipRect);
711 if (!IsRectEmpty(&cliprc) && (dx || dy))
714 BOOL bUpdate = (rcUpdate || hrgnUpdate || flags & (SW_INVALIDATE | SW_ERASE));
715 HRGN hrgnClip = CreateRectRgnIndirect(&cliprc);
716 HRGN hrgnTemp = CreateRectRgnIndirect(&rc);
719 TRACE("%04x, %d,%d hrgnUpdate=%04x rcUpdate = %p cliprc = (%d,%d-%d,%d), rc=(%d,%d-%d,%d) %04x\n",
720 (HWND16)hwnd, dx, dy, hrgnUpdate, rcUpdate,
721 clipRect?clipRect->left:0, clipRect?clipRect->top:0,
722 clipRect?clipRect->right:0, clipRect?clipRect->bottom:0,
723 rc.left, rc.top, rc.right, rc.bottom, (UINT16)flags );
726 bCaret = fix_caret(hwnd, &caretrc, flags);
728 if( hrgnUpdate ) bOwnRgn = FALSE;
729 else if( bUpdate ) hrgnUpdate = CreateRectRgn( 0, 0, 0, 0 );
731 hDC = GetDCEx( hwnd, hrgnClip, DCX_CACHE | DCX_USESTYLE |
732 DCX_KEEPCLIPRGN | DCX_INTERSECTRGN |
733 ((flags & SW_SCROLLCHILDREN) ? DCX_NOCLIPCHILDREN : 0) );
736 X11DRV_WND_SurfaceCopy(wnd,hDC,dx,dy,&rc,bUpdate);
741 if( (dc = DC_GetDCPtr(hDC)) )
743 OffsetRgn( hrgnTemp, dc->DCOrgX, dc->DCOrgY );
744 CombineRgn( hrgnTemp, hrgnTemp, dc->hVisRgn,
746 OffsetRgn( hrgnTemp, -dc->DCOrgX, -dc->DCOrgY );
747 CombineRgn( hrgnUpdate, hrgnTemp, hrgnClip,
749 OffsetRgn( hrgnTemp, dx, dy );
751 CombineRgn( hrgnUpdate, hrgnUpdate, hrgnTemp,
754 if( rcUpdate ) GetRgnBox( hrgnUpdate, rcUpdate );
755 GDI_ReleaseObj( hDC );
758 ReleaseDC(hwnd, hDC);
761 if( wnd->hrgnUpdate > 1 )
763 /* Takes into account the fact that some damages may have
764 occured during the scroll. */
765 CombineRgn( hrgnTemp, wnd->hrgnUpdate, 0, RGN_COPY );
766 OffsetRgn( hrgnTemp, dx, dy );
767 CombineRgn( hrgnTemp, hrgnTemp, hrgnClip, RGN_AND );
768 CombineRgn( wnd->hrgnUpdate, wnd->hrgnUpdate, hrgnTemp, RGN_OR );
771 if( flags & SW_SCROLLCHILDREN )
775 for( w =WIN_LockWndPtr(wnd->child); w; WIN_UpdateWndPtr(&w, w->next))
778 if( !rect || IntersectRect(&r, &r, &rc) )
779 SetWindowPos(w->hwndSelf, 0, w->rectWindow.left + dx,
780 w->rectWindow.top + dy, 0,0, SWP_NOZORDER |
781 SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOREDRAW |
786 if( flags & (SW_INVALIDATE | SW_ERASE) )
787 RedrawWindow( hwnd, NULL, hrgnUpdate, RDW_INVALIDATE | RDW_ERASE |
788 ((flags & SW_ERASE) ? RDW_ERASENOW : 0) |
789 ((flags & SW_SCROLLCHILDREN) ? RDW_ALLCHILDREN : 0 ) );
793 SetCaretPos( caretrc.left + dx, caretrc.top + dy );
797 if( bOwnRgn && hrgnUpdate ) DeleteObject( hrgnUpdate );
798 DeleteObject( hrgnClip );
799 DeleteObject( hrgnTemp );
802 WIN_ReleaseWndPtr(wnd);