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
15c58c42
Commit
15c58c42
authored
Aug 07, 1999
by
Abey George
Committed by
Alexandre Julliard
Aug 07, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set focus to the dialog in EndDialog.
parent
acc19d32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
defdlg.c
windows/defdlg.c
+5
-1
dialog.c
windows/dialog.c
+10
-0
No files found.
windows/defdlg.c
View file @
15c58c42
...
...
@@ -53,7 +53,11 @@ static BOOL DEFDLG_RestoreFocus( HWND hwnd, DIALOGINFO *infoPtr )
{
if
(
!
infoPtr
->
hwndFocus
||
IsIconic
(
hwnd
))
return
FALSE
;
if
(
!
IsWindow
(
infoPtr
->
hwndFocus
))
return
FALSE
;
DEFDLG_SetFocus
(
hwnd
,
infoPtr
->
hwndFocus
);
/* Don't set the focus back to controls if EndDialog is already called.*/
if
(
!
(
infoPtr
->
flags
&
DF_END
))
DEFDLG_SetFocus
(
hwnd
,
infoPtr
->
hwndFocus
);
/* This used to set infoPtr->hwndFocus to NULL for no apparent reason,
sometimes losing focus when receiving WM_SETFOCUS messages. */
return
TRUE
;
...
...
windows/dialog.c
View file @
15c58c42
...
...
@@ -1073,6 +1073,11 @@ BOOL WINAPI EndDialog( HWND hwnd, INT retval )
dlgInfo
->
flags
|=
DF_END
;
}
/* Windows sets the focus to the dialog itself first in EndDialog */
if
(
IsChild
(
hwnd
,
GetFocus
()))
SetFocus
(
wndPtr
->
hwndSelf
);
/* Paint Shop Pro 4.14 calls EndDialog for a CreateDialog* dialog,
* which isn't "normal". Only DialogBox* dialogs may be EndDialog()ed.
* Just hide the window
...
...
@@ -1163,6 +1168,7 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM vKey )
SendMessageA
(
hwndControl
,
WM_LBUTTONUP
,
0
,
0
);
}
RetVal
=
TRUE
;
WIN_ReleaseWndPtr
(
wndPtr
);
break
;
}
}
...
...
@@ -1182,6 +1188,10 @@ static BOOL DIALOG_IsAccelerator( HWND hwnd, HWND hwndDlg, WPARAM vKey )
hwndControl
=
GetParent
(
hwndControl
);
if
(
hwndControl
==
hwndDlg
)
{
if
(
hwnd
==
hwndDlg
){
/* prevent endless loop */
hwndNext
=
hwnd
;
break
;
}
hwndNext
=
GetWindow
(
hwndDlg
,
GW_CHILD
);
}
else
...
...
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