Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e6f04040
Commit
e6f04040
authored
Nov 04, 2009
by
Ilya Shpigor
Committed by
Alexandre Julliard
Nov 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix switching focus to parent after child hiding.
parent
3ec06f80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
win.c
dlls/user32/tests/win.c
+10
-1
winpos.c
dlls/user32/winpos.c
+1
-1
No files found.
dlls/user32/tests/win.c
View file @
e6f04040
...
...
@@ -2298,7 +2298,7 @@ static LRESULT WINAPI set_focus_on_activate_proc(HWND hwnd, UINT msg, WPARAM wp,
static
void
test_SetFocus
(
HWND
hwnd
)
{
HWND
child
;
HWND
child
,
child2
;
WNDPROC
old_wnd_proc
;
/* check if we can set focus to non-visible windows */
...
...
@@ -2325,6 +2325,14 @@ static void test_SetFocus(HWND hwnd)
ok
(
!
(
GetWindowLong
(
child
,
GWL_STYLE
)
&
WS_VISIBLE
),
"Child %p is visible
\n
"
,
child
);
ok
(
GetFocus
()
==
hwnd
,
"Focus should be on parent %p, not %p
\n
"
,
hwnd
,
GetFocus
()
);
ShowWindow
(
child
,
SW_SHOW
);
child2
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_CHILD
,
0
,
0
,
0
,
0
,
child
,
0
,
0
,
NULL
);
assert
(
child2
);
ShowWindow
(
child2
,
SW_SHOW
);
SetFocus
(
child2
);
ShowWindow
(
child
,
SW_HIDE
);
ok
(
!
(
GetWindowLong
(
child
,
GWL_STYLE
)
&
WS_VISIBLE
),
"Child %p is visible
\n
"
,
child
);
ok
(
GetFocus
()
==
child2
,
"Focus should be on %p, not %p
\n
"
,
child2
,
GetFocus
()
);
ShowWindow
(
child
,
SW_SHOW
);
SetFocus
(
child
);
ok
(
GetFocus
()
==
child
,
"Focus should be on child %p
\n
"
,
child
);
SetWindowPos
(
child
,
0
,
0
,
0
,
0
,
0
,
SWP_NOZORDER
|
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_HIDEWINDOW
);
...
...
@@ -2368,6 +2376,7 @@ todo_wine
SetWindowLongPtr
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
old_wnd_proc
);
DestroyWindow
(
child2
);
DestroyWindow
(
child
);
}
...
...
dlls/user32/winpos.c
View file @
e6f04040
...
...
@@ -1056,7 +1056,7 @@ static BOOL show_window( HWND hwnd, INT cmd )
/* Revert focus to parent */
hFocus
=
GetFocus
();
if
(
hwnd
==
hFocus
||
IsChild
(
hwnd
,
hFocus
)
)
if
(
hwnd
==
hFocus
)
{
HWND
parent
=
GetAncestor
(
hwnd
,
GA_PARENT
);
if
(
parent
==
GetDesktopWindow
())
parent
=
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