Changeset 10102 for trunk/src


Ignore:
Timestamp:
May 16, 2003, 11:21:00 AM (22 years ago)
Author:
sandervl
Message:

PF: Eat first WM_MOUSEMOVE while menu tracking like windows does; SvL: Use our fast critical sections instead of OS/2 mutex semaphores in the timer code

Location:
trunk/src/user32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/menu.c

    r10017 r10102  
    27322732    BOOL enterIdleSent = FALSE;
    27332733#ifdef __WIN32OS2__
    2734     BOOL bSysMenu = FALSE;
     2734    BOOL bSysMenu = FALSE, bFirstMouseMove = TRUE;
    27352735#endif
    27362736
     
    29222922
    29232923#ifdef __WIN32OS2__
    2924                     if ( !fOS2Look ||
     2924                    //PF Win32 eats first mousemove to prevent auto-select of item
     2925                    //on TrackMenuPopup pressed button - verified in Win2k
     2926                    if (bFirstMouseMove)
     2927                    {
     2928                        bFirstMouseMove = FALSE;
     2929                        break;
     2930                    }
     2931
     2932                    if (!fOS2Look ||
    29252933#else
    29262934                    if ( (TWEAK_WineLook > WIN31_LOOK) ||
  • trunk/src/user32/timer.cpp

    r6269 r10102  
    1 /* $Id: timer.cpp,v 1.14 2001-07-09 18:09:13 sandervl Exp $ */
     1/* $Id: timer.cpp,v 1.15 2003-05-16 09:21:00 sandervl Exp $ */
    22
    33/*
     
    2323#include "oslibutil.h"
    2424#include "timer.h"
     25#include <odincrt.h>
    2526
    2627#define DBG_LOCALLOG    DBG_timer
     
    5253static TIMER TimersArray[NB_TIMERS];
    5354
    54 HMTX hSemTimer;
     55static CRITICAL_SECTION_OS2 timercritsect = {0};
    5556
    5657inline void EnterCriticalSection (void)
    5758{
    58    if (hSemTimer == NULLHANDLE)
    59       DosCreateMutexSem (NULL, &hSemTimer, 0L, 1);
    60    else
    61       DosRequestMutexSem (hSemTimer, SEM_INDEFINITE_WAIT);
     59   if (timercritsect.hmtxLock == 0)
     60      DosInitializeCriticalSection(&timercritsect, NULL);
     61
     62   DosEnterCriticalSection(&timercritsect);
    6263}
    6364
    6465inline void LeaveCriticalSection (void)
    6566{
    66    DosReleaseMutexSem (hSemTimer);
     67   DosLeaveCriticalSection(&timercritsect);
    6768}
    6869
Note: See TracChangeset for help on using the changeset viewer.