Changeset 223 for trunk/src


Ignore:
Timestamp:
Jun 26, 1999, 8:25:08 PM (26 years ago)
Author:
sandervl
Message:

FS changes for msg callbacks & OS2/Open32 apis

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.DEF

    r126 r223  
    1 ; $Id: KERNEL32.DEF,v 1.12 1999-06-20 10:55:35 sandervl Exp $
     1; $Id: KERNEL32.DEF,v 1.13 1999-06-26 18:24:49 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    967967   RestoreOS2TIB        = _RestoreOS2TIB@0                         @1228
    968968   SetWin32TIB          = _SetWin32TIB@0                           @1229
     969   RestoreOS2FS         = RestoreOS2FS                             @1230
  • trunk/src/kernel32/except.asm

    r123 r223  
    1 ; $Id: except.asm,v 1.4 1999-06-19 13:57:51 sandervl Exp $
     1; $Id: except.asm,v 1.5 1999-06-26 18:24:50 sandervl Exp $
    22
    33;/*
     
    181181getSS   endp
    182182
     183        PUBLIC RestoreOS2FS
     184RestoreOS2FS proc near
     185        push    150bh
     186        mov     ax, fs
     187        pop     fs
     188        ret
     189RestoreOS2FS endp
    183190CODE32          ENDS
    184191
  • trunk/src/kernel32/kernel32exp.def

    r126 r223  
    1 ; $Id: kernel32exp.def,v 1.5 1999-06-20 10:55:36 sandervl Exp $
     1; $Id: kernel32exp.def,v 1.6 1999-06-26 18:24:50 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    832832_RestoreOS2TIB@0                         @1228
    833833_SetWin32TIB@0                           @1229
     834RestoreOS2FS                             @1230
  • trunk/src/user32/wndclass.cpp

    r220 r223  
    1 /* $Id: wndclass.cpp,v 1.12 1999-06-26 15:07:01 sandervl Exp $ */
     1/* $Id: wndclass.cpp,v 1.13 1999-06-26 18:25:08 sandervl Exp $ */
    22
    33/*
     
    2525#include <nameid.h>
    2626#include <spy.h>
     27#include <wprocess.h>
    2728#include "hooks.h"
    2829
     
    7071 LRESULT rc;
    7172
     73  //Restore our FS selector
     74  SetWin32TIB();
     75
    7276  PostSpyMessage(hwnd, Msg, wParam, lParam);
    7377  switch(Msg)
     
    7579        case WM_LBUTTONDOWN:
    7680                rc = ButtonHandler(hwnd, Msg, wParam, lParam);
     81                //Restore our FS selector
     82                SetWin32TIB();
    7783
    7884                NotifyParent(hwnd, Msg, wParam, lParam);
     
    97103        case WM_RBUTTONDOWN:
    98104                rc = ButtonHandler(hwnd, Msg, wParam, lParam);
     105                //Restore our FS selector
     106                SetWin32TIB();
    99107                NotifyParent(hwnd, Msg, wParam, lParam);
     108                RestoreOS2TIB();
    100109                return rc;
    101110
     
    104113                break;
    105114  }
    106   return ButtonHandler(hwnd, Msg, wParam, lParam);
     115  rc = ButtonHandler(hwnd, Msg, wParam, lParam);
     116  RestoreOS2TIB();
     117  return rc;
    107118}
    108119//******************************************************************************
     
    827838 Win32WindowProc      *window;
    828839
     840  //Restore our FS selector
     841  SetWin32TIB();
     842
    829843  if(Msg == WM_MOUSEACTIVATE)
    830844  {
     
    839853
    840854  if(HkCBT::OS2HkCBTProc(hwnd, Msg, wParam, lParam) == TRUE) {//hook swallowed msg
     855        RestoreOS2TIB();
    841856        return(0);
    842857  }
     
    862877
    863878                        NotifyParent(hwnd, WM_CREATE, wParam, lParam);
     879                        RestoreOS2TIB();
    864880                        return(rc);
    865881
     
    898914                        break;
    899915                }
    900                 return wclass->GetWinCallback()(hwnd, Msg, wParam, lParam);
     916                rc = wclass->GetWinCallback()(hwnd, Msg, wParam, lParam);
     917                RestoreOS2TIB();
     918                return rc;
    901919        }
    902920  }
    903921  dprintf(("OS2ToWinCallback: couldn't find class procedure of window %X\n", hwnd));
     922  RestoreOS2TIB();
    904923  return(0);
    905924}
  • trunk/src/user32/wndproc.cpp

    r218 r223  
    1 /* $Id: wndproc.cpp,v 1.10 1999-06-26 14:09:45 sandervl Exp $ */
     1/* $Id: wndproc.cpp,v 1.11 1999-06-26 18:25:08 sandervl Exp $ */
    22
    33/*
     
    2121#include <wndclass.h>
    2222#include <spy.h>
     23#include <wprocess.h>
    2324#include "dlgconvert.h"
    2425#include "hooks.h"
     
    289290 LRESULT rc;
    290291
     292  //Restore our FS selector
     293  SetWin32TIB();
     294
    291295  if(Msg == WM_MOUSEACTIVATE)
    292296  {
     
    302306
    303307  if(HkCBT::OS2HkCBTProc(hwnd, Msg, wParam, lParam) == TRUE) {//hook swallowed msg
     308        RestoreOS2TIB();
    304309        return(0);
    305310  }
     
    321326        case WM_CREATE:  //Open32 isn't sending WM_NCCREATE messages!!
    322327                if(curwnd->SendMessageA(hwnd, WM_NCCREATE, 0, lParam) == 0) {
    323                        dprintf(("WM_NCCREATE returned FALSE\n"));
    324                        return(-1); //don't create window
     328                        dprintf(("WM_NCCREATE returned FALSE\n"));
     329                        RestoreOS2TIB();
     330                        return(-1); //don't create window
    325331                }
    326332       
     
    329335#if 0
    330336                if(curwnd->SendMessageA(hwnd, WM_NCCALCSIZE, 0, lParam) == 0) {
     337                        RestoreOS2TIB();
    331338                        return(-1); //don't create window
    332339                }
     
    357364                delete curwnd;
    358365        }
     366        RestoreOS2TIB();
    359367        return rc;
    360368  }
     
    370378                wnd = new Win32WindowProc(wclass->GetClassCallback(szClass));
    371379                wnd->SetWindowHandle(hwnd);
    372                 return(WndCallback(hwnd, Msg, wParam, lParam));
     380                rc = WndCallback(hwnd, Msg, wParam, lParam);
     381                RestoreOS2TIB();
     382                return rc;
    373383        }
    374384  }
    375385  dprintf(("wnd Callback, can't find window %X %d!!!!\n", hwnd, Msg));
     386  RestoreOS2TIB();
    376387  return 0;
    377388}
Note: See TracChangeset for help on using the changeset viewer.