Ignore:
Timestamp:
Apr 5, 2001, 11:31:28 AM (24 years ago)
Author:
sandervl
Message:

rewrote ShowCursor

File:
1 edited

Legend:

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

    r5385 r5482  
    1 /* $Id: winicon.cpp,v 1.20 2001-03-27 16:17:52 sandervl Exp $ */
     1/* $Id: winicon.cpp,v 1.21 2001-04-05 09:31:28 sandervl Exp $ */
    22/*
    33 * Win32 Icon Code for OS/2
     
    5454#include "oslibres.h"
    5555#include "oslibwin.h"
     56#include "dc.h"
    5657
    5758#define DBG_LOCALLOG    DBG_winicon
     
    410411//******************************************************************************
    411412//******************************************************************************
    412 int WIN32API ShowCursor( BOOL bShow)
     413INT OPEN32API __ShowCursor(BOOL bShow);
     414
     415inline INT _ShowCursor (BOOL bShow)
     416{
     417 INT yyrc;
     418 USHORT sel = RestoreOS2FS();
     419
     420    yyrc = __ShowCursor(bShow);
     421    SetFS(sel);
     422
     423    return yyrc;
     424}
     425//******************************************************************************
     426static int cursorshowcnt = 0;
     427//******************************************************************************
     428void RestoreCursor()
     429{
     430    dprintf2(("USER32: RestoreCursor %d", cursorshowcnt));
     431    while(cursorshowcnt != 0)
     432    {
     433        if(cursorshowcnt > 0 )
     434        {
     435            ShowCursor(FALSE);
     436        }
     437        else
     438        {
     439            ShowCursor(TRUE);
     440        }
     441    }
     442}
     443//******************************************************************************
     444//******************************************************************************
     445int WIN32API ShowCursor(BOOL bShow)
    413446{
    414447    dprintf2(("USER32: ShowCursor %d", bShow));
    415     return O32_ShowCursor(bShow);
    416 }
    417 //******************************************************************************
    418 //******************************************************************************
     448    cursorshowcnt = cursorshowcnt + ((bShow) ? 1 : -1);
     449    return _ShowCursor(bShow);
     450}
    419451/***********************************************************************
    420452 *           CreateCursorIconIndirect
Note: See TracChangeset for help on using the changeset viewer.