Changeset 8801 for trunk/src


Ignore:
Timestamp:
Jun 28, 2002, 9:45:45 PM (23 years ago)
Author:
sandervl
Message:

Only call ProcessKbdHook from PeekMessage if PM_REMOVE flag is set (otherwise the hook will be called twice)

File:
1 edited

Legend:

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

    r8691 r8801  
    1 /* $Id: oslibmsg.cpp,v 1.57 2002-06-15 17:38:23 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.58 2002-06-28 19:45:45 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    411411        // call the keyboard hook here
    412412        // send keyboard messages to the registered hooks
    413         switch (pMsg->message)
    414         {
    415           case WINWM_KEYDOWN:
    416           case WINWM_KEYUP:
    417           case WINWM_SYSKEYDOWN:
    418           case WINWM_SYSKEYUP:
    419             // only supposed to be called upon WM_KEYDOWN
    420             // and WM_KEYUP according to docs.
    421             if(ProcessKbdHook(pMsg, fRemove))
    422                 goto continuepeekmsg;
    423             break;
     413        if(fRemove & PM_REMOVE_W) {
     414            switch (pMsg->message)
     415            {
     416            case WINWM_KEYDOWN:
     417            case WINWM_KEYUP:
     418            case WINWM_SYSKEYDOWN:
     419            case WINWM_SYSKEYUP:
     420                // only supposed to be called upon WM_KEYDOWN
     421                // and WM_KEYUP according to docs.
     422                if(ProcessKbdHook(pMsg, fRemove))
     423                    goto continuepeekmsg;
     424                break;
     425            }
    424426        }
    425427   
     
    493495
    494496    // send keyboard messages to the registered hooks
    495     switch (pMsg->message)
    496     {
    497     case WINWM_KEYDOWN:
    498     case WINWM_KEYUP:
    499     case WINWM_SYSKEYDOWN:
    500     case WINWM_SYSKEYUP:
    501         // only supposed to be called upon WM_KEYDOWN
    502         // and WM_KEYUP according to docs.
    503         if(ProcessKbdHook(pMsg, fRemove))
    504             goto continuepeekmsg;
    505         break;
     497    if(fRemove & PM_REMOVE_W) {
     498        switch (pMsg->message)
     499        {
     500        case WINWM_KEYDOWN:
     501        case WINWM_KEYUP:
     502        case WINWM_SYSKEYDOWN:
     503        case WINWM_SYSKEYUP:
     504            // only supposed to be called upon WM_KEYDOWN
     505            // and WM_KEYUP according to docs.
     506            if(ProcessKbdHook(pMsg, fRemove))
     507                goto continuepeekmsg;
     508            break;
     509        }
    506510    }
    507511
Note: See TracChangeset for help on using the changeset viewer.