Release 970720
Sat Jul 19 13:03:01 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [tools/build.c] [include/stackframe.h]
Save the complete %ebp register in CallFrom16; fixes a crash with
LabView reported by Andreas Mohr.
* [loader/main.c]
Avoid executing a built-in DLL.
* [controls/static.c]
Converted static window procedure to Win32.
* [windows/message.c] [windows/queue.c] [include/queue.h]
Hacked SendMessage functions to support inter-task messages with
SendMessage32A/W.
Sun Jul 13 16:55:35 1997 Bernhard Rosenkraenzer <bero@bero-online.ml.org>
* [ipc/bit_array.c]
Don't use bitops.h in Linux 2.1.x (these versions do not return
the previous state for clear_bit and set_bit)
* [ipc/shm_main_blk.c]
Adapt to GLIBC's ipc_perm structure.
* [memory/ldt.c]
Include <asm/unistd.h> on Linux/GLIBC systems (required for
_syscall3).
Wed Jul 9 23:53:19 1997 David A. Cuthbert <dacut@henry.ece.cmu.edu>
* [include/options.h] [files/profile.c]
Added PROFILE_GetWineIniBool and PROFILE_EnumerateWineIniSection.
* [include/sysmetrics.h] [include/windows.h] [windows/sysmetrics.c]
All sysmetrics moved to array (no more constant macros). Added
MOUSEWHEELPRESENT metric.
* [include/bitmap.h] [objects/oembitmap.c]
Added OBM_Init() (see also loader/main.c) and more support for Win95
bitmaps; added size info to OEM bitmaps.
* [include/graphics.h] [windows/graphics.h]
Added GRAPH_DrawGenericReliefRect.
* [loader/main.c]
Added TWEAK_Init() and TWEAK_CheckConfiguration() calls (the
latter checks for invalid entries in wine.conf).
* [include/debug.h] [include/stddebug.h] [include/nonclient.h]
[include/tweak.h] [controls/menu.c] [misc/tweak.c]
[objects/gdiobj.c] [windows/syscolor.c] [windows/nonclient.c]
[BUGS] [documentation/win95look]
Added tweaks for Windows 95 interface support. See
documentation/win95look for more information.
* [controls/edit.c]
Fixed EDIT_MoveHome bug.
* [misc/ver.c]
Changed name of dprintf_ver_string to ver_dstring to fix
problem with tools/make_debug utility.
Wed Jul 9 21:31:54 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [objects/dib.c]
Don't use palettes with dibs with biBitCount > 8.
* [misc/ole2nls.c][misc/ver.c]
IsValidLocale, EnumSystemLocales fixed (winhlp32.exe works)
Some VerLanguage coded moved to ole2nls.c, some cleanups.
* [multimedia/mcistring.c]
Fixed "capabilities <dev> device type" crash (cool.exe).
* [misc/main.c]
SystemParametersInfo*: added stub option 41
(GETNONCLIENTMETRICS), duplicated some stuff away from SPI16
that writes 32bit vars.(one COMCTL32.DLL crash, freecell.exe)
Tue Jul 8 22:40:53 1997 Morten Welinder <terra@diku.dk>
* [if1632/shell32.spec]
Use Windows 95's ordinals. Help wanted, inquire within.
Mon Jul 7 11:20:36 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [if1632/relay.c] [if1632/user.spec] [if1632/kernel.spec]
[tools/build-spec.txt] [tools/build.c]
Added type 'segstr' (segmented pointer to null-terminated string)
to .spec files.
* [windows/user.c] [if1632/user.spec]
ExitWindowsExec stub function added.
Mon Jul 7 01:18:25 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [files/file.c] [include/winbase.h] [if1632/kernel32.spec]
Implement MoveFileEx32, some enhancement for Movefile32.
Sat Jul 5 18:13:48 1997 Bruce Milner <Bruce.Milner@genetics.utah.edu.
* [files/file.c] [if1632/kernel32.spec] [include/winerror.h]
[msdos/int21.c] [win32/file.c]
Add LockFile/UnlockFile implementation.
Add back in int21 func(0x5c) Record locking functions.
* [files/file.c]
Fixed bug with OF_REOPEN in FILE_DoOpenFile.
Fri Jul 4 12:00:00 1997 Henrik Olsen <Henrik.Olsen@iaeste.dk>
* [misc/ole2nls.c] [programs/progman/Da.rc] [programs/winhelp/Da.rc]
[resources/sysres_Da.rc]
Added/updated Danish language support.
Thu Jul 3 13:04:20 1997 Claus Fischer <fischer@iue.tuwien.ac.at>
* [files/dos_fs.c]
Properly implemented DOSFS_UnixTimeToFileTime and
DOSFS_FileTimeToUnixTime.
* [documentation/wine.texinfo]
First version of texinfo documentation.
diff --git a/controls/menu.c b/controls/menu.c
index 4c7c82f..d99b6cc 100644
--- a/controls/menu.c
+++ b/controls/menu.c
@@ -33,8 +33,19 @@
#include "graphics.h"
#include "resource.h"
#include "stddebug.h"
+#include "tweak.h"
#include "debug.h"
+
+UINT32 MENU_BarItemTopNudge;
+UINT32 MENU_BarItemLeftNudge;
+UINT32 MENU_ItemTopNudge;
+UINT32 MENU_ItemLeftNudge;
+UINT32 MENU_HighlightTopNudge;
+UINT32 MENU_HighlightLeftNudge;
+UINT32 MENU_HighlightBottomNudge;
+UINT32 MENU_HighlightRightNudge;
+
/* internal popup menu window messages */
#define MM_SETMENUHANDLE (WM_USER + 0)
@@ -101,13 +112,13 @@
#define POPUP_YSHADE 4
/* Space between 2 menu bar items */
-#define MENU_BAR_ITEMS_SPACE 16
+int MENU_BAR_ITEMS_SPACE = 12;
/* Minimum width of a tab character */
-#define MENU_TAB_SPACE 8
+int MENU_TAB_SPACE = 8;
/* Height of a separator item */
-#define SEPARATOR_HEIGHT 5
+int SEPARATOR_HEIGHT = 5;
/* (other menu->FocusedItem values give the position of the focused item) */
#define NO_SELECTED_ITEM 0xffff
@@ -147,14 +158,18 @@
{
HMENU32 hMenu = LoadMenuIndirect32A(SYSRES_GetResPtr(SYSRES_MENU_SYSMENU));
- if( hMenu )
- {
+ if( hMenu ) {
POPUPMENU* menu = (POPUPMENU *) USER_HEAP_LIN_ADDR(hMenu);
menu->wFlags |= MF_SYSMENU | MF_POPUP;
- return hMenu;
}
- else fprintf( stderr, "Unable to load default system menu\n" );
- return FALSE;
+ else {
+ hMenu = 0;
+ fprintf( stderr, "Unable to load default system menu\n" );
+ }
+
+ dprintf_menu( stddeb, "MENU_CopySysPopup: returning %ld.\n", hMenu );
+
+ return hMenu;
}
@@ -409,6 +424,10 @@
DWORD dwSize;
char *p;
+ dprintf_menu( stddeb, "MENU_CalcItemSize: HDC 0x%lx, item '%s', at "
+ "(%d, %d) %s\n", hdc, lpitem->text, orgX, orgY,
+ menuBar ? "(MenuBar)" : "" );
+
SetRect32( &lpitem->rect, orgX, orgY, orgX, orgY );
if (lpitem->item_flags & MF_OWNERDRAW)
@@ -509,6 +528,13 @@
{
if ((i != start) &&
(lpitem->item_flags & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
+
+ dprintf_menu( stddeb, "MENU_PopupMenuCalcSize: calling "
+ "MENU_CalcItemSize on '%s', org=(%d, %d)\n",
+ lpitem->text, orgX, orgY );
+ if(TWEAK_Win95Look)
+ ++orgY;
+
MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, FALSE );
if (lpitem->item_flags & MF_MENUBARBREAK) orgX++;
maxX = MAX( maxX, lpitem->rect.right );
@@ -572,6 +598,11 @@
if ((helpPos == -1) && (lpitem->item_flags & MF_HELP)) helpPos = i;
if ((i != start) &&
(lpitem->item_flags & (MF_MENUBREAK | MF_MENUBARBREAK))) break;
+
+
+ dprintf_menu( stddeb, "MENU_MenuBarCalcSize: calling "
+ "MENU_CalcItemSize on item '%s', org=(%d, %d)\n",
+ lpitem->text, orgX, orgY );
MENU_CalcItemSize( hdc, lpitem, hwndOwner, orgX, orgY, TRUE );
if (lpitem->rect.right > lprect->right)
{
@@ -619,8 +650,17 @@
if (lpitem->item_flags & MF_SYSMENU)
{
- if( !IsIconic32(hwnd) ) NC_DrawSysButton( hwnd, hdc,
- lpitem->item_flags & (MF_HILITE | MF_MOUSESELECT));
+ if( !IsIconic32(hwnd) ) {
+ if(TWEAK_Win95Look)
+ NC_DrawSysButton95( hwnd, hdc,
+ lpitem->item_flags &
+ (MF_HILITE | MF_MOUSESELECT) );
+ else
+ NC_DrawSysButton( hwnd, hdc,
+ lpitem->item_flags &
+ (MF_HILITE | MF_MOUSESELECT) );
+ }
+
return;
}
@@ -647,11 +687,33 @@
if (menuBar && (lpitem->item_flags & MF_SEPARATOR)) return;
rect = lpitem->rect;
- /* Draw the background */
+ /* Draw the background */
+ if(TWEAK_Win95Look) {
+ if(menuBar) {
+ --rect.left;
+ ++rect.bottom;
+ --rect.top;
+ }
+ InflateRect32( &rect, -1, -1 );
+ }
- if (lpitem->item_flags & MF_HILITE)
- FillRect32( hdc, &rect, sysColorObjects.hbrushHighlight );
- else FillRect32( hdc, &rect, sysColorObjects.hbrushMenu );
+ if (lpitem->item_flags & MF_HILITE) {
+ RECT32 r = rect;
+ r.top += MENU_HighlightTopNudge;
+ r.bottom += MENU_HighlightBottomNudge;
+ r.left += MENU_HighlightLeftNudge;
+ r.right += MENU_HighlightRightNudge;
+ FillRect32( hdc, &r, sysColorObjects.hbrushHighlight );
+ }
+ else {
+ RECT32 r = rect;
+ r.top += MENU_HighlightTopNudge;
+ r.bottom += MENU_HighlightBottomNudge;
+ r.left += MENU_HighlightLeftNudge;
+ r.right += MENU_HighlightRightNudge;
+ FillRect32( hdc, &r, sysColorObjects.hbrushMenu );
+ }
+
SetBkMode32( hdc, TRANSPARENT );
/* Draw the separator bar (if any) */
@@ -664,9 +726,16 @@
}
if (lpitem->item_flags & MF_SEPARATOR)
{
- SelectObject32( hdc, sysColorObjects.hpenWindowFrame );
- MoveTo( hdc, rect.left, rect.top + SEPARATOR_HEIGHT/2 );
- LineTo32( hdc, rect.right, rect.top + SEPARATOR_HEIGHT/2 );
+ if(TWEAK_Win95Look)
+ TWEAK_DrawMenuSeparator95(hdc, rect.left + 1,
+ rect.top + SEPARATOR_HEIGHT / 2 + 1,
+ rect.right - 1);
+ else {
+ SelectObject32( hdc, sysColorObjects.hpenWindowFrame );
+ MoveTo( hdc, rect.left, rect.top + SEPARATOR_HEIGHT/2 );
+ LineTo32( hdc, rect.right, rect.top + SEPARATOR_HEIGHT/2 );
+ }
+
return;
}
@@ -742,16 +811,40 @@
rect.left += MENU_BAR_ITEMS_SPACE / 2;
rect.right -= MENU_BAR_ITEMS_SPACE / 2;
i = strlen( lpitem->text );
+
+ rect.top += MENU_BarItemTopNudge;
+ rect.left += MENU_BarItemLeftNudge;
}
else
{
for (i = 0; lpitem->text[i]; i++)
if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b'))
break;
+
+ rect.top += MENU_ItemTopNudge;
+ rect.left += MENU_ItemLeftNudge;
}
-
- DrawText32A( hdc, lpitem->text, i, &rect,
- DT_LEFT | DT_VCENTER | DT_SINGLELINE );
+
+ if(!TWEAK_Win95Look || !(lpitem->item_flags & MF_GRAYED)) {
+ DrawText32A( hdc, lpitem->text, i, &rect,
+ DT_LEFT | DT_VCENTER | DT_SINGLELINE );
+ }
+ else {
+ ++rect.left;
+ ++rect.top;
+ ++rect.right;
+ ++rect.bottom;
+ SetTextColor32(hdc, RGB(0xff, 0xff, 0xff));
+ DrawText32A( hdc, lpitem->text, i, &rect,
+ DT_LEFT | DT_VCENTER | DT_SINGLELINE );
+ --rect.left;
+ --rect.top;
+ --rect.right;
+ --rect.bottom;
+ SetTextColor32(hdc, RGB(0x80, 0x80, 0x80));
+ DrawText32A( hdc, lpitem->text, i, &rect,
+ DT_LEFT | DT_VCENTER | DT_SINGLELINE );
+ }
if (lpitem->text[i]) /* There's a tab or flush-right char */
{
@@ -787,6 +880,7 @@
HPEN32 hPrevPen;
Rectangle32( hdc, rect.left, rect.top, rect.right, rect.bottom );
+
hPrevPen = SelectObject32( hdc, GetStockObject32( NULL_PEN ) );
if( hPrevPen )
{
@@ -794,20 +888,26 @@
POPUPMENU *menu;
/* draw 3-d shade */
+ if(!TWEAK_Win95Look) {
+ SelectObject32( hdc, hShadeBrush );
+ SetBkMode32( hdc, TRANSPARENT );
+ ropPrev = SetROP232( hdc, R2_MASKPEN );
- SelectObject32( hdc, hShadeBrush );
- SetBkMode32( hdc, TRANSPARENT );
- ropPrev = SetROP232( hdc, R2_MASKPEN );
-
- i = rect.right; /* why SetBrushOrg() doesn't? */
- PatBlt32( hdc, i & 0xfffffffe, rect.top + POPUP_YSHADE*SYSMETRICS_CYBORDER,
- i%2 + POPUP_XSHADE*SYSMETRICS_CXBORDER, rect.bottom - rect.top, 0x00a000c9 );
- i = rect.bottom;
- PatBlt32( hdc, rect.left + POPUP_XSHADE*SYSMETRICS_CXBORDER, i & 0xfffffffe,
- rect.right - rect.left, i%2 + POPUP_YSHADE*SYSMETRICS_CYBORDER, 0x00a000c9 );
- SelectObject32( hdc, hPrevPen );
- SelectObject32( hdc, hPrevBrush );
- SetROP232( hdc, ropPrev );
+ i = rect.right; /* why SetBrushOrg() doesn't? */
+ PatBlt32( hdc, i & 0xfffffffe,
+ rect.top + POPUP_YSHADE*SYSMETRICS_CYBORDER,
+ i%2 + POPUP_XSHADE*SYSMETRICS_CXBORDER,
+ rect.bottom - rect.top, 0x00a000c9 );
+ i = rect.bottom;
+ PatBlt32( hdc, rect.left + POPUP_XSHADE*SYSMETRICS_CXBORDER,
+ i & 0xfffffffe,rect.right - rect.left,
+ i%2 + POPUP_YSHADE*SYSMETRICS_CYBORDER, 0x00a000c9 );
+ SelectObject32( hdc, hPrevPen );
+ SelectObject32( hdc, hPrevBrush );
+ SetROP232( hdc, ropPrev );
+ }
+ else
+ TWEAK_DrawReliefRect95(hdc, &rect);
/* draw menu items */
@@ -846,10 +946,16 @@
lprect->bottom = lprect->top + lppop->Height;
if (suppress_draw) return lppop->Height;
+ if(TWEAK_Win95Look)
+ ++lprect->bottom;
+
FillRect32(hDC, lprect, sysColorObjects.hbrushMenu );
- SelectObject32( hDC, sysColorObjects.hpenWindowFrame );
- MoveTo( hDC, lprect->left, lprect->bottom );
- LineTo32( hDC, lprect->right, lprect->bottom );
+
+ if(!TWEAK_Win95Look) {
+ SelectObject32( hDC, sysColorObjects.hpenWindowFrame );
+ MoveTo( hDC, lprect->left, lprect->bottom );
+ LineTo32( hDC, lprect->right, lprect->bottom );
+ }
if (lppop->nItems == 0) return SYSMETRICS_CYMENU;
for (i = 0; i < lppop->nItems; i++)
@@ -1116,8 +1222,8 @@
LPSTR prevText = IS_STRING_ITEM(item->item_flags) ? item->text : NULL;
dprintf_menu(stddeb,"SetItemData: %04x [%08x] '%s' -> %04x [%08x] '%s'\n",
- item->item_flags, item->item_id, item->text ? item->text : "",
- flags, id, str ? str : "" );
+ item->item_flags, item->item_id, prevText ? prevText : "",
+ flags, id, (IS_STRING_ITEM(flags) && str) ? str : "" );
if (IS_STRING_ITEM(flags))
{
@@ -2241,6 +2347,9 @@
WND *wndPtr;
LPPOPUPMENU lppop;
+ dprintf_menu( stddeb, "MENU_GetMenuBarHeight: HWND 0x%lx, width %d, "
+ "at (%d, %d).\n", hwnd, menubarWidth, orgX, orgY );
+
if (!(wndPtr = WIN_FindWndPtr( hwnd ))) return 0;
if (!(lppop = (LPPOPUPMENU)USER_HEAP_LIN_ADDR((HMENU16)wndPtr->wIDmenu)))
return 0;
@@ -2578,9 +2687,11 @@
MENUITEM *item;
if (IS_STRING_ITEM(flags) && str)
- dprintf_menu( stddeb, "InsertMenu: %04x %d %04x %04x '%s'\n",
+ dprintf_menu( stddeb, "InsertMenu: hMenu %04x, pos %d, flags %04x, "
+ "id %04x, str '%s'\n",
hMenu, pos, flags, id, str );
- else dprintf_menu( stddeb, "InsertMenu: %04x %d %04x %04x %08lx\n",
+ else dprintf_menu( stddeb, "InsertMenu: hMenu %04x, pos %d, flags %04x, "
+ "id %04x, str %08lx (not a string)\n",
hMenu, pos, flags, id, (DWORD)str );
if (!(item = MENU_InsertItem( hMenu, pos, flags ))) return FALSE;