Author: fireball
Date: Tue Mar 11 10:58:31 2008
New Revision: 32657
URL:
http://svn.reactos.org/svn/reactos?rev=3D32657&view=3Drev
Log:
- Remove kilobyte of unneeded MS support database text copypaste.
- Rename and add two application compatibility flags to W32THREADINFO struc=
ture (one for ancient compat flags, and one for a bit more modern flags).
- Implement GetAppCompatFlags2() too.
Modified:
trunk/reactos/dll/win32/user32/misc/stubs.c
trunk/reactos/include/reactos/win32k/ntuser.h
Modified: trunk/reactos/dll/win32/user32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc=
/stubs.c?rev=3D32657&r1=3D32656&r2=3D32657&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/dll/win32/user32/misc/stubs.c (original)
+++ trunk/reactos/dll/win32/user32/misc/stubs.c Tue Mar 11 10:58:31 2008
@@ -142,188 +142,29 @@
*/
DWORD
STDCALL
-GetAppCompatFlags ( HTASK hTask )
+GetAppCompatFlags(HTASK hTask)
{
PW32THREADINFO ti =3D GetW32ThreadInfo();
=
- if (ti =3D=3D NULL)
- {
- return 0;
- }
-
- /* NOTE : GetAppCompatFlags retuns which compatible flags should be send=
back =
- * the return value is any of
http://support.microsoft.com/kb/82860
- * This text are direcly copy from the MSDN URL, so it does not get lost
- *----------------------------------------------------------------------=
--------
- * Bit: 1
- * Symbolic name: GACF_IGNORENODISCARD
- *
- * Meaning: Ignore NODISCARD flag if passed to GlobalAlloc(). C 6.x
- * Runtime install library was allocating global memory
- * improperly by incorrectly specifying the GMEM_NODISCARD bit.
- * =
- * Problem: Setup for MS apps. does not work on 1M 286 machine.
- *-----------------------------------------------------------------------
- * Bit: 2
- * Symbolic name: GACF_FORCETEXTBAND
- *
- * Meaning: Separate text band from graphics band. Forces separate band
- * for text, disallowing 3.1 optimization where Text and
- * Graphics are printed in the same band. Word Perfect was
- * assuming text had to go in second band.
- *
- * Problem: Can't print graphics in landscape mode. The
- * compatibility switch doesn't completely fix the
- * problem, just fixes it for certain memory
- * configurations.
- *-----------------------------------------------------------------------
- * Bit: 4
- *
- * Symbolic name: GACF_ONELANDGRXBAND
- * Meaning: One graphics band only. Allows only one Landscape graphics
- * band. Take as much memory as possible for this band. What
- * doesn't fit in that band doesn't print.
- *
- * Problem: Can't print graphics in landscape mode. The
- * compatibility switch doesn't completely fix the
- * problem, just fixes it for certain memory configurations.
- *-----------------------------------------------------------------------
- * Bit: 8
- * Symbolic name: GACF_IGNORETOPMOST
- *
- * Meaning: Ignore topmost windows for GetWindow(HWND,GW_HWNDFIRST)
- * =
- * Problem: CCMail would GP fault when running any Windows applet
- * from CCMail because it assumed the applet it starts
- * will be at the top of the window list when winexec
- * returns. Because of the addition of TOPMOST windows in
- * Win , this isn't the case. The compatibility bit
- * fixes this so GetWindow doesn't return a topmost window.
- *-----------------------------------------------------------------------
- * Bit: 10
- * Symbolic name: GACF_CALLTTDEVICE
- *
- * Meaning: Set the DEVICE_FONTTYPE bit in the FontType for TT fonts
- * returned by EnumFonts().
- *
- * Problem: WordPerfect was assuming TT fonts enumerated by the
- * printer would have the device bit set. TT fonts are not
- * device fonts, so this bit wasn't set. There were
- * various font mapping problems, such as TNR appearing in
- * Script or Symbol.
- *-----------------------------------------------------------------------
- * Bit: 20
- *
- * Symbolic name: GACF_MULTIPLEBANDS
- *
- * Meaning: Manually break graphics output into more than one band when =
printing.
- *
- * Problem: Freelance wouldn't print graphics when there was enough
- * memory and unidrv used only one band for printing. If
- * the first band was the entire page, it didn't issue any
- * graphics calls, thinking it was the text only band.
- * This forces unidrv to use multiple bands.
- *-----------------------------------------------------------------------
- * Bit: 40
- * Symbolic name: GACF_ALWAYSSENDNCPAINT
- *
- * Meaning: SetWindowPos() must send a WM_NCPAINT message to all
- * children, disallowing the 3.1 optimization where this message
- * is only sent to windows that must be redrawn.
- *
- * Problem: File window overlaps the toolbox and doesn't repaint
- * when a new file is opened. Pixie used the receipt of
- * WM_NCPAINT messages to determine that they may need to
- * reposition themselves at the top of the list. Win 3.0
- * used to send the messages to windows even when they
- * didn't need to be sent; in particular if the window was
- * within the bounding rect of any update region involved
- * in a window management operation.
- * =
- * Problem: Repaint problems with dialog boxes left on the screen
- * after file.open or file.new operations.
- *
- * Problem: Tool window is not available when opening the app.
- *-----------------------------------------------------------------------
- * Bit: 80
- *-----------------------------------------------------------------------
- * Bit: 100
- *-----------------------------------------------------------------------
- * Bit: 200
- *-----------------------------------------------------------------------
- * Bit: 800
- *-----------------------------------------------------------------------
- * Bit: 1000
- *-----------------------------------------------------------------------
- * Bit: 2000
- *-----------------------------------------------------------------------
- * Bit: 4000
- *-----------------------------------------------------------------------
- * Bit: 8000
- *
- * Symbolic name: GACF_FORCETTGRAPHICS
- *
- * Meaning: no expain in msdn
- *
- * Problem: Freelance wouldn't print TT unless print TT as graphics was =
selected.
- *-----------------------------------------------------------------------
- * Bit: 10000
- *
- * Symbolic name: GACF_NOHRGN1
- * Meaning: This bit affects applications that depend on a bug in the
- * 3.0 GetUpdateRect() function. Under 3.0, GetUpdateRect
- * would not always return the rectangle in logical DC
- * coordinates: if the entire window was invalid, the rectangle
- * was sometimes returned in window coordinates. This bug was
- * fixed for 3.0 and 3.1 apps in Windows 3.1: coordinates are
- * ALWAYS returned in logical coordinates. This bit re-
- * introduces the bug in GetUpdateRect(), for those
- * applications that depend on this behavior.
- *
- * Problem: Canvas not redrawn properly opening specific MSDraw objects =
in Winword.
- *-----------------------------------------------------------------------
- * Bit: 20000
- *
- * Symbolic name: GACF_NCCALCSIZEONMOVE
- * Meaning: 3.1 and higher optimized WM_NCCALCSIZE if a window was just =
moving,
- * where 3.0 always sent it. This bit causes it to be sent always, as in=
3.0.
- *
- * Problem: Navigator bar of window fails to redraw when the window
- * is moved across the desktop.
- *-----------------------------------------------------------------------
- * Bit: 40000
- *
- * Symbolic name: GACF_SENDMENUDBLCLK
- *
- * Meaning: Passes double-clicks on a menu bar on to the app. With this
- * bit set, if the user double clicks on the menu bar when a
- * menu is visible, we end processing of the menu and pass the
- * double click message on to the application. This allows Just
- * Write to detect double click on the system menu of a
- * maximized MDI child. The normal (and expected) behavior is
- * for Windows to detect the double click on a sys menu of a
- * maximized child and send the app a WM_SYSCOMMAND SC_CLOSE
- * message which is what happens with a non-maximized MDI child window.
- *
- * Problem: Sub-editors (such as footer and header editors)
- * couldn't be closed by double-clicking the system menu.
- * =
- *-----------------------------------------------------------------------
- * Bit: 80000
- *
- * Symbolic name: GACF_30AVGWIDTH
- *
- * Meaning: Changed the way we calculate avg width, this fixes it for
- * postscript. Scale all fonts by 7/8. This flag has been
- * added for TurboTax for printing with pscript driver. Turbo
- * Tax has hard coded average width it uses for selecting fonts.
- * Since we changed the way we calculate avg width to match what
- * is in TT, Turbo Tax is broken.
- *
- * Problem: 1040 tax forms wouldn't print correctly.
- */
- =
- return ti->dwAppsCompatibleFlags;
+ /* If there is no threadinfo (?!), then return 0 */
+ if (!ti) return 0;
+
+ return ti->AppCompatFlags;
+}
+
+/*
+ * @implemented
+ */
+DWORD
+STDCALL
+GetAppCompatFlags2(HTASK hTask)
+{
+ PW32THREADINFO ti =3D GetW32ThreadInfo();
+
+ /* If there is no threadinfo (?!), then return 0 */
+ if (!ti) return 0;
+
+ return ti->AppCompatFlags2;
}
=
/*
@@ -872,17 +713,6 @@
/*
* @unimplemented
*/
-DWORD
-STDCALL
-GetAppCompatFlags2(HTASK hTask)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
VOID STDCALL InitializeLpkHooks(FARPROC *hookfuncs)
{
UNIMPLEMENTED;
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32=
k/ntuser.h?rev=3D32657&r1=3D32656&r2=3D32657&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/include/reactos/win32k/ntuser.h (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h Tue Mar 11 10:58:31 2008
@@ -191,9 +191,9 @@
ULONG_PTR DesktopHeapDelta;
/* A mask of what hooks are currently active */
ULONG Hooks;
- /* apps compatble flags it being set which compatible mode the apps ne=
ed
- * to run in see GetAppCompatFlags for more info */
- DWORD dwAppsCompatibleFlags;
+ /* Application compatibility flags */
+ DWORD AppCompatFlags;
+ DWORD AppCompatFlags2;
} W32THREADINFO, *PW32THREADINFO;
=
/* Window Client Information structure */