Changeset 9943 for trunk/src


Ignore:
Timestamp:
Mar 27, 2003, 12:02:27 PM (22 years ago)
Author:
sandervl
Message:

Changes for window tracking (move/size) with full window dragging enabled

Location:
trunk/src/user32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/oslibwin.cpp

    r9866 r9943  
    1 /* $Id: oslibwin.cpp,v 1.140 2003-02-27 14:22:42 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.141 2003-03-27 11:02:26 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    13291329//******************************************************************************
    13301330//******************************************************************************
     1331void OSLibWinLockVisibleRegions(BOOL fLock)
     1332{
     1333    WinLockVisRegions(HWND_DESKTOP, fLock);
     1334}
     1335//******************************************************************************
     1336//******************************************************************************
  • trunk/src/user32/oslibwin.h

    r9866 r9943  
    1 /* $Id: oslibwin.h,v 1.73 2003-02-27 14:22:43 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.74 2003-03-27 11:02:26 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    344344ULONG  OSLibWinQuerySysColor(int index);
    345345
     346void   OSLibWinLockVisibleRegions(BOOL fLock);
     347
    346348#endif
    347349
     
    395397                                (((colorRef) & 0x000000FF)<<16)   )
    396398
     399
    397400#endif //__OSLIBWIN_H__
  • trunk/src/user32/wintrack.cpp

    r9001 r9943  
    4747static void draw_moving_frame( HDC hdc, RECT *rect, BOOL thickframe, DWORD hittest, BOOL fRedraw)
    4848{
     49    if(hdc == 0) {
     50        DebugInt3();
     51        return;
     52    }
    4953    if (thickframe)
    5054    {
     
    465469    capturePoint = pt;
    466470
    467 //    if (IsZoomed(hwnd) || !IsWindowVisible(hwnd) || (exstyle & WS_EX_MANAGED)) return;
    468471    if (IsZoomed(hwnd) || !IsWindowVisible(hwnd)) return;
    469472
     
    497500    }
    498501
    499       /* Get min/max info */
    500 
    501 //    WINPOS_GetMinMaxInfo( hwnd, NULL, NULL, &minTrack, &maxTrack );
     502    /* Get min/max info */
    502503    win32wnd->AdjustTrackInfo(&minTrack, &maxTrack);
    503504    GetWindowRect( hwnd, &sizingRect );
     
    539540
    540541    /* Retrieve a default cache DC (without using the window style) */
    541     hdc = GetDCEx( parent, 0, DCX_CACHE);
     542    hdc = 0;
     543    if(!DragFullWindows)
     544        hdc = GetDCEx( parent, 0, DCX_CACHE);
    542545
    543546    if( iconic ) /* create a cursor for dragging */
     
    546549        if(!hIcon) hIcon = (HICON)SendMessageA( hwnd, WM_QUERYDRAGICON, 0, 0L);
    547550        if( hIcon ) hDragCursor = hIcon;
    548 // CURSORICON_IconToCursor( hIcon, TRUE );
    549551        if( !hDragCursor ) iconic = FALSE;
    550552    }
     
    556558    SetCapture( hwnd );
    557559
     560    BOOL fMove = (wParam & 0xfff0) == SC_MOVE;
     561
    558562    //prevent the app from drawing to this window (or its children)   
    559     if(!DragFullWindows)
     563    if(!DragFullWindows || fMove)
    560564        LockWindowUpdate(hwnd);
    561565
     
    630634                if (ON_BOTTOM_BORDER(hittest)) newRect.bottom += dy;
    631635
    632 ////                if(!iconic && !DragFullWindows) draw_moving_frame( hdc, &sizingRect, thickframe, hittest, TRUE);
    633 
    634636                /* determine the hit location */
    635637                if (hittest >= HTLEFT && hittest <= HTBOTTOMRIGHT)
     
    660662                        draw_moving_frame( hdc, &newRect, thickframe, hittest, TRUE );
    661663                    else {
    662                         /* To avoid any deadlocks, all the locks on the windows
    663                            structures must be suspended before the SetWindowPos */
    664 //                        iWndsLocks = WIN_SuspendWndsLock();
     664                        if (!fMove) {
     665                            LockWindowUpdate(hwnd);
     666                        }
    665667                        SetWindowPos( hwnd, 0, newRect.left, newRect.top,
    666668                                      newRect.right - newRect.left,
    667                                       newRect.bottom - newRect.top,
     669                                      newRect.bottom - newRect.top, 
    668670                                      ((hittest == HTCAPTION ) ? SWP_NOSIZE : 0 ) |
    669671                                      ((fControl) ? (SWP_NOACTIVATE|SWP_NOZORDER) : 0));
    670 //                        WIN_RestoreWndsLock(iWndsLocks);
     672                        if (!fMove) {
     673                            LockWindowUpdate(NULL);
     674                        }
    671675                    }
    672676                }
     
    676680
    677681    //Enable window update
    678     if(!DragFullWindows)
     682    if(!DragFullWindows || fMove)
    679683        LockWindowUpdate(NULL);
    680684
     
    692696        draw_moving_frame( hdc, &lastsizingRect, thickframe, hittest, FALSE);
    693697
    694     ReleaseDC( parent, hdc );
    695 
    696 //    wine_tsx11_lock();
    697 //    XUngrabPointer( display, CurrentTime );
    698 //    if (grab)
    699 //    {
    700 //        XSync( display, False );
    701 //        XUngrabServer( display );
    702 //        XSync( display, False );
    703 //        gdi_display = old_gdi_display;
    704 //    }
    705 //    wine_tsx11_unlock();
     698    if(hdc) ReleaseDC( parent, hdc );
    706699
    707700    if (HOOK_CallHooksA( WH_CBT, HCBT_MOVESIZE, (WPARAM)hwnd, (LPARAM)&lastsizingRect )) moved = FALSE;
     
    713706    if (moved)
    714707    {
    715         /* To avoid any deadlocks, all the locks on the windows
    716            structures must be suspended before the SetWindowPos */
    717 //        iWndsLocks = WIN_SuspendWndsLock();
    718 
    719708        /* if the moving/resizing isn't canceled call SetWindowPos
    720709         * with the new position or the new size of the window
     
    739728                              ( hittest == HTCAPTION ) ? SWP_NOSIZE : 0 );
    740729        }
    741 
    742 //        WIN_RestoreWndsLock(iWndsLocks);
    743730    }
    744731    else
Note: See TracChangeset for help on using the changeset viewer.