Ignore:
Timestamp:
Dec 18, 2011, 10:28:22 PM (14 years ago)
Author:
dmik
Message:

Merge branch gcc-kmk to trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 bin
        2 Makefile.inc
         1env.cmd
         2LocalConfig.kmk
    • Property svn:mergeinfo set to
      /branches/gcc-kmkmergedeligible
  • trunk/src/user32/window.cpp

    r21347 r21916  
    2929#include <string.h>
    3030#include <stdio.h>
    31 #include <win32wbase.h>
    32 #include <win32wmdiclient.h>
    33 #include <win32wdesktop.h>
     31#include "win32wbase.h"
     32#include "win32wmdiclient.h"
     33#include "win32wdesktop.h"
    3434#include "win32dlg.h"
    35 #include <oslibwin.h>
    36 #include <oslibgdi.h>
     35#include "oslibwin.h"
     36#include "oslibgdi.h"
    3737#include "user32.h"
    3838#include "winicon.h"
    3939#include "pmwindow.h"
    4040#include "oslibmsg.h"
    41 #include <win\winpos.h>
    42 #include <win\win.h>
     41#include <win/winpos.h>
     42#include <win/win.h>
    4343#include <heapstring.h>
    4444#include <winuser32.h>
     
    5252ODINDEBUGCHANNEL(USER32-WINDOW)
    5353
     54#ifdef __cplusplus
     55extern "C" {
     56#endif
    5457
    5558//******************************************************************************
     
    117120    else dprintf(("CreateWindowExA: window %s class %d parent %x (%d,%d) (%d,%d), %x %x menu=%x", windowName, className, parent, x, y, width, height, style, exStyle, menu));
    118121
    119     if(!strcmpi(className, MDICLIENTCLASSNAMEA)) {
     122    if(!stricmp(className, MDICLIENTCLASSNAMEA)) {
    120123        window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, FALSE);
    121124    }
    122125    else
    123     if(!strcmpi((char *) className, DIALOG_CLASS_NAMEA))
     126    if(!stricmp((char *) className, DIALOG_CLASS_NAMEA))
    124127    {
    125128      DLG_TEMPLATE dlgTemplate = {0};
     
    155158    }
    156159    HWND hwnd = window->getWindowHandle();
    157  
     160
    158161    // set myself as last active popup / window
    159162    window->setLastActive( hwnd );
    160  
     163
    161164    RELEASE_WNDOBJ(window);
    162165    return hwnd;
     
    262265    }
    263266    HWND hwnd = window->getWindowHandle();
    264  
     267
    265268    // set myself as last active popup / window
    266269    window->setLastActive( hwnd );
    267  
     270
    268271    RELEASE_WNDOBJ(window);
    269272    return hwnd;
     
    300303    }
    301304    hwndActive = window->SetActiveWindow();
    302  
     305
    303306    // check last active popup window
    304307    if (hwndActive)
     
    308311      dprintf(("support for last active popup incorrectly implemented"));
    309312    }
    310  
     313
    311314    RELEASE_WNDOBJ(window);
    312315    return hwndActive;
     
    561564    if ((nCmdShow == SW_RESTORE) && (window->getStyle() & WS_MINIMIZE) && fOS2Look )
    562565    {
    563         dprintf(("ShowWindow: Initiating OS/2 PM restore"));         
     566        dprintf(("ShowWindow: Initiating OS/2 PM restore"));
    564567        ret = OSLibWinRestoreWindow(window->getOS2FrameWindowHandle());
    565568    }
    566     else   
     569    else
    567570        ret = window->ShowWindow(nCmdShow);
    568571    RELEASE_WNDOBJ(window);
     
    720723    ret = TRUE;
    721724
    722     if(dwStyle & WS_CHILD) 
     725    if(dwStyle & WS_CHILD)
    723726    {
    724727        //check visibility of parents
     
    762765        //else no child -> no parent (GetParent returns owner otherwise!)
    763766    }
    764     else 
    765     if (type == GA_ROOT) 
     767    else
     768    if (type == GA_ROOT)
    766769    {
    767770         hwndAncestor = window->GetTopParent();
    768771    }
    769772    else
    770     if (type == GA_ROOTOWNER) 
    771     {
    772          if(hwnd != GetDesktopWindow()) 
     773    if (type == GA_ROOTOWNER)
     774    {
     775         if(hwnd != GetDesktopWindow())
    773776         {
    774777             hwndAncestor = hwnd;
     
    804807 TEB *teb;
    805808
    806     dprintf(("SetFocus %x", hwnd));   
     809    dprintf(("SetFocus %x", hwnd));
    807810    teb = GetThreadTEB();
    808811    if(teb == NULL) {
     
    929932    lpThreadInfo->hwndActive  = GetActiveWindow();
    930933    if(lpThreadInfo->hwndActive) {
    931         if(dwThreadId != GetWindowThreadProcessId(lpThreadInfo->hwndActive, NULL)) 
     934        if(dwThreadId != GetWindowThreadProcessId(lpThreadInfo->hwndActive, NULL))
    932935        {//this thread doesn't own the active window (TODO: correct??)
    933936            lpThreadInfo->hwndActive = 0;
     
    980983         windowDesktop->addRef();
    981984         window = windowDesktop;
    982     }     
     985    }
    983986    else window = Win32BaseWindow::GetWindowFromHandle(hwnd);
    984      
     987
    985988    if(!window) {
    986989        dprintf(("GetWindowRect, window %x not found", hwnd));
     
    11041107 *      InternalGetWindowText    (USER32.326)
    11051108 */
    1106 int WIN32API InternalGetWindowText(HWND hwnd, 
     1109int WIN32API InternalGetWindowText(HWND hwnd,
    11071110                                   LPWSTR lpString,
    11081111                                   INT    nMaxCount )
     
    12741277        windowDesktop->addRef();
    12751278        wndfrom = windowDesktop;
    1276     } 
     1279    }
    12771280    else {
    12781281        wndfrom = Win32BaseWindow::GetWindowFromHandle(hwndFrom);
     
    12881291        windowDesktop->addRef();
    12891292        wndto = windowDesktop;
    1290     } 
     1293    }
    12911294    else {
    12921295        wndto = Win32BaseWindow::GetWindowFromHandle(hwndTo);
     
    18871890        {
    18881891//            WND *wndPtr = WIN_FindWndPtr(hwndChild);
    1889            
     1892
    18901893//            WINPOS_ShowIconTitle( wndPtr, FALSE );
    1891                
     1894
    18921895            SetWindowPos( hwndChild, 0, x + (xspacing - GetSystemMetrics(SM_CXICON)) / 2,
    18931896                            y - yspacing - GetSystemMetrics(SM_CYICON)/2, 0, 0,
     
    20032006
    20042007  owner = Win32BaseWindow::GetWindowFromHandle(hWnd);
    2005   if(!owner) 
     2008  if(!owner)
    20062009  {
    20072010    dprintf(("GetLastActivePopup, window %x not found", hWnd));
     
    20132016  if (!IsWindow( hwndRetVal ))
    20142017    hwndRetVal = owner->getWindowHandle();
    2015  
     2018
    20162019  RELEASE_WNDOBJ(owner);
    2017  
     2020
    20182021  return hwndRetVal;
    20192022}
     
    20362039    }
    20372040    RELEASE_WNDOBJ(window);
    2038    
     2041
    20392042    return dwThreadId;
    20402043}
     
    22202223}
    22212224//******************************************************************************
    2222 //The GetWindowModuleFileName function retrieves the full path and file name of 
     2225//The GetWindowModuleFileName function retrieves the full path and file name of
    22232226//the module associated with the specified window handle.
    22242227//******************************************************************************
     
    22622265  return (FALSE);
    22632266}
     2267
     2268#ifdef __cplusplus
     2269} // extern "C"
     2270#endif
Note: See TracChangeset for help on using the changeset viewer.