Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6c5d4cb0
Commit
6c5d4cb0
authored
Feb 04, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Only use DIALOGINFO->hwndFocus to store last focus of inactive windows.
parent
58cbdf26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
dialog.c
dlls/user32/dialog.c
+4
-4
dialog.c
dlls/user32/tests/dialog.c
+12
-1
No files found.
dlls/user32/dialog.c
View file @
6c5d4cb0
...
...
@@ -704,10 +704,10 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
/* By returning TRUE, app has requested a default focus assignment.
* WM_INITDIALOG may have changed the tab order, so find the first
* tabstop control again. */
dlgInfo
->
hwndF
ocus
=
GetNextDlgTabItem
(
hwnd
,
0
,
FALSE
);
if
(
!
dlgInfo
->
hwndFocus
)
dlgInfo
->
hwndF
ocus
=
GetNextDlgGroupItem
(
hwnd
,
0
,
FALSE
);
if
(
dlgInfo
->
hwndFocus
)
SetFocus
(
dlgInfo
->
hwndF
ocus
);
f
ocus
=
GetNextDlgTabItem
(
hwnd
,
0
,
FALSE
);
if
(
!
focus
)
f
ocus
=
GetNextDlgGroupItem
(
hwnd
,
0
,
FALSE
);
if
(
focus
)
SetFocus
(
f
ocus
);
}
}
...
...
dlls/user32/tests/dialog.c
View file @
6c5d4cb0
...
...
@@ -1227,7 +1227,12 @@ static void test_DisabledDialogTest(void)
static
INT_PTR
CALLBACK
messageBoxFontDlgWinProc
(
HWND
hDlg
,
UINT
uiMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
return
(
uiMsg
==
WM_INITDIALOG
);
if
(
uiMsg
==
WM_INITDIALOG
)
{
SetFocus
(
hDlg
);
return
1
;
}
return
0
;
}
static
void
test_MessageBoxFontTest
(
void
)
...
...
@@ -1337,6 +1342,12 @@ static void test_SaveRestoreFocus(void)
foundId
=
GetWindowLongPtrA
(
GetFocus
(),
GWLP_ID
);
ok
(
foundId
==
1000
,
"First edit box should have gained focus on dialog creation. Expected: %d, Found: %ld
\n
"
,
1000
,
foundId
);
SetFocus
(
GetNextDlgTabItem
(
hDlg
,
GetFocus
(),
FALSE
));
SendMessageA
(
hDlg
,
WM_ACTIVATE
,
MAKEWPARAM
(
WA_ACTIVE
,
0
),
0
);
foundId
=
GetWindowLongPtrA
(
GetFocus
(),
GWLP_ID
);
ok
(
foundId
==
1001
,
"First edit box should have regained focus after dialog reactivation. Expected: %d, Found: %ld
\n
"
,
1001
,
foundId
);
SetFocus
(
GetNextDlgTabItem
(
hDlg
,
NULL
,
FALSE
));
/* de- then reactivate the dialog */
SendMessageA
(
hDlg
,
WM_ACTIVATE
,
MAKEWPARAM
(
WA_INACTIVE
,
0
),
0
);
SendMessageA
(
hDlg
,
WM_ACTIVATE
,
MAKEWPARAM
(
WA_ACTIVE
,
0
),
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment