Ignore:
Timestamp:
Feb 13, 2003, 11:12:27 AM (23 years ago)
Author:
sandervl
Message:

Handle SetFocus(0) correctly: keystrokes are converted into WM_SYSKEYDOWN/(WM_SYSCHAR)/WM_SYSKEYUP messages

File:
1 edited

Legend:

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

    r9598 r9791  
    1 /* $Id: oslibmsg.cpp,v 1.64 2003-01-03 16:35:54 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.65 2003-02-13 10:12:24 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    4848#include <winscan.h>
    4949#include <winkeyboard.h>
     50#include "user32api.h"
    5051
    5152#define DBG_LOCALLOG    DBG_oslibmsg
     
    265266        teb->o.odin.fTranslated = FALSE;
    266267        memcpy(pMsg, &teb->o.odin.msgWCHAR, sizeof(MSG));
     268
     269        //After SetFocus(0), all keystrokes are converted in WM_SYS*
     270        if(pMsg->message == WINWM_CHAR && fIgnoreKeystrokes) {
     271            pMsg->message = WINWM_SYSCHAR;
     272        }
     273
    267274        teb->o.odin.os2msg.msg  = 0;
    268275        teb->o.odin.os2msg.hwnd = 0;
     
    423430        }
    424431        memcpy(pMsg, &teb->o.odin.msgWCHAR, sizeof(MSG));
     432        //After SetFocus(0), all keystrokes are converted in WM_SYS*
     433        if(pMsg->message == WINWM_CHAR && fIgnoreKeystrokes) {
     434            pMsg->message = WINWM_SYSCHAR;
     435        }
     436
    425437
    426438        if(!IsWindow(pMsg->hwnd)) {
Note: See TracChangeset for help on using the changeset viewer.