mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:20:56 +00:00
user32: Update last active popup for all parents.
This commit is contained in:
parent
971e9a2239
commit
824c5089d2
|
@ -6256,6 +6256,28 @@ todo_wine
|
||||||
ok( found != NULL, "found is NULL, expected a valid hwnd\n" );
|
ok( found != NULL, "found is NULL, expected a valid hwnd\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_GetLastActivePopup(void)
|
||||||
|
{
|
||||||
|
HWND hwndOwner, hwndPopup1, hwndPopup2;
|
||||||
|
|
||||||
|
hwndOwner = CreateWindowExA(0, "MainWindowClass", NULL,
|
||||||
|
WS_VISIBLE | WS_POPUPWINDOW,
|
||||||
|
100, 100, 200, 200,
|
||||||
|
NULL, 0, GetModuleHandle(0), NULL);
|
||||||
|
hwndPopup1 = CreateWindowExA(0, "MainWindowClass", NULL,
|
||||||
|
WS_VISIBLE | WS_POPUPWINDOW,
|
||||||
|
100, 100, 200, 200,
|
||||||
|
hwndOwner, 0, GetModuleHandle(0), NULL);
|
||||||
|
hwndPopup2 = CreateWindowExA(0, "MainWindowClass", NULL,
|
||||||
|
WS_VISIBLE | WS_POPUPWINDOW,
|
||||||
|
100, 100, 200, 200,
|
||||||
|
hwndPopup1, 0, GetModuleHandle(0), NULL);
|
||||||
|
ok( GetLastActivePopup(hwndOwner) == hwndPopup2, "wrong last active popup\n" );
|
||||||
|
DestroyWindow( hwndPopup2 );
|
||||||
|
DestroyWindow( hwndPopup1 );
|
||||||
|
DestroyWindow( hwndOwner );
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(win)
|
START_TEST(win)
|
||||||
{
|
{
|
||||||
HMODULE user32 = GetModuleHandleA( "user32.dll" );
|
HMODULE user32 = GetModuleHandleA( "user32.dll" );
|
||||||
|
@ -6329,6 +6351,7 @@ START_TEST(win)
|
||||||
test_children_zorder(hwndMain);
|
test_children_zorder(hwndMain);
|
||||||
test_popup_zorder(hwndMain2, hwndMain, WS_POPUP);
|
test_popup_zorder(hwndMain2, hwndMain, WS_POPUP);
|
||||||
test_popup_zorder(hwndMain2, hwndMain, 0);
|
test_popup_zorder(hwndMain2, hwndMain, 0);
|
||||||
|
test_GetLastActivePopup();
|
||||||
test_keyboard_input(hwndMain);
|
test_keyboard_input(hwndMain);
|
||||||
test_mouse_input(hwndMain);
|
test_mouse_input(hwndMain);
|
||||||
test_validatergn(hwndMain);
|
test_validatergn(hwndMain);
|
||||||
|
|
|
@ -569,9 +569,13 @@ int make_window_active( user_handle_t window )
|
||||||
|
|
||||||
if (!win) return 0;
|
if (!win) return 0;
|
||||||
|
|
||||||
/* set last active for window and its owner */
|
/* set last active for window and its owners */
|
||||||
win->last_active = win->handle;
|
owner = win;
|
||||||
if ((owner = get_user_object( win->owner, USER_WINDOW ))) owner->last_active = win->handle;
|
while (owner)
|
||||||
|
{
|
||||||
|
owner->last_active = win->handle;
|
||||||
|
owner = get_user_object( owner->owner, USER_WINDOW );
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue