Make Alt press/release test actually pass for not managed windows
Dmitry Timoshkov
dmitry at baikal.ru
Tue Jan 11 09:08:38 CST 2005
Hello,
this patch simplifies a bit previous solution by removing duplicated code
and actually makes the Alt press/release test pass for not managed windows.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Make Alt press/release test actually pass for not managed windows.
--- cvs/hq/wine/dlls/user/menu.c 2005-01-11 21:24:57.000000000 +0800
+++ wine/dlls/user/menu.c 2005-01-11 22:53:15.000000000 +0800
@@ -2943,24 +2943,22 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UI
goto track_menu;
}
}
- else
- {
- /* prevent sysmenu activation for managed windows on Alt down/up */
- if ((wParam & HTSYSMENU) && (GetWindowLongW(hwnd, GWL_EXSTYLE) & WS_EX_MANAGED))
- {
- MENU_SelectItem( hwnd, hTrackMenu, 0, TRUE, 0 );
- /* schedule end of menu tracking */
- wFlags |= TF_ENDMENU;
- goto track_menu;
- }
- }
MENU_SelectItem( hwnd, hTrackMenu, uItem, TRUE, 0 );
- if( uItem == NO_SELECTED_ITEM )
- MENU_MoveSelection( hwnd, hTrackMenu, ITEM_NEXT );
+ if (wParam & HTSYSMENU)
+ {
+ /* prevent sysmenu activation for managed windows on Alt down/up */
+ if (GetWindowLongW(hwnd, GWL_EXSTYLE) & WS_EX_MANAGED)
+ wFlags |= TF_ENDMENU; /* schedule end of menu tracking */
+ }
else
- PostMessageW( hwnd, WM_KEYDOWN, VK_DOWN, 0L );
+ {
+ if( uItem == NO_SELECTED_ITEM )
+ MENU_MoveSelection( hwnd, hTrackMenu, ITEM_NEXT );
+ else
+ PostMessageW( hwnd, WM_KEYDOWN, VK_DOWN, 0L );
+ }
track_menu:
MENU_TrackMenu( hTrackMenu, wFlags, 0, 0, hwnd, NULL );
More information about the wine-patches
mailing list