Changeset 21543 for trunk/src


Ignore:
Timestamp:
Jan 7, 2011, 1:01:45 AM (15 years ago)
Author:
dmik
Message:

user32: Do not change the code page of the main PM thread as Odin may be attached to a foreign process (such as Firefox through the Flash plugin) which will not expect the code page change (see #24).

File:
1 edited

Legend:

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

    r21529 r21543  
    201201    hookInit(hab);
    202202
     203    // we don't want to change the code page of the main thread because it may
     204    // be a foreign thread (such as when we are dragged by the Flash plugin
     205    // into the Firefox process) which has already performed its own
     206    // initialization and does not expect the code page change
     207#if 0
    203208    BOOL rc = WinSetCp(hmq, GetDisplayCodepage());
    204209    dprintf(("InitPM: WinSetCP(%d) was %sOK", GetDisplayCodepage(), rc ? "" : "not "));
     210#endif
    205211
    206212    /* IM instace is created per message queue, that is, thread */
     
    951957            extramsg.message = WINWM_CHAR;
    952958
    953             // convert character code if needed (normally not as both
    954             // Win32ThreadProc() and InitPM() set the HMQ code page to the
    955             // Windows ANSI code page)
     959            // convert character code if needed (normally, only on the main
     960            // thread since Win32ThreadProc() sets the HMQ code page to the
     961            // Windows ANSI code page so that all threads created by Win32 API
     962            // will be already in the ANSI code page)
    956963            ULONG cpFrom = WinQueryCp(HMQ_CURRENT);
    957964            ULONG cpTo = GetDisplayCodepage();
Note: See TracChangeset for help on using the changeset viewer.