ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2009
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
23 participants
444 discussions
Start a n
N
ew thread
[tkreuzer] 44156: Don't truncate MI_MAPPING_RANGE_START to ULONG
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Nov 14 15:49:50 2009 New Revision: 44156 URL:
http://svn.reactos.org/svn/reactos?rev=44156&view=rev
Log: Don't truncate MI_MAPPING_RANGE_START to ULONG Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Sat Nov 14 15:49:50 2009 @@ -109,7 +109,7 @@ #define MI_HYPERSPACE_PTES (256 - 1) #define MI_ZERO_PTES (32) -#define MI_MAPPING_RANGE_START (ULONG)HYPER_SPACE +#define MI_MAPPING_RANGE_START (ULONG_PTR)HYPER_SPACE #define MI_MAPPING_RANGE_END (MI_MAPPING_RANGE_START + \ MI_HYPERSPACE_PTES * PAGE_SIZE) #define MI_ZERO_PTE (PMMPTE)(MI_MAPPING_RANGE_END + \
15 years, 1 month
1
0
0
0
[tkreuzer] 44155: Pass pointers to MiAddressToPte instead of integer
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Nov 14 15:45:30 2009 New Revision: 44155 URL:
http://svn.reactos.org/svn/reactos?rev=44155&view=rev
Log: Pass pointers to MiAddressToPte instead of integer Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmfault.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmfault.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] Sat Nov 14 15:45:30 2009 @@ -231,7 +231,7 @@ break; case MEMORY_AREA_SHARED_DATA: - *MiAddressToPte(USER_SHARED_DATA) = *MmSharedUserDataPte; + *MiAddressToPte((PVOID)USER_SHARED_DATA) = *MmSharedUserDataPte; Status = STATUS_SUCCESS; break;
15 years, 1 month
1
0
0
0
[fireball] 44154: - Update to Wine-1.1.33. - Merge 44153 from trunk.
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 14 12:29:19 2009 New Revision: 44154 URL:
http://svn.reactos.org/svn/reactos?rev=44154&view=rev
Log: - Update to Wine-1.1.33. - Merge 44153 from trunk. Removed: branches/arwinss/reactos/dll/win32/user32/driver16.c Modified: branches/arwinss/reactos/dll/win32/gdi32/ (props changed) branches/arwinss/reactos/dll/win32/gdi32/enhmfdrv/graphics.c branches/arwinss/reactos/dll/win32/user32/ (props changed) branches/arwinss/reactos/dll/win32/user32/Makefile.in branches/arwinss/reactos/dll/win32/user32/dde_misc.c branches/arwinss/reactos/dll/win32/user32/defdlg.c branches/arwinss/reactos/dll/win32/user32/message.c branches/arwinss/reactos/dll/win32/user32/msg16.c branches/arwinss/reactos/dll/win32/user32/nonclient.c branches/arwinss/reactos/dll/win32/user32/user32.spec branches/arwinss/reactos/dll/win32/user32/win.c branches/arwinss/reactos/dll/win32/user32/winpos.c branches/arwinss/reactos/dll/win32/winex11.drv/ (props changed) branches/arwinss/reactos/dll/win32/winex11.drv/bitblt.c branches/arwinss/reactos/dll/win32/winex11.drv/dib.c branches/arwinss/reactos/dll/win32/winex11.drv/event.c branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c branches/arwinss/reactos/dll/win32/winex11.drv/opengl.c branches/arwinss/reactos/dll/win32/winex11.drv/window.c branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c branches/arwinss/reactos/dll/win32/winex11.drv/xfont.c branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c branches/arwinss/reactos/include/psdk/ (props changed) branches/arwinss/reactos/include/psdk/commctrl.h (props changed) branches/arwinss/reactos/include/psdk/winuser.h Propchange: branches/arwinss/reactos/dll/win32/gdi32/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Nov 14 12:29:19 2009 @@ -1,3 +1,3 @@ /branches/ros-amd64-bringup/reactos/dll/win32/gdi32:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080 /trunk/reactos/dll/win32/gdi32:42000-43670 -/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708 +/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708,44151 Modified: branches/arwinss/reactos/dll/win32/gdi32/enhmfdrv/graphics.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
============================================================================== --- branches/arwinss/reactos/dll/win32/gdi32/enhmfdrv/graphics.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/gdi32/enhmfdrv/graphics.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -826,11 +826,10 @@ pemr->rclBounds.bottom = y + textHeight + 1; } } + EMFDRV_UpdateBBox( dev, &pemr->rclBounds ); no_bounds: ret = EMFDRV_WriteRecord( dev, &pemr->emr ); - if(ret) - EMFDRV_UpdateBBox( dev, &pemr->rclBounds ); HeapFree( GetProcessHeap(), 0, pemr ); return ret; } Propchange: branches/arwinss/reactos/dll/win32/user32/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Nov 14 12:29:19 2009 @@ -1,3 +1,3 @@ /branches/ros-amd64-bringup/reactos/dll/win32/user32:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080 /trunk/reactos/dll/win32/user32:42000-43670 -/vendor/wine/dlls/user32/current:43136,43149,43398,43708 +/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151 Modified: branches/arwinss/reactos/dll/win32/user32/Makefile.in URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/Makefile.in [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/Makefile.in [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -25,9 +25,7 @@ defwnd.c \ desktop.c \ dialog.c \ - dialog16.c \ driver.c \ - driver16.c \ edit.c \ exticon.c \ focus.c \ @@ -40,7 +38,6 @@ menu.c \ message.c \ misc.c \ - msg16.c \ msgbox.c \ nonclient.c \ painting.c \ @@ -63,7 +60,9 @@ C_SRCS16 = \ bidi16.c \ comm16.c \ + dialog16.c \ hook16.c \ + msg16.c \ network.c \ user16.c \ wnd16.c Modified: branches/arwinss/reactos/dll/win32/user32/dde_misc.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/dde_misc.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/dde_misc.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -380,6 +380,7 @@ pInstance->nodeList = NULL; /* node will be added later */ pInstance->monitorFlags = afCmd & MF_MASK; pInstance->wStatus = 0; + pInstance->lastError = DMLERR_NO_ERROR; pInstance->servers = NULL; pInstance->convs[0] = NULL; pInstance->convs[1] = NULL; Modified: branches/arwinss/reactos/dll/win32/user32/defdlg.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/defdlg.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/defdlg.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -23,7 +23,7 @@ #include "windef.h" #include "winbase.h" #include "wingdi.h" -#include "wine/winuser16.h" +#include "winuser.h" #include "controls.h" #include "win.h" #include "user_private.h" @@ -317,22 +317,6 @@ } /*********************************************************************** - * DEFDLG_Epilog - */ -static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, BOOL fResult) -{ - /* see SDK 3.1 */ - - if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) || - msg == WM_CTLCOLOR || msg == WM_COMPAREITEM || - msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM || - msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG) - return fResult; - - return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT ); -} - -/*********************************************************************** * DIALOG_get_info * * Get the DIALOGINFO structure of a window, allocating it if needed @@ -374,68 +358,13 @@ } /*********************************************************************** - * DefDlgProc (USER.308) - */ -#ifndef __REACTOS__ -LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, - LPARAM lParam ) -{ - DIALOGINFO *dlgInfo; - DLGPROC16 dlgproc; - HWND hwnd32 = WIN_Handle32( hwnd ); - BOOL result = FALSE; - - /* Perform DIALOGINFO initialization if not done */ - if(!(dlgInfo = DIALOG_get_info(hwnd32, TRUE))) return 0; - - SetWindowLongPtrW( hwnd32, DWLP_MSGRESULT, 0 ); - - if ((dlgproc = (DLGPROC16)DEFDLG_GetDlgProc( hwnd32 ))) /* Call dialog procedure */ - result = WINPROC_CallDlgProc16( dlgproc, hwnd, msg, wParam, lParam ); - - if (!result && IsWindow(hwnd32)) - { - /* callback didn't process this message */ - - switch(msg) - { - case WM_ERASEBKGND: - case WM_SHOWWINDOW: - case WM_ACTIVATE: - case WM_SETFOCUS: - case DM_SETDEFID: - case DM_GETDEFID: - case WM_NEXTDLGCTL: - case WM_GETFONT: - case WM_CLOSE: - case WM_NCDESTROY: - case WM_ENTERMENULOOP: - case WM_LBUTTONDOWN: - case WM_NCLBUTTONDOWN: - return DEFDLG_Proc( hwnd32, msg, (WPARAM)wParam, lParam, dlgInfo ); - case WM_INITDIALOG: - case WM_VKEYTOITEM: - case WM_COMPAREITEM: - case WM_CHARTOITEM: - break; - - default: - return DefWindowProc16( hwnd, msg, wParam, lParam ); - } - } - return DEFDLG_Epilog( hwnd32, msg, result); -} -#endif - - -/*********************************************************************** * DefDlgProcA (USER32.@) */ LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { DIALOGINFO *dlgInfo; DLGPROC dlgproc; - BOOL result = FALSE; + LRESULT result = 0; /* Perform DIALOGINFO initialization if not done */ if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return 0; @@ -475,7 +404,14 @@ return DefWindowProcA( hwnd, msg, wParam, lParam ); } } - return DEFDLG_Epilog(hwnd, msg, result); + + if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) || + msg == WM_CTLCOLOR || msg == WM_COMPAREITEM || + msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM || + msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG) + return result; + + return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT ); } @@ -485,8 +421,8 @@ LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { DIALOGINFO *dlgInfo; - BOOL result = FALSE; DLGPROC dlgproc; + LRESULT result = 0; /* Perform DIALOGINFO initialization if not done */ if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return 0; @@ -526,5 +462,12 @@ return DefWindowProcW( hwnd, msg, wParam, lParam ); } } - return DEFDLG_Epilog(hwnd, msg, result); -} + + if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) || + msg == WM_CTLCOLOR || msg == WM_COMPAREITEM || + msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM || + msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG) + return result; + + return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT ); +} Removed: branches/arwinss/reactos/dll/win32/user32/driver16.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/driver16.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/driver16.c (removed) @@ -1,440 +1,0 @@ -/* - * WINE Drivers functions - * - * Copyright 1994 Martin Ayotte - * Copyright 1998 Marcus Meissner - * Copyright 1999,2000 Eric Pouech - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * TODO: - * - LoadModule count and clean up is not handled correctly (it's not a - * problem as long as FreeLibrary is not working correctly) - */ - -#include <stdarg.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "wine/winbase16.h" -#include "wingdi.h" -#include "winuser.h" -#include "wownt32.h" -#include "mmddk.h" -#include "wine/mmsystem16.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(driver); - -typedef struct tagWINE_DRIVER -{ - char szAliasName[128]; - /* as usual LPWINE_DRIVER == hDriver32 */ - HDRVR16 hDriver16; - HMODULE16 hModule16; - DRIVERPROC16 lpDrvProc; - DWORD dwDriverID; - struct tagWINE_DRIVER* lpPrevItem; - struct tagWINE_DRIVER* lpNextItem; -} WINE_DRIVER, *LPWINE_DRIVER; - -static LPWINE_DRIVER lpDrvItemList = NULL; - - -/************************************************************************** - * LoadStartupDrivers [internal] - */ -#if 0 -static void DRIVER_LoadStartupDrivers(void) -{ - char str[256]; - - if (GetPrivateProfileStringA("drivers", NULL, "", str, sizeof(str), "SYSTEM.INI") < 2) { - ERR("Can't find drivers section in system.ini\n"); - } else { - HDRVR16 hDrv; - LPSTR ptr; - - for (ptr = str; *ptr; ptr += strlen(ptr) + 1) { - TRACE("str='%s'\n", ptr); - hDrv = OpenDriver16(ptr, "drivers", 0L); - TRACE("hDrv=%04x\n", hDrv); - } - TRACE("end of list !\n"); - } -} -#endif - -/************************************************************************** - * DRIVER_GetNumberOfModuleRefs [internal] - * - * Returns the number of open drivers which share the same module. - */ -static WORD DRIVER_GetNumberOfModuleRefs(LPWINE_DRIVER lpNewDrv) -{ - LPWINE_DRIVER lpDrv; - WORD count = 0; - - for (lpDrv = lpDrvItemList; lpDrv; lpDrv = lpDrv->lpNextItem) { - if (lpDrv->hModule16 == lpNewDrv->hModule16) { - count++; - } - } - return count; -} - -/************************************************************************** - * DRIVER_FindFromHDrvr16 [internal] - * - * From a hDrvr being 16 bits, returns the WINE internal structure. - */ -static LPWINE_DRIVER DRIVER_FindFromHDrvr16(HDRVR16 hDrvr) -{ - LPWINE_DRIVER lpDrv; - - for (lpDrv = lpDrvItemList; lpDrv; lpDrv = lpDrv->lpNextItem) { - if (lpDrv->hDriver16 == hDrvr) { - break; - } - } - return lpDrv; -} - -/************************************************************************** - * DRIVER_SendMessage [internal] - */ -static inline LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg, - LPARAM lParam1, LPARAM lParam2) -{ - WORD args[8]; - DWORD ret; - - TRACE("Before CallDriverProc proc=%p driverID=%08x wMsg=%04x p1=%08lx p2=%08lx\n", - lpDrv->lpDrvProc, lpDrv->dwDriverID, msg, lParam1, lParam2); - - args[7] = HIWORD(lpDrv->dwDriverID); - args[6] = LOWORD(lpDrv->dwDriverID); - args[5] = lpDrv->hDriver16; - args[4] = msg; - args[3] = HIWORD(lParam1); - args[2] = LOWORD(lParam1); - args[1] = HIWORD(lParam2); - args[0] = LOWORD(lParam2); - WOWCallback16Ex( (DWORD)lpDrv->lpDrvProc, WCB16_PASCAL, sizeof(args), args, &ret ); - return ret; -} - -/************************************************************************** - * SendDriverMessage (USER.251) - */ -LRESULT WINAPI SendDriverMessage16(HDRVR16 hDriver, UINT16 msg, LPARAM lParam1, - LPARAM lParam2) -{ - LPWINE_DRIVER lpDrv; - LRESULT retval = 0; - - TRACE("(%04x, %04X, %08lX, %08lX)\n", hDriver, msg, lParam1, lParam2); - - if ((lpDrv = DRIVER_FindFromHDrvr16(hDriver)) != NULL) { - retval = DRIVER_SendMessage(lpDrv, msg, lParam1, lParam2); - } else { - WARN("Bad driver handle %u\n", hDriver); - } - - TRACE("retval = %ld\n", retval); - return retval; -} - -/************************************************************************** - * DRIVER_RemoveFromList [internal] - * - * Generates all the logic to handle driver closure / deletion - * Removes a driver struct to the list of open drivers. - */ -static BOOL DRIVER_RemoveFromList(LPWINE_DRIVER lpDrv) -{ - lpDrv->dwDriverID = 0; - if (DRIVER_GetNumberOfModuleRefs(lpDrv) == 1) { - DRIVER_SendMessage(lpDrv, DRV_DISABLE, 0L, 0L); - DRIVER_SendMessage(lpDrv, DRV_FREE, 0L, 0L); - } - - if (lpDrv->lpPrevItem) - lpDrv->lpPrevItem->lpNextItem = lpDrv->lpNextItem; - else - lpDrvItemList = lpDrv->lpNextItem; - if (lpDrv->lpNextItem) - lpDrv->lpNextItem->lpPrevItem = lpDrv->lpPrevItem; - - return TRUE; -} - -/************************************************************************** - * DRIVER_AddToList [internal] - * - * Adds a driver struct to the list of open drivers. - * Generates all the logic to handle driver creation / open. - */ -static BOOL DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam1, LPARAM lParam2) -{ - /* First driver to be loaded for this module, need to load correctly the module */ - if (DRIVER_GetNumberOfModuleRefs(lpNewDrv) == 0) { - if (DRIVER_SendMessage(lpNewDrv, DRV_LOAD, 0L, 0L) != DRV_SUCCESS) { - TRACE("DRV_LOAD failed on driver %p\n", lpNewDrv); - return FALSE; - } - /* returned value is not checked */ - DRIVER_SendMessage(lpNewDrv, DRV_ENABLE, 0L, 0L); - } - - lpNewDrv->lpNextItem = NULL; - if (lpDrvItemList == NULL) { - lpDrvItemList = lpNewDrv; - lpNewDrv->lpPrevItem = NULL; - } else { - LPWINE_DRIVER lpDrv = lpDrvItemList; /* find end of list */ - while (lpDrv->lpNextItem != NULL) - lpDrv = lpDrv->lpNextItem; - - lpDrv->lpNextItem = lpNewDrv; - lpNewDrv->lpPrevItem = lpDrv; - } - /* Now just open a new instance of a driver on this module */ - lpNewDrv->dwDriverID = DRIVER_SendMessage(lpNewDrv, DRV_OPEN, lParam1, lParam2); - - if (lpNewDrv->dwDriverID == 0) { - TRACE("DRV_OPEN failed on driver %p\n", lpNewDrv); - DRIVER_RemoveFromList(lpNewDrv); - return FALSE; - } - - return TRUE; -} - -/************************************************************************** - * DRIVER_TryOpenDriver16 [internal] - * - * Tries to load a 16 bit driver whose DLL's (module) name is lpFileName. - */ -static LPWINE_DRIVER DRIVER_TryOpenDriver16(LPCSTR lpFileName, LPARAM lParam2) -{ - static WORD DRIVER_hDrvr16Counter /* = 0 */; - LPWINE_DRIVER lpDrv = NULL; - HMODULE16 hModule; - DRIVERPROC16 lpProc; - LPCSTR lpSFN; - LPSTR ptr; - - TRACE("('%s', %08lX);\n", lpFileName, lParam2); - - if (strlen(lpFileName) < 1) return lpDrv; - - if ((lpSFN = strrchr(lpFileName, '\\')) == NULL) - lpSFN = lpFileName; - else - lpSFN++; - if ((ptr = strchr(lpFileName, ' ')) != NULL) { - *ptr++ = '\0'; - while (*ptr == ' ') ptr++; - if (*ptr == '\0') ptr = NULL; - } - - if ((hModule = LoadLibrary16(lpFileName)) < 32) goto exit; - if ((lpProc = (DRIVERPROC16)GetProcAddress16(hModule, "DRIVERPROC")) == NULL) - goto exit; - - if ((lpDrv = HeapAlloc(GetProcessHeap(), 0, sizeof(WINE_DRIVER))) == NULL) - goto exit; - - lpDrv->dwDriverID = 0; - while (DRIVER_FindFromHDrvr16(++DRIVER_hDrvr16Counter)); - lpDrv->hDriver16 = DRIVER_hDrvr16Counter; - lstrcpynA(lpDrv->szAliasName, lpSFN, sizeof(lpDrv->szAliasName)); - lpDrv->hModule16 = hModule; - lpDrv->lpDrvProc = lpProc; - - if (!DRIVER_AddToList(lpDrv, (LPARAM)ptr, lParam2)) goto exit; - - return lpDrv; - exit: - TRACE("Unable to load 16 bit module (%s): %04x\n", lpFileName, hModule); - if (hModule >= 32) FreeLibrary16(hModule); - HeapFree(GetProcessHeap(), 0, lpDrv); - return NULL; -} - -/************************************************************************** - * OpenDriver (USER.252) - */ -HDRVR16 WINAPI OpenDriver16(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam2) -{ - LPWINE_DRIVER lpDrv = NULL; - char drvName[128]; - - TRACE("(%s, %s, %08lX);\n", debugstr_a(lpDriverName), debugstr_a(lpSectionName), lParam2); - - if (!lpDriverName || !*lpDriverName) return 0; - - if (lpSectionName == NULL) { - strcpy(drvName, lpDriverName); - - if ((lpDrv = DRIVER_TryOpenDriver16(drvName, lParam2))) - goto the_end; - /* in case hDriver is NULL, search in Drivers section */ - lpSectionName = "Drivers"; - } - if (GetPrivateProfileStringA(lpSectionName, lpDriverName, "", - drvName, sizeof(drvName), "SYSTEM.INI") > 0) { - lpDrv = DRIVER_TryOpenDriver16(drvName, lParam2); - } - if (!lpDrv) { - TRACE("Failed to open driver %s from system.ini file, section %s\n", debugstr_a(lpDriverName), debugstr_a(lpSectionName)); - return 0; - } - the_end: - TRACE("=> %04x / %p\n", lpDrv->hDriver16, lpDrv); - return lpDrv->hDriver16; -} - -/************************************************************************** - * CloseDriver (USER.253) - */ -LRESULT WINAPI CloseDriver16(HDRVR16 hDrvr, LPARAM lParam1, LPARAM lParam2) -{ - LPWINE_DRIVER lpDrv; - - TRACE("(%04x, %08lX, %08lX);\n", hDrvr, lParam1, lParam2); - - if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) { - DRIVER_SendMessage(lpDrv, DRV_CLOSE, lParam1, lParam2); - - if (DRIVER_RemoveFromList(lpDrv)) { - HeapFree(GetProcessHeap(), 0, lpDrv); - return TRUE; - } - } - WARN("Failed to close driver\n"); - return FALSE; -} - -/************************************************************************** - * GetDriverModuleHandle (USER.254) - */ -HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDrvr) -{ - LPWINE_DRIVER lpDrv; - HMODULE16 hModule = 0; - - TRACE("(%04x);\n", hDrvr); - - if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) { - hModule = lpDrv->hModule16; - } - TRACE("=> %04x\n", hModule); - return hModule; -} - -/************************************************************************** - * DefDriverProc (USER.255) - */ -LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg, - LPARAM lParam1, LPARAM lParam2) -{ - TRACE("devID=0x%08x hDrv=0x%04x wMsg=%04x lP1=0x%08lx lP2=0x%08lx\n", - dwDevID, hDriv, wMsg, lParam1, lParam2); - - switch(wMsg) { - case DRV_LOAD: - case DRV_FREE: - case DRV_ENABLE: - case DRV_DISABLE: - return (LRESULT)1L; - case DRV_OPEN: - case DRV_CLOSE: - case DRV_QUERYCONFIGURE: - return (LRESULT)0L; - case DRV_CONFIGURE: - MessageBoxA(0, "Driver isn't configurable !", "Wine Driver", MB_OK); - return (LRESULT)0L; - case DRV_INSTALL: - case DRV_REMOVE: - return DRV_SUCCESS; - default: - return (LRESULT)0L; - } -} - -/************************************************************************** - * GetDriverInfo (USER.256) - */ -BOOL16 WINAPI GetDriverInfo16(HDRVR16 hDrvr, LPDRIVERINFOSTRUCT16 lpDrvInfo) -{ - LPWINE_DRIVER lpDrv; - BOOL16 ret = FALSE; - - TRACE("(%04x, %p);\n", hDrvr, lpDrvInfo); - - if (lpDrvInfo == NULL || lpDrvInfo->length != sizeof(DRIVERINFOSTRUCT16)) - return FALSE; - - if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) { - lpDrvInfo->hDriver = lpDrv->hDriver16; - lpDrvInfo->hModule = lpDrv->hModule16; - lstrcpynA(lpDrvInfo->szAliasName, lpDrv->szAliasName, sizeof(lpDrvInfo->szAliasName)); - ret = TRUE; - } - - return ret; -} - -/************************************************************************** - * GetNextDriver (USER.257) - */ -HDRVR16 WINAPI GetNextDriver16(HDRVR16 hDrvr, DWORD dwFlags) -{ - HDRVR16 hRetDrv = 0; - LPWINE_DRIVER lpDrv; - - TRACE("(%04x, %08X);\n", hDrvr, dwFlags); - - if (hDrvr == 0) { - if (lpDrvItemList == NULL) { - FIXME("drivers list empty !\n"); - /* FIXME: code was using DRIVER_LoadStartupDrivers(); before ? - * I (EPP) don't quite understand this - */ - if (lpDrvItemList == NULL) - return 0; - } - lpDrv = lpDrvItemList; - if (dwFlags & GND_REVERSE) { - while (lpDrv->lpNextItem) - lpDrv = lpDrv->lpNextItem; - } - } else { - if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) { - if (dwFlags & GND_REVERSE) { - lpDrv = (lpDrv->lpPrevItem) ? lpDrv->lpPrevItem : NULL; - } else { - lpDrv = (lpDrv->lpNextItem) ? lpDrv->lpNextItem : NULL; - } - } - } - - hRetDrv = (lpDrv) ? lpDrv->hDriver16 : 0; - TRACE("return %04x !\n", hRetDrv); - return hRetDrv; -} Modified: branches/arwinss/reactos/dll/win32/user32/message.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/message.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/message.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -3367,28 +3367,6 @@ /*********************************************************************** - * UserYield (USER.332) - */ -void WINAPI UserYield16(void) -{ - DWORD count; - - /* Handle sent messages */ - process_sent_messages(); - - /* Yield */ - ReleaseThunkLock(&count); - - if (count) - { - RestoreThunkLock(count); - /* Handle sent messages again */ - process_sent_messages(); - } -} - - -/*********************************************************************** * RegisterWindowMessageA (USER32.@) * RegisterWindowMessage (USER.118) */ Modified: branches/arwinss/reactos/dll/win32/user32/msg16.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/msg16.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/msg16.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -77,6 +77,13 @@ return 0; } +static LRESULT defdlg_proc_callback( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, + LRESULT *result, void *arg ) +{ + *result = DefDlgProcA( hwnd, msg, wp, lp ); + return *result; +} + /*********************************************************************** * SendMessage (USER.111) @@ -270,6 +277,17 @@ /*********************************************************************** + * DefDlgProc (USER.308) + */ +LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam ) +{ + LRESULT result; + WINPROC_CallProc16To32A( defdlg_proc_callback, hwnd, msg, wParam, lParam, &result, 0 ); + return result; +} + + +/*********************************************************************** * PeekMessage (USER.109) */ BOOL16 WINAPI PeekMessage16( MSG16 *msg, HWND16 hwnd, @@ -506,6 +524,16 @@ /*********************************************************************** + * UserYield (USER.332) + */ +void WINAPI UserYield16(void) +{ + MSG msg; + PeekMessageW( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE ); +} + + +/*********************************************************************** * GetQueueStatus (USER.334) */ DWORD WINAPI GetQueueStatus16( UINT16 flags ) Modified: branches/arwinss/reactos/dll/win32/user32/nonclient.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/nonclient.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/nonclient.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -1630,6 +1630,11 @@ TRACE("(%p %p)\n", hwnd, tbi); + if(!tbi) { + SetLastError(ERROR_NOACCESS); + return FALSE; + } + if(tbi->cbSize != sizeof(TITLEBARINFO)) { TRACE("Invalid TITLEBARINFO size: %d\n", tbi->cbSize); SetLastError(ERROR_INVALID_PARAMETER); Modified: branches/arwinss/reactos/dll/win32/user32/user32.spec URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/user32.spec [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/user32.spec [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -776,7 +776,6 @@ # Wine extensions: Win16 functions that are needed by other dlls # @ stdcall DestroyIcon32(long long) -@ stdcall UserYield16() ################################################################ # Wine dll separation hacks, these will go away, don't use them Modified: branches/arwinss/reactos/dll/win32/user32/win.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -1847,11 +1847,13 @@ if (!GetUserObjectInformationW( GetProcessWindowStation(), UOI_FLAGS, &flags, sizeof(flags), NULL ) || (flags.dwFlags & WSF_VISIBLE)) { - static const WCHAR command_line[] = {'\\','e','x','p','l','o','r','e','r','.','e','x','e',' ','/','d','e','s','k','t','o','p',0}; + static const WCHAR explorer[] = {'\\','e','x','p','l','o','r','e','r','.','e','x','e',0}; + static const WCHAR args[] = {' ','/','d','e','s','k','t','o','p',0}; STARTUPINFOW si; PROCESS_INFORMATION pi; - WCHAR systemdir[MAX_PATH]; - WCHAR cmdline[MAX_PATH + sizeof(command_line)/sizeof(WCHAR)]; + WCHAR windir[MAX_PATH]; + WCHAR app[MAX_PATH + sizeof(explorer)/sizeof(WCHAR)]; + WCHAR cmdline[MAX_PATH + (sizeof(explorer) + sizeof(args))/sizeof(WCHAR)]; memset( &si, 0, sizeof(si) ); si.cb = sizeof(si); @@ -1860,11 +1862,13 @@ si.hStdOutput = 0; si.hStdError = GetStdHandle( STD_ERROR_HANDLE ); - GetSystemDirectoryW( systemdir, MAX_PATH ); - lstrcpyW( cmdline, systemdir ); - lstrcatW( cmdline, command_line ); - if (CreateProcessW( NULL, cmdline, NULL, NULL, FALSE, DETACHED_PROCESS, - NULL, systemdir, &si, &pi )) + GetWindowsDirectoryW( windir, MAX_PATH ); + strcpyW( app, windir ); + strcatW( app, explorer ); + strcpyW( cmdline, app ); + strcatW( cmdline, args ); + if (CreateProcessW( app, cmdline, NULL, NULL, FALSE, DETACHED_PROCESS, + NULL, windir, &si, &pi )) { TRACE( "started explorer pid %04x tid %04x\n", pi.dwProcessId, pi.dwThreadId ); WaitForInputIdle( pi.hProcess, 10000 ); Modified: branches/arwinss/reactos/dll/win32/user32/winpos.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/winpos.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/winpos.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -1057,7 +1057,7 @@ /* Revert focus to parent */ hFocus = GetFocus(); - if (hwnd == hFocus || IsChild(hwnd, hFocus)) + if (hwnd == hFocus) { HWND parent = GetAncestor(hwnd, GA_PARENT); if (parent == GetDesktopWindow()) parent = 0; Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Nov 14 12:29:19 2009 @@ -1,3 +1,3 @@ /branches/ros-amd64-bringup/reactos/dll/win32/winex11.drv:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080 /trunk/reactos/dll/win32/winex11.drv:42000-43670 -/vendor/wine/dlls/winex11.drv/current:43149,43398,43708 +/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151 Modified: branches/arwinss/reactos/dll/win32/winex11.drv/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/bitblt.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/bitblt.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -1350,6 +1350,14 @@ return TRUE; } +static BOOL same_format(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst) +{ + if (physDevSrc->depth != physDevDst->depth) return FALSE; + if (!physDevSrc->color_shifts && !physDevDst->color_shifts) return TRUE; + if (physDevSrc->color_shifts && physDevDst->color_shifts) + return !memcmp(physDevSrc->color_shifts, physDevDst->color_shifts, sizeof(ColorShifts)); + return FALSE; +} /*********************************************************************** * X11DRV_StretchBlt @@ -1446,7 +1454,7 @@ /* try client-side DIB copy */ if (!fStretch && rop == SRCCOPY && sSrc == DIB_Status_AppMod && sDst == DIB_Status_AppMod && - physDevSrc->depth == physDevDst->depth) + same_format(physDevSrc, physDevDst)) { if (client_side_dib_copy( physDevSrc, visRectSrc.left, visRectSrc.top, physDevDst, visRectDst.left, visRectDst.top, width, height )) @@ -1519,7 +1527,7 @@ } else if (OP_SRCDST(*opcode) == OP_ARGS(SRC,DST)) { - if (physDevSrc->depth == physDevDst->depth) + if (same_format(physDevSrc, physDevDst)) { wine_tsx11_lock(); XSetFunction( gdi_display, physDevDst->gc, OP_ROP(*opcode) ); Modified: branches/arwinss/reactos/dll/win32/winex11.drv/dib.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/dib.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/dib.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -4096,6 +4096,11 @@ if (!(obj_size = GetObjectW( hbitmap, sizeof(dib), &dib ))) return 0; bitmap_type = DIB_GetBitmapInfo( (BITMAPINFOHEADER*)info, &width, &tempHeight, &descr.infoBpp, &descr.compression); + if (bitmap_type == -1) + { + ERR("Invalid bitmap\n"); + return 0; + } if (physBitmap->pixmap_depth > 1) { @@ -4107,11 +4112,6 @@ palette[1] = peWhite; } - if (bitmap_type == -1) - { - ERR("Invalid bitmap\n"); - return 0; - } descr.lines = tempHeight; core_header = (bitmap_type == 0); colorPtr = (LPBYTE) info + (WORD) info->bmiHeader.biSize; Modified: branches/arwinss/reactos/dll/win32/winex11.drv/event.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/event.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/event.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -477,11 +477,13 @@ { HWND focus; Window win; + GUITHREADINFO threadinfo; TRACE( "setting foreground window to %p\n", hwnd ); SetForegroundWindow( hwnd ); - focus = GetFocus(); + GetGUIThreadInfo(0, &threadinfo); + focus = threadinfo.hwndFocus; if (focus) focus = GetAncestor( focus, GA_ROOT ); win = X11DRV_get_whole_window(focus); @@ -677,6 +679,7 @@ wine_tsx11_unlock(); } if (hwnd != GetForegroundWindow()) return; + if (root_window != DefaultRootWindow(event->display)) return; SendMessageW( hwnd, WM_CANCELMODE, 0, 0 ); /* don't reset the foreground window, if the window which is Modified: branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/keyboard.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -1684,11 +1684,29 @@ KeySym keysym; KeyCode *kcp; XKeyEvent e2; - WORD scan, vkey, OEMvkey; + WORD scan, vkey; int keyc, i, keyn, syms; char ckey[4]={0,0,0,0}; const char (*lkey)[MAIN_LEN][4]; char vkey_used[256] = { 0 }; + + /* Ranges of OEM, function key, and character virtual key codes. + * Don't include those handled specially in X11DRV_ToUnicodeEx and + * X11DRV_MapVirtualKeyEx, like VK_NUMPAD0 - VK_DIVIDE. */ + static const struct { + WORD first, last; + } vkey_ranges[] = { + { VK_OEM_1, VK_OEM_3 }, + { VK_OEM_4, VK_ICO_00 }, + { 0xe6, 0xe6 }, + { 0xe9, 0xf5 }, + { VK_OEM_NEC_EQUAL, VK_OEM_NEC_EQUAL }, + { VK_F1, VK_F24 }, + { 0x30, 0x39 }, /* VK_0 - VK_9 */ + { 0x41, 0x5a }, /* VK_A - VK_Z */ + { 0, 0 } + }; + int vkey_range; set_kbd_layout_preload_key(); @@ -1738,7 +1756,6 @@ e2.display = display; e2.state = 0; - OEMvkey = VK_OEM_8; /* next is available. */ memset(keyc2vkey, 0, sizeof(keyc2vkey)); for (keyc = min_keycode; keyc <= max_keycode; keyc++) { @@ -1855,46 +1872,65 @@ } } - if (!vkey) - { - /* Others keys: let's assign OEM virtual key codes in the allowed range, - * that is ([0xba,0xc0], [0xdb,0xe4], 0xe6 (given up) et [0xe9,0xf5]) */ - do - { - switch (++OEMvkey) - { - case 0xc1 : OEMvkey=0xdb; break; - case 0xe5 : OEMvkey=0xe9; break; - case 0xf6 : OEMvkey=0xf5; WARN("No more OEM vkey available!\n"); - } - } while (OEMvkey < 0xf5 && vkey_used[OEMvkey]); - - vkey = VKEY_IF_NOT_USED(OEMvkey); - - if (TRACE_ON(keyboard)) - { - TRACE("OEM specific virtual key %X assigned to keycode %X:\n", - OEMvkey, e2.keycode); - TRACE("("); - for (i = 0; i < keysyms_per_keycode; i += 1) - { - const char *ksname; - - keysym = XLookupKeysym(&e2, i); - ksname = XKeysymToString(keysym); - if (!ksname) - ksname = "NoSymbol"; - TRACE( "%lX (%s) ", keysym, ksname); - } - TRACE(")\n"); - } - } - if (vkey) { TRACE("keycode %04x => vkey %04x\n", e2.keycode, vkey); keyc2vkey[e2.keycode] = vkey; } + } /* for */ + + /* For any keycodes which still don't have a vkey, assign any spare + * character, function key, or OEM virtual key code. */ + vkey_range = 0; + vkey = vkey_ranges[vkey_range].first; + for (keyc = min_keycode; keyc <= max_keycode; keyc++) + { + if (keyc2vkey[keyc] & 0xff) + continue; + + e2.keycode = (KeyCode)keyc; + keysym = XLookupKeysym(&e2, 0); + if (!keysym) + continue; + + while (vkey && vkey_used[vkey]) + { + if (vkey == vkey_ranges[vkey_range].last) + { + vkey_range++; + vkey = vkey_ranges[vkey_range].first; + } + else + vkey++; + } + + if (!vkey) + { + WARN("No more vkeys available!\n"); + break; + } + + if (TRACE_ON(keyboard)) + { + TRACE("spare virtual key %X assigned to keycode %X:\n", + vkey, e2.keycode); + TRACE("("); + for (i = 0; i < keysyms_per_keycode; i += 1) + { + const char *ksname; + + keysym = XLookupKeysym(&e2, i); + ksname = XKeysymToString(keysym); + if (!ksname) + ksname = "NoSymbol"; + TRACE( "%lX (%s) ", keysym, ksname); + } + TRACE(")\n"); + } + + TRACE("keycode %04x => vkey %04x\n", e2.keycode, vkey); + keyc2vkey[e2.keycode] = vkey; + vkey_used[vkey] = 1; } /* for */ #undef VKEY_IF_NOT_USED Modified: branches/arwinss/reactos/dll/win32/winex11.drv/opengl.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/opengl.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/opengl.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -600,7 +600,7 @@ int pop; int drawattrib = 0; int nvfloatattrib = GLX_DONT_CARE; - int pixelattrib = 0; + int pixelattrib = ~0; /* The list of WGL attributes is allowed to be NULL. We don't return here for NULL * because we need to do fixups for GLX_DRAWABLE_TYPE/GLX_RENDER_TYPE/GLX_FLOAT_COMPONENTS_NV. */ @@ -756,7 +756,6 @@ ERR("trying to use WGL_render_texture Attributes without support (was %x)\n", iWGLAttr[cur]); return -1; /** error: don't support it */ } else { - PUSH2(oGLXAttr, GLX_X_RENDERABLE, pop); drawattrib |= GLX_PBUFFER_BIT; } } @@ -796,12 +795,16 @@ ++cur; } - /* Apply the OR'd drawable type bitmask now EVEN when WGL_DRAW_TO* is unset. - * It is needed in all cases because GLX_DRAWABLE_TYPE default to GLX_WINDOW_BIT. */ + /* By default glXChooseFBConfig defaults to GLX_WINDOW_BIT. wglChoosePixelFormatARB searches through + * all formats. Unless drawattrib is set to a non-zero value override it with ~0, so that pixmap and pbuffer + * formats appear as well. */ + if(!drawattrib) drawattrib = ~0; PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, drawattrib); TRACE("pAttr[?] = GLX_DRAWABLE_TYPE: %#x\n", drawattrib); - /* Set GLX_RENDER_TYPE all the time */ + /* By default glXChooseFBConfig uses GLX_RGBA_BIT as the default value. Since wglChoosePixelFormatARB + * searches in all formats we have to do the same. For this reason we set GLX_RENDER_TYPE to ~0 unless + * it is overridden. */ PUSH2(oGLXAttr, GLX_RENDER_TYPE, pixelattrib); TRACE("pAttr[?] = GLX_RENDER_TYPE: %#x\n", pixelattrib); Modified: branches/arwinss/reactos/dll/win32/winex11.drv/window.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/window.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/window.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -2026,14 +2026,11 @@ wine_tsx11_lock(); changes.stack_mode = Above; XConfigureWindow( display, data->whole_window, CWStackMode, &changes ); - if (root_window == DefaultRootWindow(display)) - { - /* we must not use CurrentTime (ICCCM), so try to use last message time instead */ - /* FIXME: this is not entirely correct */ - XSetInputFocus( display, data->whole_window, RevertToParent, - /* CurrentTime */ - GetMessageTime() - EVENT_x11_time_to_win32_time(0)); - } + /* we must not use CurrentTime (ICCCM), so try to use last message time instead */ + /* FIXME: this is not entirely correct */ + XSetInputFocus( display, data->whole_window, RevertToParent, + /* CurrentTime */ + GetMessageTime() - EVENT_x11_time_to_win32_time(0)); wine_tsx11_unlock(); } Modified: branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/x11drv_main.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -189,7 +189,8 @@ */ static inline BOOL ignore_error( Display *display, XErrorEvent *event ) { - if (event->request_code == X_SetInputFocus && event->error_code == BadMatch) return TRUE; + if (event->request_code == X_SetInputFocus && + (event->error_code == BadMatch || event->error_code == BadWindow)) return TRUE; /* ignore a number of errors on gdi display caused by creating/destroying windows */ if (display == gdi_display) Modified: branches/arwinss/reactos/dll/win32/winex11.drv/xfont.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/xfont.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/xfont.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -1852,7 +1852,7 @@ ** ** - on Red Hat systems, DISPLAY is commonly set to one of ** either 'unix:0.0' or ':0' or ':0.0'. - ** - on MacOS X systems, DISPLAY is commonly set to + ** - on Mac OS X systems, DISPLAY is commonly set to ** /tmp/foo/:0 ** ** after this code, all of the above will resolve to ':0.0'. Modified: branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -1956,9 +1956,6 @@ return FALSE; } - if ((blendfn.AlphaFormat & AC_SRC_ALPHA) && blendfn.SourceConstantAlpha != 0xff) - FIXME("Ignoring SourceConstantAlpha %d for AC_SRC_ALPHA\n", blendfn.SourceConstantAlpha); - if(dib.dsBm.bmBitsPixel != 32) { FIXME("not a 32 bpp dibsection\n"); return FALSE; @@ -1979,11 +1976,35 @@ if (blendfn.AlphaFormat & AC_SRC_ALPHA) { - for(; y >= y2; y--) + if (blendfn.SourceConstantAlpha == 0xff) { - memcpy(dstbits, (char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes + xSrc * 4, - widthSrc * 4); - dstbits += (top_down ? -1 : 1) * widthSrc; + for (; y >= y2; y--) + { + memcpy(dstbits, (char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes + xSrc * 4, + widthSrc * 4); + dstbits += (top_down ? -1 : 1) * widthSrc; + } + } + else + { + /* SourceConstantAlpha combined with source alpha */ + for (; y >= y2; y--) + { + int x; + DWORD *srcbits = (DWORD *)((char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes) + xSrc; + for (x = 0; x < widthSrc; x++) + { + DWORD argb = *srcbits++; + BYTE *s = (BYTE *) &argb; + s[0] = (s[0] * blendfn.SourceConstantAlpha) / 255; + s[1] = (s[1] * blendfn.SourceConstantAlpha) / 255; + s[2] = (s[2] * blendfn.SourceConstantAlpha) / 255; + s[3] = (s[3] * blendfn.SourceConstantAlpha) / 255; + *dstbits++ = argb; + } + if (top_down) /* we traversed the row forward so we should go back by two rows */ + dstbits -= 2 * widthSrc; + } } } else @@ -2063,21 +2084,20 @@ { /* At depths >1, the depth of physBitmap and physDev might not be the same e.g. the physbitmap might be a 16-bit DIB while the physdev uses 24-bit */ int depth = physBitmap->pixmap_depth == 1 ? 1 : physDev->depth; + const WineXRenderFormat *src_format = get_xrender_format_from_color_shifts(physBitmap->pixmap_depth, &physBitmap->pixmap_color_shifts); + const WineXRenderFormat *dst_format = get_xrender_format_from_color_shifts(physDev->depth, physDev->color_shifts); wine_tsx11_lock(); physDev->brush.pixmap = XCreatePixmap(gdi_display, root_window, width, height, depth); - /* Use XCopyArea when the physBitmap and brush.pixmap have the same depth. */ - if(physBitmap->pixmap_depth == 1 || physDev->depth == physBitmap->pixmap_depth) + /* Use XCopyArea when the physBitmap and brush.pixmap have the same format. */ + if(physBitmap->pixmap_depth == 1 || src_format->format == dst_format->format) { XCopyArea( gdi_display, physBitmap->pixmap, physDev->brush.pixmap, get_bitmap_gc(physBitmap->pixmap_depth), 0, 0, width, height, 0, 0 ); } - else /* We meed depth conversion */ - { - const WineXRenderFormat *src_format = get_xrender_format_from_color_shifts(physBitmap->pixmap_depth, &physBitmap->pixmap_color_shifts); - const WineXRenderFormat *dst_format = get_xrender_format_from_color_shifts(physDev->depth, physDev->color_shifts); - + else /* We need depth conversion */ + { Picture src_pict, dst_pict; XRenderPictureAttributes pa; pa.subwindow_mode = IncludeInferiors; @@ -2104,6 +2124,7 @@ int height = visRectDst->bottom - visRectDst->top; int x_src = physDevSrc->dc_rect.left + visRectSrc->left; int y_src = physDevSrc->dc_rect.top + visRectSrc->top; + struct xrender_info *src_info = get_xrender_info(physDevSrc); const WineXRenderFormat *dst_format = get_xrender_format_from_color_shifts(physDevDst->depth, physDevDst->color_shifts); Picture src_pict=0, dst_pict=0, mask_pict=0; @@ -2131,8 +2152,8 @@ if((physDevDst->depth == 1) && (physDevSrc->depth > 1)) return FALSE; - /* Just use traditional X copy when the depths match and we don't need stretching */ - if((physDevSrc->depth == physDevDst->depth) && !stretch) + /* Just use traditional X copy when the formats match and we don't need stretching */ + if((src_info->format->format == dst_format->format) && !stretch) { TRACE("Source and destination depth match and no stretching needed falling back to XCopyArea\n"); wine_tsx11_lock(); Propchange: branches/arwinss/reactos/include/psdk/ ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Sat Nov 14 12:29:19 2009 @@ -1,0 +1,2 @@ +/branches/ros-amd64-bringup/reactos/include/psdk:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35739,35746,35771,35789,35823,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36360,36388-36389,36570,36614,36930,37323,37434,37472,37475,37536,37820-37821,37869,37873,37990-37991,38013-38014,38148,38151,38265,38268,39151,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080,43426,43454 +/trunk/reactos/include/psdk:42000-43670,44153 Propchange: branches/arwinss/reactos/include/psdk/commctrl.h ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Nov 14 12:29:19 2009 @@ -1,2 +1,2 @@ /branches/ros-amd64-bringup/reactos/include/psdk/commctrl.h:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35739,35746,35771,35789,35823,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36360,36388-36389,36570,36614,36930,37323,37434,37472,37475,37536,37820-37821,37869,37873,37990-37991,38013-38014,38148,38151,38265,38268,39151,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080,43426,43454 -/trunk/reactos/include/psdk/commctrl.h:42000-43670,44013,44015,44019 +/trunk/reactos/include/psdk/commctrl.h:42000-43670,44013,44015,44019,44153 Modified: branches/arwinss/reactos/include/psdk/winuser.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/psdk/wi…
============================================================================== --- branches/arwinss/reactos/include/psdk/winuser.h [iso-8859-1] (original) +++ branches/arwinss/reactos/include/psdk/winuser.h [iso-8859-1] Sat Nov 14 12:29:19 2009 @@ -2254,6 +2254,8 @@ #if (_WIN32_WINNT >= 0x0500) #define VK_OEM_102 0xE2 #endif +#define VK_ICO_HELP 0xE3 /* Help key on ICO */ +#define VK_ICO_00 0xE4 /* 00 key on ICO */ #define VK_PROCESSKEY 0xE5 #if (_WIN32_WINNT >= 0x0500) #define VK_PACKET 0xE7
15 years, 1 month
1
0
0
0
[fireball] 44153: - Add VK_ICO_* codes.
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 14 12:22:29 2009 New Revision: 44153 URL:
http://svn.reactos.org/svn/reactos?rev=44153&view=rev
Log: - Add VK_ICO_* codes. Modified: trunk/reactos/include/psdk/winuser.h Modified: trunk/reactos/include/psdk/winuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winuser.h?rev…
============================================================================== --- trunk/reactos/include/psdk/winuser.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winuser.h [iso-8859-1] Sat Nov 14 12:22:29 2009 @@ -2222,6 +2222,8 @@ #if (_WIN32_WINNT >= 0x0500) #define VK_OEM_102 0xE2 #endif +#define VK_ICO_HELP 0xE3 /* Help key on ICO */ +#define VK_ICO_00 0xE4 /* 00 key on ICO */ #define VK_PROCESSKEY 0xE5 #if (_WIN32_WINNT >= 0x0500) #define VK_PACKET 0xE7
15 years, 1 month
1
0
0
0
[fireball] 44152: - Remove wineism.
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 14 12:14:44 2009 New Revision: 44152 URL:
http://svn.reactos.org/svn/reactos?rev=44152&view=rev
Log: - Remove wineism. Modified: branches/arwinss/reactos/dll/win32/user32/win.c Modified: branches/arwinss/reactos/dll/win32/user32/win.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
============================================================================== --- branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] Sat Nov 14 12:14:44 2009 @@ -1840,7 +1840,7 @@ } } SERVER_END_REQ; - +#ifndef __REACTOS__ if (!thread_info->top_window) { USEROBJECTFLAGS flags; @@ -1886,7 +1886,7 @@ } SERVER_END_REQ; } - +#endif if (!thread_info->top_window || !USER_Driver->pCreateDesktopWindow( thread_info->top_window )) ERR( "failed to create desktop window\n" );
15 years, 1 month
1
0
0
0
[fireball] 44151: - Update to Wine-1.1.33.
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 14 12:11:27 2009 New Revision: 44151 URL:
http://svn.reactos.org/svn/reactos?rev=44151&view=rev
Log: - Update to Wine-1.1.33. Removed: vendor/wine/dlls/user32/current/driver16.c Modified: vendor/wine/dlls/gdi32/current/enhmfdrv/graphics.c vendor/wine/dlls/gdi32/current/tests/metafile.c vendor/wine/dlls/user32/current/Makefile.in vendor/wine/dlls/user32/current/dde_misc.c vendor/wine/dlls/user32/current/defdlg.c vendor/wine/dlls/user32/current/message.c vendor/wine/dlls/user32/current/msg16.c vendor/wine/dlls/user32/current/nonclient.c vendor/wine/dlls/user32/current/tests/win.c vendor/wine/dlls/user32/current/user16.c vendor/wine/dlls/user32/current/user32.spec vendor/wine/dlls/user32/current/user_main.c vendor/wine/dlls/user32/current/win.c vendor/wine/dlls/user32/current/winpos.c vendor/wine/dlls/winex11.drv/current/bitblt.c vendor/wine/dlls/winex11.drv/current/dib.c vendor/wine/dlls/winex11.drv/current/event.c vendor/wine/dlls/winex11.drv/current/keyboard.c vendor/wine/dlls/winex11.drv/current/opengl.c vendor/wine/dlls/winex11.drv/current/window.c vendor/wine/dlls/winex11.drv/current/x11drv_main.c vendor/wine/dlls/winex11.drv/current/xfont.c vendor/wine/dlls/winex11.drv/current/xrender.c vendor/wine/server/current/fd.c vendor/wine/server/current/protocol.def vendor/wine/server/current/request.h vendor/wine/server/current/trace.c Modified: vendor/wine/dlls/gdi32/current/enhmfdrv/graphics.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/gdi32/current/enhmfdrv/…
============================================================================== --- vendor/wine/dlls/gdi32/current/enhmfdrv/graphics.c [iso-8859-1] (original) +++ vendor/wine/dlls/gdi32/current/enhmfdrv/graphics.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -826,11 +826,10 @@ pemr->rclBounds.bottom = y + textHeight + 1; } } + EMFDRV_UpdateBBox( dev, &pemr->rclBounds ); no_bounds: ret = EMFDRV_WriteRecord( dev, &pemr->emr ); - if(ret) - EMFDRV_UpdateBBox( dev, &pemr->rclBounds ); HeapFree( GetProcessHeap(), 0, pemr ); return ret; } Modified: vendor/wine/dlls/gdi32/current/tests/metafile.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/gdi32/current/tests/met…
============================================================================== --- vendor/wine/dlls/gdi32/current/tests/metafile.c [iso-8859-1] (original) +++ vendor/wine/dlls/gdi32/current/tests/metafile.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1953,8 +1953,11 @@ SetRect(&rc_sclip, 100, 100, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom); SelectClipRgn(hdc, hrgn); - GetClipBox(hdc, &rc_res); - todo_wine ok(EqualRect(&rc_res, &rc_sclip), + ret = GetClipBox(hdc, &rc_res); +todo_wine + ok(ret == SIMPLEREGION, "got %d\n", ret); + if(ret == SIMPLEREGION) + ok(EqualRect(&rc_res, &rc_sclip), "expected rc_res (%d, %d) - (%d, %d), got (%d, %d) - (%d, %d)\n", rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom, rc_res.left, rc_res.top, rc_res.right, rc_res.bottom); Modified: vendor/wine/dlls/user32/current/Makefile.in URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/Makefile…
============================================================================== --- vendor/wine/dlls/user32/current/Makefile.in [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/Makefile.in [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -25,9 +25,7 @@ defwnd.c \ desktop.c \ dialog.c \ - dialog16.c \ driver.c \ - driver16.c \ edit.c \ exticon.c \ focus.c \ @@ -40,7 +38,6 @@ menu.c \ message.c \ misc.c \ - msg16.c \ msgbox.c \ nonclient.c \ painting.c \ @@ -63,7 +60,9 @@ C_SRCS16 = \ bidi16.c \ comm16.c \ + dialog16.c \ hook16.c \ + msg16.c \ network.c \ user16.c \ wnd16.c Modified: vendor/wine/dlls/user32/current/dde_misc.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/dde_misc…
============================================================================== --- vendor/wine/dlls/user32/current/dde_misc.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/dde_misc.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -380,6 +380,7 @@ pInstance->nodeList = NULL; /* node will be added later */ pInstance->monitorFlags = afCmd & MF_MASK; pInstance->wStatus = 0; + pInstance->lastError = DMLERR_NO_ERROR; pInstance->servers = NULL; pInstance->convs[0] = NULL; pInstance->convs[1] = NULL; Modified: vendor/wine/dlls/user32/current/defdlg.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/defdlg.c…
============================================================================== --- vendor/wine/dlls/user32/current/defdlg.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/defdlg.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -23,7 +23,7 @@ #include "windef.h" #include "winbase.h" #include "wingdi.h" -#include "wine/winuser16.h" +#include "winuser.h" #include "controls.h" #include "win.h" #include "user_private.h" @@ -317,22 +317,6 @@ } /*********************************************************************** - * DEFDLG_Epilog - */ -static LRESULT DEFDLG_Epilog(HWND hwnd, UINT msg, BOOL fResult) -{ - /* see SDK 3.1 */ - - if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) || - msg == WM_CTLCOLOR || msg == WM_COMPAREITEM || - msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM || - msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG) - return fResult; - - return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT ); -} - -/*********************************************************************** * DIALOG_get_info * * Get the DIALOGINFO structure of a window, allocating it if needed @@ -374,66 +358,13 @@ } /*********************************************************************** - * DefDlgProc (USER.308) - */ -LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, - LPARAM lParam ) -{ - DIALOGINFO *dlgInfo; - DLGPROC16 dlgproc; - HWND hwnd32 = WIN_Handle32( hwnd ); - BOOL result = FALSE; - - /* Perform DIALOGINFO initialization if not done */ - if(!(dlgInfo = DIALOG_get_info(hwnd32, TRUE))) return 0; - - SetWindowLongPtrW( hwnd32, DWLP_MSGRESULT, 0 ); - - if ((dlgproc = (DLGPROC16)DEFDLG_GetDlgProc( hwnd32 ))) /* Call dialog procedure */ - result = WINPROC_CallDlgProc16( dlgproc, hwnd, msg, wParam, lParam ); - - if (!result && IsWindow(hwnd32)) - { - /* callback didn't process this message */ - - switch(msg) - { - case WM_ERASEBKGND: - case WM_SHOWWINDOW: - case WM_ACTIVATE: - case WM_SETFOCUS: - case DM_SETDEFID: - case DM_GETDEFID: - case WM_NEXTDLGCTL: - case WM_GETFONT: - case WM_CLOSE: - case WM_NCDESTROY: - case WM_ENTERMENULOOP: - case WM_LBUTTONDOWN: - case WM_NCLBUTTONDOWN: - return DEFDLG_Proc( hwnd32, msg, (WPARAM)wParam, lParam, dlgInfo ); - case WM_INITDIALOG: - case WM_VKEYTOITEM: - case WM_COMPAREITEM: - case WM_CHARTOITEM: - break; - - default: - return DefWindowProc16( hwnd, msg, wParam, lParam ); - } - } - return DEFDLG_Epilog( hwnd32, msg, result); -} - - -/*********************************************************************** * DefDlgProcA (USER32.@) */ LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { DIALOGINFO *dlgInfo; DLGPROC dlgproc; - BOOL result = FALSE; + LRESULT result = 0; /* Perform DIALOGINFO initialization if not done */ if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return 0; @@ -473,7 +404,14 @@ return DefWindowProcA( hwnd, msg, wParam, lParam ); } } - return DEFDLG_Epilog(hwnd, msg, result); + + if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) || + msg == WM_CTLCOLOR || msg == WM_COMPAREITEM || + msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM || + msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG) + return result; + + return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT ); } @@ -483,8 +421,8 @@ LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { DIALOGINFO *dlgInfo; - BOOL result = FALSE; DLGPROC dlgproc; + LRESULT result = 0; /* Perform DIALOGINFO initialization if not done */ if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return 0; @@ -524,5 +462,12 @@ return DefWindowProcW( hwnd, msg, wParam, lParam ); } } - return DEFDLG_Epilog(hwnd, msg, result); -} + + if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) || + msg == WM_CTLCOLOR || msg == WM_COMPAREITEM || + msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM || + msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG) + return result; + + return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT ); +} Removed: vendor/wine/dlls/user32/current/driver16.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/driver16…
============================================================================== --- vendor/wine/dlls/user32/current/driver16.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/driver16.c (removed) @@ -1,440 +1,0 @@ -/* - * WINE Drivers functions - * - * Copyright 1994 Martin Ayotte - * Copyright 1998 Marcus Meissner - * Copyright 1999,2000 Eric Pouech - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * TODO: - * - LoadModule count and clean up is not handled correctly (it's not a - * problem as long as FreeLibrary is not working correctly) - */ - -#include <stdarg.h> -#include <string.h> - -#include "windef.h" -#include "winbase.h" -#include "wine/winbase16.h" -#include "wingdi.h" -#include "winuser.h" -#include "wownt32.h" -#include "mmddk.h" -#include "wine/mmsystem16.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(driver); - -typedef struct tagWINE_DRIVER -{ - char szAliasName[128]; - /* as usual LPWINE_DRIVER == hDriver32 */ - HDRVR16 hDriver16; - HMODULE16 hModule16; - DRIVERPROC16 lpDrvProc; - DWORD dwDriverID; - struct tagWINE_DRIVER* lpPrevItem; - struct tagWINE_DRIVER* lpNextItem; -} WINE_DRIVER, *LPWINE_DRIVER; - -static LPWINE_DRIVER lpDrvItemList = NULL; - - -/************************************************************************** - * LoadStartupDrivers [internal] - */ -#if 0 -static void DRIVER_LoadStartupDrivers(void) -{ - char str[256]; - - if (GetPrivateProfileStringA("drivers", NULL, "", str, sizeof(str), "SYSTEM.INI") < 2) { - ERR("Can't find drivers section in system.ini\n"); - } else { - HDRVR16 hDrv; - LPSTR ptr; - - for (ptr = str; *ptr; ptr += strlen(ptr) + 1) { - TRACE("str='%s'\n", ptr); - hDrv = OpenDriver16(ptr, "drivers", 0L); - TRACE("hDrv=%04x\n", hDrv); - } - TRACE("end of list !\n"); - } -} -#endif - -/************************************************************************** - * DRIVER_GetNumberOfModuleRefs [internal] - * - * Returns the number of open drivers which share the same module. - */ -static WORD DRIVER_GetNumberOfModuleRefs(LPWINE_DRIVER lpNewDrv) -{ - LPWINE_DRIVER lpDrv; - WORD count = 0; - - for (lpDrv = lpDrvItemList; lpDrv; lpDrv = lpDrv->lpNextItem) { - if (lpDrv->hModule16 == lpNewDrv->hModule16) { - count++; - } - } - return count; -} - -/************************************************************************** - * DRIVER_FindFromHDrvr16 [internal] - * - * From a hDrvr being 16 bits, returns the WINE internal structure. - */ -static LPWINE_DRIVER DRIVER_FindFromHDrvr16(HDRVR16 hDrvr) -{ - LPWINE_DRIVER lpDrv; - - for (lpDrv = lpDrvItemList; lpDrv; lpDrv = lpDrv->lpNextItem) { - if (lpDrv->hDriver16 == hDrvr) { - break; - } - } - return lpDrv; -} - -/************************************************************************** - * DRIVER_SendMessage [internal] - */ -static inline LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg, - LPARAM lParam1, LPARAM lParam2) -{ - WORD args[8]; - DWORD ret; - - TRACE("Before CallDriverProc proc=%p driverID=%08x wMsg=%04x p1=%08lx p2=%08lx\n", - lpDrv->lpDrvProc, lpDrv->dwDriverID, msg, lParam1, lParam2); - - args[7] = HIWORD(lpDrv->dwDriverID); - args[6] = LOWORD(lpDrv->dwDriverID); - args[5] = lpDrv->hDriver16; - args[4] = msg; - args[3] = HIWORD(lParam1); - args[2] = LOWORD(lParam1); - args[1] = HIWORD(lParam2); - args[0] = LOWORD(lParam2); - WOWCallback16Ex( (DWORD)lpDrv->lpDrvProc, WCB16_PASCAL, sizeof(args), args, &ret ); - return ret; -} - -/************************************************************************** - * SendDriverMessage (USER.251) - */ -LRESULT WINAPI SendDriverMessage16(HDRVR16 hDriver, UINT16 msg, LPARAM lParam1, - LPARAM lParam2) -{ - LPWINE_DRIVER lpDrv; - LRESULT retval = 0; - - TRACE("(%04x, %04X, %08lX, %08lX)\n", hDriver, msg, lParam1, lParam2); - - if ((lpDrv = DRIVER_FindFromHDrvr16(hDriver)) != NULL) { - retval = DRIVER_SendMessage(lpDrv, msg, lParam1, lParam2); - } else { - WARN("Bad driver handle %u\n", hDriver); - } - - TRACE("retval = %ld\n", retval); - return retval; -} - -/************************************************************************** - * DRIVER_RemoveFromList [internal] - * - * Generates all the logic to handle driver closure / deletion - * Removes a driver struct to the list of open drivers. - */ -static BOOL DRIVER_RemoveFromList(LPWINE_DRIVER lpDrv) -{ - lpDrv->dwDriverID = 0; - if (DRIVER_GetNumberOfModuleRefs(lpDrv) == 1) { - DRIVER_SendMessage(lpDrv, DRV_DISABLE, 0L, 0L); - DRIVER_SendMessage(lpDrv, DRV_FREE, 0L, 0L); - } - - if (lpDrv->lpPrevItem) - lpDrv->lpPrevItem->lpNextItem = lpDrv->lpNextItem; - else - lpDrvItemList = lpDrv->lpNextItem; - if (lpDrv->lpNextItem) - lpDrv->lpNextItem->lpPrevItem = lpDrv->lpPrevItem; - - return TRUE; -} - -/************************************************************************** - * DRIVER_AddToList [internal] - * - * Adds a driver struct to the list of open drivers. - * Generates all the logic to handle driver creation / open. - */ -static BOOL DRIVER_AddToList(LPWINE_DRIVER lpNewDrv, LPARAM lParam1, LPARAM lParam2) -{ - /* First driver to be loaded for this module, need to load correctly the module */ - if (DRIVER_GetNumberOfModuleRefs(lpNewDrv) == 0) { - if (DRIVER_SendMessage(lpNewDrv, DRV_LOAD, 0L, 0L) != DRV_SUCCESS) { - TRACE("DRV_LOAD failed on driver %p\n", lpNewDrv); - return FALSE; - } - /* returned value is not checked */ - DRIVER_SendMessage(lpNewDrv, DRV_ENABLE, 0L, 0L); - } - - lpNewDrv->lpNextItem = NULL; - if (lpDrvItemList == NULL) { - lpDrvItemList = lpNewDrv; - lpNewDrv->lpPrevItem = NULL; - } else { - LPWINE_DRIVER lpDrv = lpDrvItemList; /* find end of list */ - while (lpDrv->lpNextItem != NULL) - lpDrv = lpDrv->lpNextItem; - - lpDrv->lpNextItem = lpNewDrv; - lpNewDrv->lpPrevItem = lpDrv; - } - /* Now just open a new instance of a driver on this module */ - lpNewDrv->dwDriverID = DRIVER_SendMessage(lpNewDrv, DRV_OPEN, lParam1, lParam2); - - if (lpNewDrv->dwDriverID == 0) { - TRACE("DRV_OPEN failed on driver %p\n", lpNewDrv); - DRIVER_RemoveFromList(lpNewDrv); - return FALSE; - } - - return TRUE; -} - -/************************************************************************** - * DRIVER_TryOpenDriver16 [internal] - * - * Tries to load a 16 bit driver whose DLL's (module) name is lpFileName. - */ -static LPWINE_DRIVER DRIVER_TryOpenDriver16(LPCSTR lpFileName, LPARAM lParam2) -{ - static WORD DRIVER_hDrvr16Counter /* = 0 */; - LPWINE_DRIVER lpDrv = NULL; - HMODULE16 hModule; - DRIVERPROC16 lpProc; - LPCSTR lpSFN; - LPSTR ptr; - - TRACE("('%s', %08lX);\n", lpFileName, lParam2); - - if (strlen(lpFileName) < 1) return lpDrv; - - if ((lpSFN = strrchr(lpFileName, '\\')) == NULL) - lpSFN = lpFileName; - else - lpSFN++; - if ((ptr = strchr(lpFileName, ' ')) != NULL) { - *ptr++ = '\0'; - while (*ptr == ' ') ptr++; - if (*ptr == '\0') ptr = NULL; - } - - if ((hModule = LoadLibrary16(lpFileName)) < 32) goto exit; - if ((lpProc = (DRIVERPROC16)GetProcAddress16(hModule, "DRIVERPROC")) == NULL) - goto exit; - - if ((lpDrv = HeapAlloc(GetProcessHeap(), 0, sizeof(WINE_DRIVER))) == NULL) - goto exit; - - lpDrv->dwDriverID = 0; - while (DRIVER_FindFromHDrvr16(++DRIVER_hDrvr16Counter)); - lpDrv->hDriver16 = DRIVER_hDrvr16Counter; - lstrcpynA(lpDrv->szAliasName, lpSFN, sizeof(lpDrv->szAliasName)); - lpDrv->hModule16 = hModule; - lpDrv->lpDrvProc = lpProc; - - if (!DRIVER_AddToList(lpDrv, (LPARAM)ptr, lParam2)) goto exit; - - return lpDrv; - exit: - TRACE("Unable to load 16 bit module (%s): %04x\n", lpFileName, hModule); - if (hModule >= 32) FreeLibrary16(hModule); - HeapFree(GetProcessHeap(), 0, lpDrv); - return NULL; -} - -/************************************************************************** - * OpenDriver (USER.252) - */ -HDRVR16 WINAPI OpenDriver16(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam2) -{ - LPWINE_DRIVER lpDrv = NULL; - char drvName[128]; - - TRACE("(%s, %s, %08lX);\n", debugstr_a(lpDriverName), debugstr_a(lpSectionName), lParam2); - - if (!lpDriverName || !*lpDriverName) return 0; - - if (lpSectionName == NULL) { - strcpy(drvName, lpDriverName); - - if ((lpDrv = DRIVER_TryOpenDriver16(drvName, lParam2))) - goto the_end; - /* in case hDriver is NULL, search in Drivers section */ - lpSectionName = "Drivers"; - } - if (GetPrivateProfileStringA(lpSectionName, lpDriverName, "", - drvName, sizeof(drvName), "SYSTEM.INI") > 0) { - lpDrv = DRIVER_TryOpenDriver16(drvName, lParam2); - } - if (!lpDrv) { - TRACE("Failed to open driver %s from system.ini file, section %s\n", debugstr_a(lpDriverName), debugstr_a(lpSectionName)); - return 0; - } - the_end: - TRACE("=> %04x / %p\n", lpDrv->hDriver16, lpDrv); - return lpDrv->hDriver16; -} - -/************************************************************************** - * CloseDriver (USER.253) - */ -LRESULT WINAPI CloseDriver16(HDRVR16 hDrvr, LPARAM lParam1, LPARAM lParam2) -{ - LPWINE_DRIVER lpDrv; - - TRACE("(%04x, %08lX, %08lX);\n", hDrvr, lParam1, lParam2); - - if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) { - DRIVER_SendMessage(lpDrv, DRV_CLOSE, lParam1, lParam2); - - if (DRIVER_RemoveFromList(lpDrv)) { - HeapFree(GetProcessHeap(), 0, lpDrv); - return TRUE; - } - } - WARN("Failed to close driver\n"); - return FALSE; -} - -/************************************************************************** - * GetDriverModuleHandle (USER.254) - */ -HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDrvr) -{ - LPWINE_DRIVER lpDrv; - HMODULE16 hModule = 0; - - TRACE("(%04x);\n", hDrvr); - - if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) { - hModule = lpDrv->hModule16; - } - TRACE("=> %04x\n", hModule); - return hModule; -} - -/************************************************************************** - * DefDriverProc (USER.255) - */ -LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg, - LPARAM lParam1, LPARAM lParam2) -{ - TRACE("devID=0x%08x hDrv=0x%04x wMsg=%04x lP1=0x%08lx lP2=0x%08lx\n", - dwDevID, hDriv, wMsg, lParam1, lParam2); - - switch(wMsg) { - case DRV_LOAD: - case DRV_FREE: - case DRV_ENABLE: - case DRV_DISABLE: - return (LRESULT)1L; - case DRV_OPEN: - case DRV_CLOSE: - case DRV_QUERYCONFIGURE: - return (LRESULT)0L; - case DRV_CONFIGURE: - MessageBoxA(0, "Driver isn't configurable !", "Wine Driver", MB_OK); - return (LRESULT)0L; - case DRV_INSTALL: - case DRV_REMOVE: - return DRV_SUCCESS; - default: - return (LRESULT)0L; - } -} - -/************************************************************************** - * GetDriverInfo (USER.256) - */ -BOOL16 WINAPI GetDriverInfo16(HDRVR16 hDrvr, LPDRIVERINFOSTRUCT16 lpDrvInfo) -{ - LPWINE_DRIVER lpDrv; - BOOL16 ret = FALSE; - - TRACE("(%04x, %p);\n", hDrvr, lpDrvInfo); - - if (lpDrvInfo == NULL || lpDrvInfo->length != sizeof(DRIVERINFOSTRUCT16)) - return FALSE; - - if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) { - lpDrvInfo->hDriver = lpDrv->hDriver16; - lpDrvInfo->hModule = lpDrv->hModule16; - lstrcpynA(lpDrvInfo->szAliasName, lpDrv->szAliasName, sizeof(lpDrvInfo->szAliasName)); - ret = TRUE; - } - - return ret; -} - -/************************************************************************** - * GetNextDriver (USER.257) - */ -HDRVR16 WINAPI GetNextDriver16(HDRVR16 hDrvr, DWORD dwFlags) -{ - HDRVR16 hRetDrv = 0; - LPWINE_DRIVER lpDrv; - - TRACE("(%04x, %08X);\n", hDrvr, dwFlags); - - if (hDrvr == 0) { - if (lpDrvItemList == NULL) { - FIXME("drivers list empty !\n"); - /* FIXME: code was using DRIVER_LoadStartupDrivers(); before ? - * I (EPP) don't quite understand this - */ - if (lpDrvItemList == NULL) - return 0; - } - lpDrv = lpDrvItemList; - if (dwFlags & GND_REVERSE) { - while (lpDrv->lpNextItem) - lpDrv = lpDrv->lpNextItem; - } - } else { - if ((lpDrv = DRIVER_FindFromHDrvr16(hDrvr)) != NULL) { - if (dwFlags & GND_REVERSE) { - lpDrv = (lpDrv->lpPrevItem) ? lpDrv->lpPrevItem : NULL; - } else { - lpDrv = (lpDrv->lpNextItem) ? lpDrv->lpNextItem : NULL; - } - } - } - - hRetDrv = (lpDrv) ? lpDrv->hDriver16 : 0; - TRACE("return %04x !\n", hRetDrv); - return hRetDrv; -} Modified: vendor/wine/dlls/user32/current/message.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/message.…
============================================================================== --- vendor/wine/dlls/user32/current/message.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/message.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -3365,28 +3365,6 @@ /*********************************************************************** - * UserYield (USER.332) - */ -void WINAPI UserYield16(void) -{ - DWORD count; - - /* Handle sent messages */ - process_sent_messages(); - - /* Yield */ - ReleaseThunkLock(&count); - - if (count) - { - RestoreThunkLock(count); - /* Handle sent messages again */ - process_sent_messages(); - } -} - - -/*********************************************************************** * RegisterWindowMessageA (USER32.@) * RegisterWindowMessage (USER.118) */ Modified: vendor/wine/dlls/user32/current/msg16.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/msg16.c?…
============================================================================== --- vendor/wine/dlls/user32/current/msg16.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/msg16.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -77,6 +77,13 @@ return 0; } +static LRESULT defdlg_proc_callback( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, + LRESULT *result, void *arg ) +{ + *result = DefDlgProcA( hwnd, msg, wp, lp ); + return *result; +} + /*********************************************************************** * SendMessage (USER.111) @@ -270,6 +277,17 @@ /*********************************************************************** + * DefDlgProc (USER.308) + */ +LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam ) +{ + LRESULT result; + WINPROC_CallProc16To32A( defdlg_proc_callback, hwnd, msg, wParam, lParam, &result, 0 ); + return result; +} + + +/*********************************************************************** * PeekMessage (USER.109) */ BOOL16 WINAPI PeekMessage16( MSG16 *msg, HWND16 hwnd, @@ -506,6 +524,16 @@ /*********************************************************************** + * UserYield (USER.332) + */ +void WINAPI UserYield16(void) +{ + MSG msg; + PeekMessageW( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE ); +} + + +/*********************************************************************** * GetQueueStatus (USER.334) */ DWORD WINAPI GetQueueStatus16( UINT16 flags ) Modified: vendor/wine/dlls/user32/current/nonclient.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/nonclien…
============================================================================== --- vendor/wine/dlls/user32/current/nonclient.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/nonclient.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1630,6 +1630,11 @@ TRACE("(%p %p)\n", hwnd, tbi); + if(!tbi) { + SetLastError(ERROR_NOACCESS); + return FALSE; + } + if(tbi->cbSize != sizeof(TITLEBARINFO)) { TRACE("Invalid TITLEBARINFO size: %d\n", tbi->cbSize); SetLastError(ERROR_INVALID_PARAMETER); Modified: vendor/wine/dlls/user32/current/tests/win.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/tests/wi…
============================================================================== --- vendor/wine/dlls/user32/current/tests/win.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/tests/win.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -2298,7 +2298,7 @@ static void test_SetFocus(HWND hwnd) { - HWND child; + HWND child, child2; WNDPROC old_wnd_proc; /* check if we can set focus to non-visible windows */ @@ -2325,6 +2325,14 @@ ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child ); ok( GetFocus() == hwnd, "Focus should be on parent %p, not %p\n", hwnd, GetFocus() ); ShowWindow(child, SW_SHOW); + child2 = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 0, 0, child, 0, 0, NULL); + assert(child2); + ShowWindow(child2, SW_SHOW); + SetFocus(child2); + ShowWindow(child, SW_HIDE); + ok( !(GetWindowLong(child,GWL_STYLE) & WS_VISIBLE), "Child %p is visible\n", child ); + ok( GetFocus() == child2, "Focus should be on %p, not %p\n", child2, GetFocus() ); + ShowWindow(child, SW_SHOW); SetFocus(child); ok( GetFocus() == child, "Focus should be on child %p\n", child ); SetWindowPos(child,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_HIDEWINDOW); @@ -2368,6 +2376,7 @@ SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)old_wnd_proc); + DestroyWindow( child2 ); DestroyWindow( child ); } Modified: vendor/wine/dlls/user32/current/user16.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/user16.c…
============================================================================== --- vendor/wine/dlls/user32/current/user16.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/user16.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -943,6 +943,80 @@ UINT16 WINAPI GetMenuState16( HMENU16 hMenu, UINT16 wItemID, UINT16 wFlags ) { return GetMenuState( HMENU_32(hMenu), wItemID, wFlags ); +} + + +/************************************************************************** + * SendDriverMessage (USER.251) + */ +LRESULT WINAPI SendDriverMessage16(HDRVR16 hDriver, UINT16 msg, LPARAM lParam1, + LPARAM lParam2) +{ + FIXME("(%04x, %04x, %08lx, %08lx): stub\n", hDriver, msg, lParam1, lParam2); + return 0; +} + + +/************************************************************************** + * OpenDriver (USER.252) + */ +HDRVR16 WINAPI OpenDriver16(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lParam2) +{ + FIXME( "(%s, %s, %08lx): stub\n", debugstr_a(lpDriverName), debugstr_a(lpSectionName), lParam2); + return 0; +} + + +/************************************************************************** + * CloseDriver (USER.253) + */ +LRESULT WINAPI CloseDriver16(HDRVR16 hDrvr, LPARAM lParam1, LPARAM lParam2) +{ + FIXME( "(%04x, %08lx, %08lx): stub\n", hDrvr, lParam1, lParam2); + return FALSE; +} + + +/************************************************************************** + * GetDriverModuleHandle (USER.254) + */ +HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDrvr) +{ + FIXME("(%04x): stub\n", hDrvr); + return 0; +} + + +/************************************************************************** + * DefDriverProc (USER.255) + */ +LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg, + LPARAM lParam1, LPARAM lParam2) +{ + FIXME( "devID=0x%08x hDrv=0x%04x wMsg=%04x lP1=0x%08lx lP2=0x%08lx: stub\n", + dwDevID, hDriv, wMsg, lParam1, lParam2); + return 0; +} + + +/************************************************************************** + * GetDriverInfo (USER.256) + */ +struct DRIVERINFOSTRUCT16; +BOOL16 WINAPI GetDriverInfo16(HDRVR16 hDrvr, struct DRIVERINFOSTRUCT16 *lpDrvInfo) +{ + FIXME( "(%04x, %p): stub\n", hDrvr, lpDrvInfo); + return FALSE; +} + + +/************************************************************************** + * GetNextDriver (USER.257) + */ +HDRVR16 WINAPI GetNextDriver16(HDRVR16 hDrvr, DWORD dwFlags) +{ + FIXME( "(%04x, %08x): stub\n", hDrvr, dwFlags); + return 0; } Modified: vendor/wine/dlls/user32/current/user32.spec URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/user32.s…
============================================================================== --- vendor/wine/dlls/user32/current/user32.spec [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/user32.spec [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -774,17 +774,7 @@ ################################################################ # Wine extensions: Win16 functions that are needed by other dlls # -@ stdcall CallWindowProc16(long long long long long) -@ stdcall CloseDriver16(long long long) -@ stdcall CreateDialogIndirectParam16(long ptr long long long) -@ stdcall DefDriverProc16(long long long long long) -@ stdcall DefWindowProc16(long long long long) @ stdcall DestroyIcon32(long long) -@ stdcall DialogBoxIndirectParam16(long long long long long) -@ stdcall GetDriverModuleHandle16(long) -@ stdcall OpenDriver16(str str long) -@ stdcall SendDriverMessage16(long long long long) -@ stdcall UserYield16() ################################################################ # Wine dll separation hacks, these will go away, don't use them Modified: vendor/wine/dlls/user32/current/user_main.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/user_mai…
============================================================================== --- vendor/wine/dlls/user32/current/user_main.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/user_main.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -354,12 +354,14 @@ static const WCHAR forceW[] = { ' ','-','-','f','o','r','c','e',0 }; static const WCHAR shutdownW[] = { ' ','-','-','s','h','u','t','d','o','w','n',0 }; + WCHAR app[MAX_PATH]; WCHAR cmdline[MAX_PATH + 64]; PROCESS_INFORMATION pi; STARTUPINFOW si; - GetSystemDirectoryW( cmdline, MAX_PATH ); - lstrcatW( cmdline, winebootW ); + GetSystemDirectoryW( app, MAX_PATH - sizeof(winebootW)/sizeof(WCHAR) ); + strcatW( app, winebootW ); + strcpyW( cmdline, app ); if (flags & EWX_FORCE) lstrcatW( cmdline, killW ); else @@ -371,7 +373,7 @@ memset( &si, 0, sizeof si ); si.cb = sizeof si; - if (!CreateProcessW( NULL, cmdline, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi )) + if (!CreateProcessW( app, cmdline, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi )) { ERR( "Failed to run %s\n", debugstr_w(cmdline) ); return FALSE; Modified: vendor/wine/dlls/user32/current/win.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/win.c?re…
============================================================================== --- vendor/wine/dlls/user32/current/win.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/win.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1852,11 +1852,13 @@ if (!GetUserObjectInformationW( GetProcessWindowStation(), UOI_FLAGS, &flags, sizeof(flags), NULL ) || (flags.dwFlags & WSF_VISIBLE)) { - static const WCHAR command_line[] = {'\\','e','x','p','l','o','r','e','r','.','e','x','e',' ','/','d','e','s','k','t','o','p',0}; + static const WCHAR explorer[] = {'\\','e','x','p','l','o','r','e','r','.','e','x','e',0}; + static const WCHAR args[] = {' ','/','d','e','s','k','t','o','p',0}; STARTUPINFOW si; PROCESS_INFORMATION pi; - WCHAR systemdir[MAX_PATH]; - WCHAR cmdline[MAX_PATH + sizeof(command_line)/sizeof(WCHAR)]; + WCHAR windir[MAX_PATH]; + WCHAR app[MAX_PATH + sizeof(explorer)/sizeof(WCHAR)]; + WCHAR cmdline[MAX_PATH + (sizeof(explorer) + sizeof(args))/sizeof(WCHAR)]; memset( &si, 0, sizeof(si) ); si.cb = sizeof(si); @@ -1865,11 +1867,13 @@ si.hStdOutput = 0; si.hStdError = GetStdHandle( STD_ERROR_HANDLE ); - GetSystemDirectoryW( systemdir, MAX_PATH ); - lstrcpyW( cmdline, systemdir ); - lstrcatW( cmdline, command_line ); - if (CreateProcessW( NULL, cmdline, NULL, NULL, FALSE, DETACHED_PROCESS, - NULL, systemdir, &si, &pi )) + GetWindowsDirectoryW( windir, MAX_PATH ); + strcpyW( app, windir ); + strcatW( app, explorer ); + strcpyW( cmdline, app ); + strcatW( cmdline, args ); + if (CreateProcessW( app, cmdline, NULL, NULL, FALSE, DETACHED_PROCESS, + NULL, windir, &si, &pi )) { TRACE( "started explorer pid %04x tid %04x\n", pi.dwProcessId, pi.dwThreadId ); WaitForInputIdle( pi.hProcess, 10000 ); Modified: vendor/wine/dlls/user32/current/winpos.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/user32/current/winpos.c…
============================================================================== --- vendor/wine/dlls/user32/current/winpos.c [iso-8859-1] (original) +++ vendor/wine/dlls/user32/current/winpos.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1056,7 +1056,7 @@ /* Revert focus to parent */ hFocus = GetFocus(); - if (hwnd == hFocus || IsChild(hwnd, hFocus)) + if (hwnd == hFocus) { HWND parent = GetAncestor(hwnd, GA_PARENT); if (parent == GetDesktopWindow()) parent = 0; Modified: vendor/wine/dlls/winex11.drv/current/bitblt.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/bit…
============================================================================== --- vendor/wine/dlls/winex11.drv/current/bitblt.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/bitblt.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1350,6 +1350,14 @@ return TRUE; } +static BOOL same_format(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst) +{ + if (physDevSrc->depth != physDevDst->depth) return FALSE; + if (!physDevSrc->color_shifts && !physDevDst->color_shifts) return TRUE; + if (physDevSrc->color_shifts && physDevDst->color_shifts) + return !memcmp(physDevSrc->color_shifts, physDevDst->color_shifts, sizeof(ColorShifts)); + return FALSE; +} /*********************************************************************** * X11DRV_StretchBlt @@ -1446,7 +1454,7 @@ /* try client-side DIB copy */ if (!fStretch && rop == SRCCOPY && sSrc == DIB_Status_AppMod && sDst == DIB_Status_AppMod && - physDevSrc->depth == physDevDst->depth) + same_format(physDevSrc, physDevDst)) { if (client_side_dib_copy( physDevSrc, visRectSrc.left, visRectSrc.top, physDevDst, visRectDst.left, visRectDst.top, width, height )) @@ -1519,7 +1527,7 @@ } else if (OP_SRCDST(*opcode) == OP_ARGS(SRC,DST)) { - if (physDevSrc->depth == physDevDst->depth) + if (same_format(physDevSrc, physDevDst)) { wine_tsx11_lock(); XSetFunction( gdi_display, physDevDst->gc, OP_ROP(*opcode) ); Modified: vendor/wine/dlls/winex11.drv/current/dib.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/dib…
============================================================================== --- vendor/wine/dlls/winex11.drv/current/dib.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/dib.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -4096,6 +4096,11 @@ if (!(obj_size = GetObjectW( hbitmap, sizeof(dib), &dib ))) return 0; bitmap_type = DIB_GetBitmapInfo( (BITMAPINFOHEADER*)info, &width, &tempHeight, &descr.infoBpp, &descr.compression); + if (bitmap_type == -1) + { + ERR("Invalid bitmap\n"); + return 0; + } if (physBitmap->pixmap_depth > 1) { @@ -4107,11 +4112,6 @@ palette[1] = peWhite; } - if (bitmap_type == -1) - { - ERR("Invalid bitmap\n"); - return 0; - } descr.lines = tempHeight; core_header = (bitmap_type == 0); colorPtr = (LPBYTE) info + (WORD) info->bmiHeader.biSize; Modified: vendor/wine/dlls/winex11.drv/current/event.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/eve…
============================================================================== --- vendor/wine/dlls/winex11.drv/current/event.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/event.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -476,11 +476,13 @@ { HWND focus; Window win; + GUITHREADINFO threadinfo; TRACE( "setting foreground window to %p\n", hwnd ); SetForegroundWindow( hwnd ); - focus = GetFocus(); + GetGUIThreadInfo(0, &threadinfo); + focus = threadinfo.hwndFocus; if (focus) focus = GetAncestor( focus, GA_ROOT ); win = X11DRV_get_whole_window(focus); @@ -676,6 +678,7 @@ wine_tsx11_unlock(); } if (hwnd != GetForegroundWindow()) return; + if (root_window != DefaultRootWindow(event->display)) return; SendMessageW( hwnd, WM_CANCELMODE, 0, 0 ); /* don't reset the foreground window, if the window which is Modified: vendor/wine/dlls/winex11.drv/current/keyboard.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/key…
============================================================================== --- vendor/wine/dlls/winex11.drv/current/keyboard.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/keyboard.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1683,11 +1683,29 @@ KeySym keysym; KeyCode *kcp; XKeyEvent e2; - WORD scan, vkey, OEMvkey; + WORD scan, vkey; int keyc, i, keyn, syms; char ckey[4]={0,0,0,0}; const char (*lkey)[MAIN_LEN][4]; char vkey_used[256] = { 0 }; + + /* Ranges of OEM, function key, and character virtual key codes. + * Don't include those handled specially in X11DRV_ToUnicodeEx and + * X11DRV_MapVirtualKeyEx, like VK_NUMPAD0 - VK_DIVIDE. */ + static const struct { + WORD first, last; + } vkey_ranges[] = { + { VK_OEM_1, VK_OEM_3 }, + { VK_OEM_4, VK_ICO_00 }, + { 0xe6, 0xe6 }, + { 0xe9, 0xf5 }, + { VK_OEM_NEC_EQUAL, VK_OEM_NEC_EQUAL }, + { VK_F1, VK_F24 }, + { 0x30, 0x39 }, /* VK_0 - VK_9 */ + { 0x41, 0x5a }, /* VK_A - VK_Z */ + { 0, 0 } + }; + int vkey_range; set_kbd_layout_preload_key(); @@ -1737,7 +1755,6 @@ e2.display = display; e2.state = 0; - OEMvkey = VK_OEM_8; /* next is available. */ memset(keyc2vkey, 0, sizeof(keyc2vkey)); for (keyc = min_keycode; keyc <= max_keycode; keyc++) { @@ -1854,46 +1871,65 @@ } } - if (!vkey) - { - /* Others keys: let's assign OEM virtual key codes in the allowed range, - * that is ([0xba,0xc0], [0xdb,0xe4], 0xe6 (given up) et [0xe9,0xf5]) */ - do - { - switch (++OEMvkey) - { - case 0xc1 : OEMvkey=0xdb; break; - case 0xe5 : OEMvkey=0xe9; break; - case 0xf6 : OEMvkey=0xf5; WARN("No more OEM vkey available!\n"); - } - } while (OEMvkey < 0xf5 && vkey_used[OEMvkey]); - - vkey = VKEY_IF_NOT_USED(OEMvkey); - - if (TRACE_ON(keyboard)) - { - TRACE("OEM specific virtual key %X assigned to keycode %X:\n", - OEMvkey, e2.keycode); - TRACE("("); - for (i = 0; i < keysyms_per_keycode; i += 1) - { - const char *ksname; - - keysym = XLookupKeysym(&e2, i); - ksname = XKeysymToString(keysym); - if (!ksname) - ksname = "NoSymbol"; - TRACE( "%lX (%s) ", keysym, ksname); - } - TRACE(")\n"); - } - } - if (vkey) { TRACE("keycode %04x => vkey %04x\n", e2.keycode, vkey); keyc2vkey[e2.keycode] = vkey; } + } /* for */ + + /* For any keycodes which still don't have a vkey, assign any spare + * character, function key, or OEM virtual key code. */ + vkey_range = 0; + vkey = vkey_ranges[vkey_range].first; + for (keyc = min_keycode; keyc <= max_keycode; keyc++) + { + if (keyc2vkey[keyc] & 0xff) + continue; + + e2.keycode = (KeyCode)keyc; + keysym = XLookupKeysym(&e2, 0); + if (!keysym) + continue; + + while (vkey && vkey_used[vkey]) + { + if (vkey == vkey_ranges[vkey_range].last) + { + vkey_range++; + vkey = vkey_ranges[vkey_range].first; + } + else + vkey++; + } + + if (!vkey) + { + WARN("No more vkeys available!\n"); + break; + } + + if (TRACE_ON(keyboard)) + { + TRACE("spare virtual key %X assigned to keycode %X:\n", + vkey, e2.keycode); + TRACE("("); + for (i = 0; i < keysyms_per_keycode; i += 1) + { + const char *ksname; + + keysym = XLookupKeysym(&e2, i); + ksname = XKeysymToString(keysym); + if (!ksname) + ksname = "NoSymbol"; + TRACE( "%lX (%s) ", keysym, ksname); + } + TRACE(")\n"); + } + + TRACE("keycode %04x => vkey %04x\n", e2.keycode, vkey); + keyc2vkey[e2.keycode] = vkey; + vkey_used[vkey] = 1; } /* for */ #undef VKEY_IF_NOT_USED Modified: vendor/wine/dlls/winex11.drv/current/opengl.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/ope…
============================================================================== --- vendor/wine/dlls/winex11.drv/current/opengl.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/opengl.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -600,7 +600,7 @@ int pop; int drawattrib = 0; int nvfloatattrib = GLX_DONT_CARE; - int pixelattrib = 0; + int pixelattrib = ~0; /* The list of WGL attributes is allowed to be NULL. We don't return here for NULL * because we need to do fixups for GLX_DRAWABLE_TYPE/GLX_RENDER_TYPE/GLX_FLOAT_COMPONENTS_NV. */ @@ -756,7 +756,6 @@ ERR("trying to use WGL_render_texture Attributes without support (was %x)\n", iWGLAttr[cur]); return -1; /** error: don't support it */ } else { - PUSH2(oGLXAttr, GLX_X_RENDERABLE, pop); drawattrib |= GLX_PBUFFER_BIT; } } @@ -796,12 +795,16 @@ ++cur; } - /* Apply the OR'd drawable type bitmask now EVEN when WGL_DRAW_TO* is unset. - * It is needed in all cases because GLX_DRAWABLE_TYPE default to GLX_WINDOW_BIT. */ + /* By default glXChooseFBConfig defaults to GLX_WINDOW_BIT. wglChoosePixelFormatARB searches through + * all formats. Unless drawattrib is set to a non-zero value override it with ~0, so that pixmap and pbuffer + * formats appear as well. */ + if(!drawattrib) drawattrib = ~0; PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, drawattrib); TRACE("pAttr[?] = GLX_DRAWABLE_TYPE: %#x\n", drawattrib); - /* Set GLX_RENDER_TYPE all the time */ + /* By default glXChooseFBConfig uses GLX_RGBA_BIT as the default value. Since wglChoosePixelFormatARB + * searches in all formats we have to do the same. For this reason we set GLX_RENDER_TYPE to ~0 unless + * it is overridden. */ PUSH2(oGLXAttr, GLX_RENDER_TYPE, pixelattrib); TRACE("pAttr[?] = GLX_RENDER_TYPE: %#x\n", pixelattrib); Modified: vendor/wine/dlls/winex11.drv/current/window.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/win…
============================================================================== --- vendor/wine/dlls/winex11.drv/current/window.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/window.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -2025,14 +2025,11 @@ wine_tsx11_lock(); changes.stack_mode = Above; XConfigureWindow( display, data->whole_window, CWStackMode, &changes ); - if (root_window == DefaultRootWindow(display)) - { - /* we must not use CurrentTime (ICCCM), so try to use last message time instead */ - /* FIXME: this is not entirely correct */ - XSetInputFocus( display, data->whole_window, RevertToParent, - /* CurrentTime */ - GetMessageTime() - EVENT_x11_time_to_win32_time(0)); - } + /* we must not use CurrentTime (ICCCM), so try to use last message time instead */ + /* FIXME: this is not entirely correct */ + XSetInputFocus( display, data->whole_window, RevertToParent, + /* CurrentTime */ + GetMessageTime() - EVENT_x11_time_to_win32_time(0)); wine_tsx11_unlock(); } Modified: vendor/wine/dlls/winex11.drv/current/x11drv_main.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/x11…
============================================================================== --- vendor/wine/dlls/winex11.drv/current/x11drv_main.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/x11drv_main.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -188,7 +188,8 @@ */ static inline BOOL ignore_error( Display *display, XErrorEvent *event ) { - if (event->request_code == X_SetInputFocus && event->error_code == BadMatch) return TRUE; + if (event->request_code == X_SetInputFocus && + (event->error_code == BadMatch || event->error_code == BadWindow)) return TRUE; /* ignore a number of errors on gdi display caused by creating/destroying windows */ if (display == gdi_display) Modified: vendor/wine/dlls/winex11.drv/current/xfont.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/xfo…
============================================================================== --- vendor/wine/dlls/winex11.drv/current/xfont.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/xfont.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1852,7 +1852,7 @@ ** ** - on Red Hat systems, DISPLAY is commonly set to one of ** either 'unix:0.0' or ':0' or ':0.0'. - ** - on MacOS X systems, DISPLAY is commonly set to + ** - on Mac OS X systems, DISPLAY is commonly set to ** /tmp/foo/:0 ** ** after this code, all of the above will resolve to ':0.0'. Modified: vendor/wine/dlls/winex11.drv/current/xrender.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/dlls/winex11.drv/current/xre…
============================================================================== --- vendor/wine/dlls/winex11.drv/current/xrender.c [iso-8859-1] (original) +++ vendor/wine/dlls/winex11.drv/current/xrender.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1956,9 +1956,6 @@ return FALSE; } - if ((blendfn.AlphaFormat & AC_SRC_ALPHA) && blendfn.SourceConstantAlpha != 0xff) - FIXME("Ignoring SourceConstantAlpha %d for AC_SRC_ALPHA\n", blendfn.SourceConstantAlpha); - if(dib.dsBm.bmBitsPixel != 32) { FIXME("not a 32 bpp dibsection\n"); return FALSE; @@ -1979,11 +1976,35 @@ if (blendfn.AlphaFormat & AC_SRC_ALPHA) { - for(; y >= y2; y--) + if (blendfn.SourceConstantAlpha == 0xff) { - memcpy(dstbits, (char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes + xSrc * 4, - widthSrc * 4); - dstbits += (top_down ? -1 : 1) * widthSrc; + for (; y >= y2; y--) + { + memcpy(dstbits, (char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes + xSrc * 4, + widthSrc * 4); + dstbits += (top_down ? -1 : 1) * widthSrc; + } + } + else + { + /* SourceConstantAlpha combined with source alpha */ + for (; y >= y2; y--) + { + int x; + DWORD *srcbits = (DWORD *)((char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes) + xSrc; + for (x = 0; x < widthSrc; x++) + { + DWORD argb = *srcbits++; + BYTE *s = (BYTE *) &argb; + s[0] = (s[0] * blendfn.SourceConstantAlpha) / 255; + s[1] = (s[1] * blendfn.SourceConstantAlpha) / 255; + s[2] = (s[2] * blendfn.SourceConstantAlpha) / 255; + s[3] = (s[3] * blendfn.SourceConstantAlpha) / 255; + *dstbits++ = argb; + } + if (top_down) /* we traversed the row forward so we should go back by two rows */ + dstbits -= 2 * widthSrc; + } } } else @@ -2063,21 +2084,20 @@ { /* At depths >1, the depth of physBitmap and physDev might not be the same e.g. the physbitmap might be a 16-bit DIB while the physdev uses 24-bit */ int depth = physBitmap->pixmap_depth == 1 ? 1 : physDev->depth; + const WineXRenderFormat *src_format = get_xrender_format_from_color_shifts(physBitmap->pixmap_depth, &physBitmap->pixmap_color_shifts); + const WineXRenderFormat *dst_format = get_xrender_format_from_color_shifts(physDev->depth, physDev->color_shifts); wine_tsx11_lock(); physDev->brush.pixmap = XCreatePixmap(gdi_display, root_window, width, height, depth); - /* Use XCopyArea when the physBitmap and brush.pixmap have the same depth. */ - if(physBitmap->pixmap_depth == 1 || physDev->depth == physBitmap->pixmap_depth) + /* Use XCopyArea when the physBitmap and brush.pixmap have the same format. */ + if(physBitmap->pixmap_depth == 1 || src_format->format == dst_format->format) { XCopyArea( gdi_display, physBitmap->pixmap, physDev->brush.pixmap, get_bitmap_gc(physBitmap->pixmap_depth), 0, 0, width, height, 0, 0 ); } - else /* We meed depth conversion */ - { - const WineXRenderFormat *src_format = get_xrender_format_from_color_shifts(physBitmap->pixmap_depth, &physBitmap->pixmap_color_shifts); - const WineXRenderFormat *dst_format = get_xrender_format_from_color_shifts(physDev->depth, physDev->color_shifts); - + else /* We need depth conversion */ + { Picture src_pict, dst_pict; XRenderPictureAttributes pa; pa.subwindow_mode = IncludeInferiors; @@ -2104,6 +2124,7 @@ int height = visRectDst->bottom - visRectDst->top; int x_src = physDevSrc->dc_rect.left + visRectSrc->left; int y_src = physDevSrc->dc_rect.top + visRectSrc->top; + struct xrender_info *src_info = get_xrender_info(physDevSrc); const WineXRenderFormat *dst_format = get_xrender_format_from_color_shifts(physDevDst->depth, physDevDst->color_shifts); Picture src_pict=0, dst_pict=0, mask_pict=0; @@ -2131,8 +2152,8 @@ if((physDevDst->depth == 1) && (physDevSrc->depth > 1)) return FALSE; - /* Just use traditional X copy when the depths match and we don't need stretching */ - if((physDevSrc->depth == physDevDst->depth) && !stretch) + /* Just use traditional X copy when the formats match and we don't need stretching */ + if((src_info->format->format == dst_format->format) && !stretch) { TRACE("Source and destination depth match and no stretching needed falling back to XCopyArea\n"); wine_tsx11_lock(); Modified: vendor/wine/server/current/fd.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/server/current/fd.c?rev=4415…
============================================================================== --- vendor/wine/server/current/fd.c [iso-8859-1] (original) +++ vendor/wine/server/current/fd.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -190,6 +190,7 @@ unsigned int access; /* file access (FILE_READ_DATA etc.) */ unsigned int options; /* file options (FILE_DELETE_ON_CLOSE, FILE_SYNCHRONOUS...) */ unsigned int sharing; /* file sharing mode */ + char *unix_name; /* unix file name */ int unix_fd; /* unix file descriptor */ unsigned int no_fd_status;/* status to return when unix_fd is -1 */ unsigned int signaled :1; /* is the fd signaled? */ @@ -1368,6 +1369,7 @@ if (fd->completion) release_object( fd->completion ); remove_fd_locks( fd ); + free( fd->unix_name ); list_remove( &fd->inode_entry ); if (fd->poll_index != -1) remove_poll_user( fd, fd->poll_index ); if (fd->inode) @@ -1438,6 +1440,7 @@ fd->options = 0; fd->sharing = 0; fd->unix_fd = -1; + fd->unix_name = NULL; fd->signaled = 1; fd->fs_locks = 1; fd->poll_index = -1; @@ -1470,6 +1473,7 @@ fd->access = 0; fd->options = options; fd->sharing = 0; + fd->unix_name = NULL; fd->unix_fd = -1; fd->signaled = 0; fd->fs_locks = 0; @@ -1576,6 +1580,9 @@ else rw_mode = O_WRONLY; } else rw_mode = O_RDONLY; + + if (!(fd->unix_name = mem_alloc( strlen(name) + 1 ))) goto error; + strcpy( fd->unix_name, name ); if ((fd->unix_fd = open( name, rw_mode | (flags & ~O_TRUNC), *mode )) == -1) { @@ -2003,6 +2010,24 @@ if (root) release_object( root ); } +/* get the Unix name from a file handle */ +DECL_HANDLER(get_handle_unix_name) +{ + struct fd *fd; + + if ((fd = get_handle_fd_obj( current->process, req->handle, 0 ))) + { + if (fd->unix_name) + { + data_size_t name_len = strlen( fd->unix_name ); + reply->name_len = name_len; + if (name_len <= get_reply_max_size()) set_reply_data( fd->unix_name, name_len ); + else set_error( STATUS_BUFFER_OVERFLOW ); + } + release_object( fd ); + } +} + /* get a Unix fd to access a file */ DECL_HANDLER(get_handle_fd) { Modified: vendor/wine/server/current/protocol.def URL:
http://svn.reactos.org/svn/reactos/vendor/wine/server/current/protocol.def?…
============================================================================== --- vendor/wine/server/current/protocol.def [iso-8859-1] (original) +++ vendor/wine/server/current/protocol.def [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1003,6 +1003,15 @@ @END +/* Get the Unix name from a file handle */ +@REQ(get_handle_unix_name) + obj_handle_t handle; /* file handle */ +@REPLY + data_size_t name_len; /* unix name length */ + VARARG(name,string); /* unix name */ +@END + + /* Get a Unix fd to access a file */ @REQ(get_handle_fd) obj_handle_t handle; /* handle to the file */ Modified: vendor/wine/server/current/request.h URL:
http://svn.reactos.org/svn/reactos/vendor/wine/server/current/request.h?rev…
============================================================================== --- vendor/wine/server/current/request.h [iso-8859-1] (original) +++ vendor/wine/server/current/request.h [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -148,6 +148,7 @@ DECL_HANDLER(create_file); DECL_HANDLER(open_file_object); DECL_HANDLER(alloc_file_handle); +DECL_HANDLER(get_handle_unix_name); DECL_HANDLER(get_handle_fd); DECL_HANDLER(flush_file); DECL_HANDLER(lock_file); @@ -394,6 +395,7 @@ (req_handler)req_create_file, (req_handler)req_open_file_object, (req_handler)req_alloc_file_handle, + (req_handler)req_get_handle_unix_name, (req_handler)req_get_handle_fd, (req_handler)req_flush_file, (req_handler)req_lock_file, @@ -846,6 +848,9 @@ C_ASSERT( FIELD_OFFSET(struct alloc_file_handle_request, fd) == 20 ); C_ASSERT( FIELD_OFFSET(struct alloc_file_handle_reply, handle) == 8 ); C_ASSERT( sizeof(struct alloc_file_handle_reply) == 16 ); +C_ASSERT( FIELD_OFFSET(struct get_handle_unix_name_request, handle) == 12 ); +C_ASSERT( FIELD_OFFSET(struct get_handle_unix_name_reply, name_len) == 8 ); +C_ASSERT( sizeof(struct get_handle_unix_name_reply) == 16 ); C_ASSERT( FIELD_OFFSET(struct get_handle_fd_request, handle) == 12 ); C_ASSERT( FIELD_OFFSET(struct get_handle_fd_reply, type) == 8 ); C_ASSERT( FIELD_OFFSET(struct get_handle_fd_reply, removable) == 12 ); Modified: vendor/wine/server/current/trace.c URL:
http://svn.reactos.org/svn/reactos/vendor/wine/server/current/trace.c?rev=4…
============================================================================== --- vendor/wine/server/current/trace.c [iso-8859-1] (original) +++ vendor/wine/server/current/trace.c [iso-8859-1] Sat Nov 14 12:11:27 2009 @@ -1457,6 +1457,17 @@ fprintf( stderr, " handle=%04x", req->handle ); } +static void dump_get_handle_unix_name_request( const struct get_handle_unix_name_request *req ) +{ + fprintf( stderr, " handle=%04x", req->handle ); +} + +static void dump_get_handle_unix_name_reply( const struct get_handle_unix_name_reply *req ) +{ + fprintf( stderr, " name_len=%u", req->name_len ); + dump_varargs_string( ", name=", cur_size ); +} + static void dump_get_handle_fd_request( const struct get_handle_fd_request *req ) { fprintf( stderr, " handle=%04x", req->handle ); @@ -3832,6 +3843,7 @@ (dump_func)dump_create_file_request, (dump_func)dump_open_file_object_request, (dump_func)dump_alloc_file_handle_request, + (dump_func)dump_get_handle_unix_name_request, (dump_func)dump_get_handle_fd_request, (dump_func)dump_flush_file_request, (dump_func)dump_lock_file_request, @@ -4075,6 +4087,7 @@ (dump_func)dump_create_file_reply, (dump_func)dump_open_file_object_reply, (dump_func)dump_alloc_file_handle_reply, + (dump_func)dump_get_handle_unix_name_reply, (dump_func)dump_get_handle_fd_reply, (dump_func)dump_flush_file_reply, (dump_func)dump_lock_file_reply, @@ -4318,6 +4331,7 @@ "create_file", "open_file_object", "alloc_file_handle", + "get_handle_unix_name", "get_handle_fd", "flush_file", "lock_file",
15 years, 1 month
1
0
0
0
[fireball] 44150: [SWM] - Implement SwmGetTopWindow() which returns the currently top most window. - If there is no movement in SwmPosChanged, don't do anything (a prerequisite for further work). - Demote debug prints to DPRINT level.
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 14 12:00:53 2009 New Revision: 44150 URL:
http://svn.reactos.org/svn/reactos?rev=44150&view=rev
Log: [SWM] - Implement SwmGetTopWindow() which returns the currently top most window. - If there is no movement in SwmPosChanged, don't do anything (a prerequisite for further work). - Demote debug prints to DPRINT level. Modified: branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c Modified: branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c [iso-8859-1] Sat Nov 14 12:00:53 2009 @@ -204,9 +204,9 @@ /* Check if it's empty */ if (!is_region_empty(WindowRegion)) { - DPRINT1("Invalidating region\n"); + DPRINT("Invalidating region\n"); SwmDumpRegion(WindowRegion); - DPRINT1("of window %x\n", Window->hwnd); + DPRINT("of window %x\n", Window->hwnd); /* If it's not empty, subtract it from the source region */ subtract_region(Region, Region, WindowRegion); @@ -217,7 +217,7 @@ /* Invalidate this region of target window */ SwmInvalidateRegion(Window, WindowRegion, NULL); - DPRINT1("Rest of the update region is:\n"); + DPRINT("Rest of the update region is:\n"); SwmDumpRegion(Region); } @@ -279,8 +279,8 @@ { PSWM_WINDOW Win; - DPRINT1("SwmAddWindow %x\n", hWnd); - DPRINT1("rect (%d,%d)-(%d,%d)\n", WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom); + DPRINT("SwmAddWindow %x\n", hWnd); + DPRINT("rect (%d,%d)-(%d,%d)\n", WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom); /* Acquire the lock */ SwmAcquire(); @@ -394,7 +394,7 @@ /* Acquire the lock */ SwmAcquire(); - DPRINT1("SwmRemoveWindow %x\n", hWnd); + DPRINT("SwmRemoveWindow %x\n", hWnd); /* Allocate entry */ Win = SwmFindByHwnd(hWnd); @@ -420,6 +420,31 @@ SwmRelease(); } +PSWM_WINDOW +NTAPI +SwmGetTopWindow() +{ + PLIST_ENTRY Current; + PSWM_WINDOW Window; + + /* Traverse the list to find top non-hidden window */ + Current = SwmWindows.Flink; + while(Current != &SwmWindows) + { + Window = CONTAINING_RECORD(Current, SWM_WINDOW, Entry); + + /* If this window is not hidden - it's the top one */ + if (!Window->Hidden) return Window; + + Current = Current->Flink; + } + + /* This should never happen */ + ASSERT(FALSE); + return NULL; +} + + VOID NTAPI SwmBringToFront(PSWM_WINDOW SwmWin) @@ -428,16 +453,16 @@ struct region *OldVisible; /* Save previous focus window */ - Previous = CONTAINING_RECORD(SwmWindows.Flink, SWM_WINDOW, Entry); + Previous = SwmGetTopWindow(); /* It's already on top */ if (Previous->hwnd == SwmWin->hwnd) { - DPRINT1("hwnd %x is already on top\n", SwmWin->hwnd); + DPRINT("hwnd %x is already on top\n", SwmWin->hwnd); return; } - DPRINT1("Setting %x as foreground, previous window was %x\n", SwmWin->hwnd, Previous->hwnd); + DPRINT("Setting %x as foreground, previous window was %x\n", SwmWin->hwnd, Previous->hwnd); /* Remove it from the list */ RemoveEntryList(&SwmWin->Entry); @@ -445,7 +470,7 @@ /* Add it to the head of the list */ InsertHeadList(&SwmWindows, &SwmWin->Entry); - /* Subtruct old visible from the new one to find region for updating */ + /* Subtract old visible from the new one to find region for updating */ OldVisible = create_empty_region(); set_region_rect(OldVisible, &SwmWin->Window); @@ -459,7 +484,7 @@ /* If update region is not empty - draw missing parts */ if (!is_region_empty(OldVisible)) { - DPRINT1("Intersection isn't empty\n"); + DPRINT("Intersection isn't empty\n"); SwmInvalidateRegion(SwmWin, OldVisible, NULL); } @@ -514,6 +539,17 @@ /* Allocate entry */ SwmWin = SwmFindByHwnd(hWnd); if (!SwmWin) + { + /* Release the lock */ + SwmRelease(); + return; + } + + /* Check if window really moved anywhere */ + if (WindowRect->left - OldRect->left == 0 && + WindowRect->top - OldRect->top == 0 && + WindowRect->right - OldRect->right == 0 && + WindowRect->bottom - OldRect->bottom == 0) { /* Release the lock */ SwmRelease(); @@ -565,7 +601,7 @@ /* Acquire the lock */ SwmAcquire(); - DPRINT1("SwmShowWindow %x, Show %d\n", hWnd, Show); + DPRINT("SwmShowWindow %x, Show %d\n", hWnd, Show); /* Allocate entry */ Win = SwmFindByHwnd(hWnd); @@ -579,11 +615,13 @@ if (Show && Win->Hidden) { /* Change state from hidden to visible */ + DPRINT("Unhiding %x\n", Win->hwnd); Win->Hidden = FALSE; SwmBringToFront(Win); } else if (!Show && !Win->Hidden) { + DPRINT("Hiding %x\n", Win->hwnd); /* Change state from visible to hidden */ Win->Hidden = TRUE;
15 years, 1 month
1
0
0
0
[fireball] 44149: - Create windata for the desktop window in RosDrv_CreateWindow. - Fix RosDrv_SetFocus (it should bring to forward only parent window whenever any of its child is clicked, previously such events would be ignored). - Add some checks to RosDrv_ShowWindow, but without changing logic. - Fix a key problem of not differentiating between SWM managed and child windows. Fix this by adding the "whole_window" pointer to the windata structure, which will be a pointer to SWM's window structu
by fireball@svn.reactos.org
Author: fireball Date: Sat Nov 14 10:29:44 2009 New Revision: 44149 URL:
http://svn.reactos.org/svn/reactos?rev=44149&view=rev
Log: - Create windata for the desktop window in RosDrv_CreateWindow. - Fix RosDrv_SetFocus (it should bring to forward only parent window whenever any of its child is clicked, previously such events would be ignored). - Add some checks to RosDrv_ShowWindow, but without changing logic. - Fix a key problem of not differentiating between SWM managed and child windows. Fix this by adding the "whole_window" pointer to the windata structure, which will be a pointer to SWM's window structure. Right now it's just set to non-zero value if a window is an SWM window. - Zero win data structure in NTDRV_create_win_data. Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c branches/arwinss/reactos/dll/win32/winent.drv/winent.h branches/arwinss/reactos/dll/win32/winent.drv/wnd.c Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] Sat Nov 14 10:29:44 2009 @@ -42,9 +42,9 @@ HRGN rgn = 0; HWND parent = 0; - if (TRUE) - { - //OffsetRect( &dst_rect, -data->window_rect.left, -data->window_rect.top ); + if (!data->whole_window) + { + OffsetRect( &dst_rect, -data->window_rect.left, -data->window_rect.top ); parent = GetAncestor( data->hwnd, GA_PARENT ); hdc_src = GetDCEx( parent, 0, DCX_CACHE ); hdc_dst = GetDCEx( data->hwnd, 0, DCX_CACHE | DCX_WINDOW ); @@ -70,7 +70,7 @@ if (rgn) { - if (/*!data->whole_window*/TRUE) + if (!data->whole_window) { /* map region to client rect since we are using DCX_WINDOW */ OffsetRgn( rgn, data->window_rect.left - data->client_rect.left, @@ -203,8 +203,8 @@ PVOID pbits; static const WORD ICON_HOTSPOT = 0x4242; /* From user32/cursoricon.c:128 */ - TRACE("%p => %dx%d, %d bpp\n", ciconinfo, - ciconinfo->nWidth, ciconinfo->nHeight, ciconinfo->bBitsPerPixel); + //TRACE("%p => %dx%d, %d bpp\n", ciconinfo, + // ciconinfo->nWidth, ciconinfo->nHeight, ciconinfo->bBitsPerPixel); if ( (ciconinfo->ptHotSpot.x == ICON_HOTSPOT) && (ciconinfo->ptHotSpot.y == ICON_HOTSPOT) ) @@ -483,6 +483,13 @@ BOOL CDECL RosDrv_CreateWindow( HWND hwnd ) { WARN("RosDrv_CreateWindow(%x)\n", hwnd); + + if (hwnd == GetDesktopWindow()) + { + /* create desktop win data */ + if (!NTDRV_create_desktop_win_data( hwnd )) return FALSE; + } + return TRUE; } @@ -725,11 +732,34 @@ } } +/******************************************************************* + * can_activate_window + * + * Check if we can activate the specified window. + */ +/*static inline BOOL can_activate_window( HWND hwnd ) +{ + LONG style = GetWindowLongW( hwnd, GWL_STYLE ); + if (!(style & WS_VISIBLE)) return FALSE; + if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE; + if (style & WS_MINIMIZE) return FALSE; + if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_NOACTIVATE) return FALSE; + if (hwnd == GetDesktopWindow()) return FALSE; + return !(style & WS_DISABLED); +}*/ + void CDECL RosDrv_SetFocus( HWND hwnd ) { + struct ntdrv_win_data *data; + + if (!(hwnd = GetAncestor( hwnd, GA_ROOT ))) return; + if (!(data = NTDRV_get_win_data( hwnd ))) return; + if (!data->whole_window) return; + TRACE("SetFocus %x, desk %x\n", hwnd, GetDesktopWindow()); - if (GetDesktopWindow() != hwnd) - SwmSetForeground(hwnd); + + /* Bring this window to foreground */ + SwmSetForeground(hwnd); } void CDECL RosDrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ) @@ -790,8 +820,18 @@ UINT CDECL RosDrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp ) { + DWORD style = GetWindowLongW( hwnd, GWL_STYLE ); + struct ntdrv_win_data *data = NTDRV_get_win_data( hwnd ); + + if (!data || !data->whole_window) return swp; + if (style & WS_MINIMIZE) return swp; + if (IsRectEmpty( rect )) return swp; + FIXME( "win %p cmd %d at %s flags %08x\n", hwnd, cmd, wine_dbgstr_rect(rect), swp ); + + /* ???: only fetch the new rectangle if the ShowWindow was a result of a window manager event */ + // TODO: Need to think about this return swp; } @@ -842,8 +882,8 @@ if (!data) return; - TRACE( "win %x pos changed. new vis rect %s, old whole rect %s, swp_flags %x\n", - hwnd, wine_dbgstr_rect(visible_rect), wine_dbgstr_rect(&data->whole_rect), swp_flags ); + TRACE( "win %x pos changed. new vis rect %s, old whole rect %s, swp_flags %x insert_after %x\n", + hwnd, wine_dbgstr_rect(visible_rect), wine_dbgstr_rect(&data->whole_rect), swp_flags, insert_after ); old_whole_rect = data->whole_rect; old_client_rect = data->client_rect; @@ -866,20 +906,31 @@ old_client_rect.bottom - data->client_rect.bottom == y_offset && !memcmp( &valid_rects[0], &data->client_rect, sizeof(RECT) )) { - //move_window_bits( data, &old_whole_rect, &data->whole_rect, &old_client_rect ); - SwmPosChanged(hwnd, &data->whole_rect, &old_whole_rect); + /* if we have an SWM window the bits will be moved by the SWM */ + if (!data->whole_window) + ;//move_window_bits( data, &old_whole_rect, &data->whole_rect, &old_client_rect ); + else + SwmPosChanged(hwnd, &data->whole_rect, &old_whole_rect); FIXME("change1\n"); } else { - move_window_bits( data, &valid_rects[1], &valid_rects[0], &old_client_rect ); + //move_window_bits( data, &valid_rects[1], &valid_rects[0], &old_client_rect ); FIXME("change2\n"); } } + if (!data->whole_window) return; + /* Pass show/hide information to the window manager */ if (swp_flags & SWP_SHOWWINDOW) + { + if (swp_flags & SWP_NOZORDER) FIXME("no zorder change, ignoring!\n"); + if (swp_flags & SWP_NOACTIVATE) FIXME("no activate change, ignoring!\n"); + + SwmSetForeground(hwnd); SwmShowWindow(hwnd, TRUE); + } else if (swp_flags & SWP_HIDEWINDOW) SwmShowWindow(hwnd, FALSE); Modified: branches/arwinss/reactos/dll/win32/winent.drv/winent.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/winent.h [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/winent.h [iso-8859-1] Sat Nov 14 10:29:44 2009 @@ -31,6 +31,7 @@ struct ntdrv_win_data { HWND hwnd; /* hwnd that this private data belongs to */ + PVOID whole_window; /* SWM window for the complete window */ RECT window_rect; /* USER window rectangle relative to parent */ RECT whole_rect; /* X window rectangle for the whole window relative to parent */ RECT client_rect; /* client area relative to parent */ @@ -60,5 +61,6 @@ /* wnd.c */ struct ntdrv_win_data *NTDRV_get_win_data( HWND hwnd ); struct ntdrv_win_data *NTDRV_create_win_data( HWND hwnd ); +struct ntdrv_win_data *NTDRV_create_desktop_win_data( HWND hwnd ); void NTDRV_destroy_win_data( HWND hwnd ); VOID CDECL RosDrv_UpdateZOrder(HWND hwnd, RECT *rect); Modified: branches/arwinss/reactos/dll/win32/winent.drv/wnd.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/wnd.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/wnd.c [iso-8859-1] Sat Nov 14 10:29:44 2009 @@ -78,8 +78,9 @@ /* don't create win data for HWND_MESSAGE windows */ if (parent != GetDesktopWindow() && !GetAncestor( parent, GA_PARENT )) return NULL; - data = HeapAlloc(GetProcessHeap(), 0, sizeof(struct ntdrv_win_data)); + data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct ntdrv_win_data)); if (!data) return NULL; + data->hwnd = hwnd; /* Add it as a property to the window */ SetPropA( hwnd, window_data_prop, (HANDLE)data ); @@ -98,11 +99,26 @@ /* Inform window manager about window rect in screen coords */ SwmAddWindow(hwnd, &data->window_rect); + data->whole_window = (PVOID)1; } - /* Add desktop window too */ - if (hwnd == GetDesktopWindow()) - SwmAddWindow(hwnd, &data->window_rect); + return data; +} + +/* initialize the desktop window id in the desktop manager process */ +struct ntdrv_win_data *NTDRV_create_desktop_win_data( HWND hwnd ) +{ + struct ntdrv_win_data *data; + + data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct ntdrv_win_data)); + if (!data) return NULL; + data->hwnd = hwnd; + + /* Add it as a property to the window */ + SetPropA( hwnd, window_data_prop, (HANDLE)data ); + + /* Mark it as being a whole window */ + data->whole_window = (PVOID)1; return data; }
15 years, 1 month
1
0
0
0
[tkreuzer] 44148: - Remove old debugging code from MiArmInitializePageTable - Fix mapping in MiArmPreparePfnDatabse We now reach phase 1 of MmArmInitSystem
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Nov 14 05:15:21 2009 New Revision: 44148 URL:
http://svn.reactos.org/svn/reactos?rev=44148&view=rev
Log: - Remove old debugging code from MiArmInitializePageTable - Fix mapping in MiArmPreparePfnDatabse We now reach phase 1 of MmArmInitSystem Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c [iso-8859-1] Sat Nov 14 05:15:21 2009 @@ -365,10 +365,9 @@ /* Set directory base for the system process */ PsGetCurrentProcess()->Pcb.DirectoryTableBase[0] = PageFrameOffset; - /* HACK: don't use freeldr debug pront anymore */ + /* HACK: don't use freeldr debug print anymore */ FrLdrDbgPrint = NoDbgPrint; -#if 1 /* Clear user mode mappings in PML4 */ StartPte = MiAddressToPxe(0); EndPte = MiAddressToPxe(MmHighestUserAddress); @@ -378,33 +377,10 @@ /* Zero the pte */ Pte->u.Long = 0; } -#else - /* Clear user mode mappings in PML4 */ - StartPte = MiAddressToPte(0); - EndPte = MiAddressToPte((PVOID)0xa00000); - - for (Pte = StartPte; Pte < EndPte; Pte++) - { - /* Zero the pte */ - //Pte->u.Long = 0; - } /* Flush the TLB */ KeFlushCurrentTb(); -// MiAddressToPde(0)->u.Long = 0; -// MiAddressToPde((PVOID)0x200000)->u.Long = 0; -// MiAddressToPde((PVOID)0x400000)->u.Long = 0; -// MiAddressToPde((PVOID)0x600000)->u.Long = 0; -// MiAddressToPde((PVOID)0x800000)->u.Long = 0; - - // MiAddressToPpe->u.Long = 0; - -#endif - - /* Flush the TLB */ - KeFlushCurrentTb(); - /* Setup debug mapping pte */ MmDebugPte = MxGetPte(MI_DEBUG_MAPPING); } @@ -416,8 +392,8 @@ { PMEMORY_ALLOCATION_DESCRIPTOR MdBlock; PLIST_ENTRY ListEntry; - PFN_COUNT PageCount; - PVOID PageBase; + SIZE_T Size; + PUCHAR Page, FirstPage; /* The PFN database is at the start of the non paged region */ MmPfnDatabase = (PVOID)((ULONG64)MmNonPagedPoolEnd - MmMaximumNonPagedPoolInBytes); @@ -437,18 +413,28 @@ (MdBlock->MemoryType == LoaderBBTMemory) || (MdBlock->MemoryType == LoaderHALCachedMemory) || (MdBlock->MemoryType == LoaderSpecialMemory) || - (MdBlock->MemoryType != LoaderBad)) + (MdBlock->MemoryType == LoaderBad)) { continue; } - /* Map pages for the PFN database */ - PageCount = ROUND_TO_PAGES(MdBlock->PageCount * sizeof(MMPFN)) / PAGE_SIZE; - PageBase = PAGE_ALIGN(&MmPfnDatabase[MdBlock->BasePage]); - MxMapPageRange(PageBase, PageCount); + /* Get the base and size of this pfn database entry */ + FirstPage = PAGE_ALIGN(&MmPfnDatabase[MdBlock->BasePage]); + Size = ROUND_TO_PAGES(MdBlock->PageCount * sizeof(MMPFN)); + + /* Loop the pages of this Pfn database entry */ + for (Page = FirstPage; Page < FirstPage + Size; Page += PAGE_SIZE) + { + /* Is the page already mapped? */ + if (!MmIsAddressValid(Page)) + { + /* It's not, map it now */ + MxMapPageRange(Page, 1); + } + } /* Zero out the pages */ - RtlZeroMemory(PageBase, PageCount * PAGE_SIZE); + RtlZeroMemory(FirstPage, Size); } /* Calculate the number of bytes, and then convert to pages */ @@ -537,11 +523,11 @@ /* Initialize the memory layout */ MiArmInitializeMemoryLayout(LoaderBlock); + /* Initialize some mappings */ + MiArmInitializePageTable(); + /* Prepare PFN database mappings */ MiArmPreparePfnDatabse(LoaderBlock); - - /* Initialize some mappings */ - MiArmInitializePageTable(); /* Prepare paged pool mappings */ MiArmPrepareNonPagedPool();
15 years, 1 month
1
0
0
0
[tkreuzer] 44147: The freelist code is an increadible hack. It #defines structure members to other structure members and misuses them. Try to improve the hack by declaring PHYSICAL_PAGE as a unioun of MMPFN and the stuff that is used in the freelist code. Exchange the positions of RmapListHead with MapCount as the former must be pointer sized. More work is required here.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Nov 14 05:08:54 2009 New Revision: 44147 URL:
http://svn.reactos.org/svn/reactos?rev=44147&view=rev
Log: The freelist code is an increadible hack. It #defines structure members to other structure members and misuses them. Try to improve the hack by declaring PHYSICAL_PAGE as a unioun of MMPFN and the stuff that is used in the freelist code. Exchange the positions of RmapListHead with MapCount as the former must be pointer sized. More work is required here. Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Sat Nov 14 05:08:54 2009 @@ -32,23 +32,45 @@ // // ReactOS to NT Physical Page Descriptor Entry Legacy Mapping Definitions // -// REACTOS NT -// -#define Consumer PageLocation -#define Type CacheAttribute -#define Zero PrototypePte -#define LockCount u3.e1.PageColor -#define RmapListHead AweReferenceCount -#define SavedSwapEntry u4.EntireFrame -#define Flags u3.e1 -#define ReferenceCount u3.ReferenceCount -#define RemoveEntryList(x) RemoveEntryList((PLIST_ENTRY)x) -#define InsertTailList(x, y) InsertTailList(x, (PLIST_ENTRY)y) -#define ListEntry u1 -#define PHYSICAL_PAGE MMPFN -#define PPHYSICAL_PAGE PMMPFN - -PPHYSICAL_PAGE MmPfnDatabase; + +typedef union +{ + MMPFN Pfn; + + struct + { + LIST_ENTRY ListEntry; // 0x000 + ULONG_PTR RmapListHead; // 0x008 + USHORT ReferenceCount; // 0x00C + struct // 0x00$ + { + USHORT _unused1:1; + USHORT StartOfAllocation:1; + USHORT EndOfAllocation:1; + USHORT Zero:1; + USHORT LockCount:4; + USHORT Consumer:3; + USHORT _unused2:1; + USHORT Type:2; + USHORT _unused3:1; + USHORT _unused4:1; + } Flags; + LONG MapCount; // 0x10 + ULONG_PTR SavedSwapEntry; // 0x018 + }; +} PHYSICAL_PAGE, *PPHYSICAL_PAGE; + +C_ASSERT(sizeof(PHYSICAL_PAGE) == sizeof(MMPFN)); + +#define MiGetPfnEntry(Pfn) ((PPHYSICAL_PAGE)MiGetPfnEntry(Pfn)) +#define MiGetPfnEntryIndex(x) MiGetPfnEntryIndex((struct _MMPFN*)x) +#define LockCount Flags.LockCount + +PMMPFN MmPfnDatabase; +#define MmPfnDatabase ((PPHYSICAL_PAGE)MmPfnDatabase) + +#define MMPFN PHYSICAL_PAGE +#define PMMPFN PPHYSICAL_PAGE ULONG MmAvailablePages; ULONG MmResidentAvailablePages; @@ -99,7 +121,7 @@ return 0; } PageDescriptor = CONTAINING_RECORD(NextListEntry, PHYSICAL_PAGE, ListEntry); - ASSERT_PFN(PageDescriptor); + ASSERT_PFN(&PageDescriptor->Pfn); KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql); return PageDescriptor - MmPfnDatabase; } @@ -731,12 +753,10 @@ NextEntry != &KeLoaderBlock->MemoryDescriptorListHead; NextEntry = NextEntry->Flink) { -#undef ListEntry /* Get the descriptor */ Md = CONTAINING_RECORD(NextEntry, MEMORY_ALLOCATION_DESCRIPTOR, ListEntry); -#define ListEntry u1 /* Skip bad memory */ if ((Md->MemoryType == LoaderFirmwarePermanent) || @@ -800,7 +820,7 @@ KIRQL oldIrql; oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - MiGetPfnEntry(Pfn)->RmapListHead = (LONG)ListHead; + MiGetPfnEntry(Pfn)->RmapListHead = (LONG_PTR)ListHead; KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql); } @@ -929,7 +949,7 @@ { MmAvailablePages++; if (Page->Flags.Consumer == MC_USER) RemoveEntryList(&Page->ListEntry); - if (Page->RmapListHead != (LONG)NULL) + if (Page->RmapListHead != (LONG_PTR)NULL) { DPRINT1("Freeing page with rmap entries.\n"); KeBugCheck(MEMORY_MANAGEMENT);
15 years, 1 month
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
45
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Results per page:
10
25
50
100
200