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
e32e1f05
Commit
e32e1f05
authored
Jun 03, 2004
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Jun 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EnableWindow should not remove the focus of child windows.
parent
7590fe58
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
msg.c
dlls/user/tests/msg.c
+25
-0
win.c
dlls/user/tests/win.c
+8
-0
win.c
windows/win.c
+2
-3
No files found.
dlls/user/tests/msg.c
View file @
e32e1f05
...
...
@@ -599,6 +599,13 @@ static const struct message WmSetRedrawTrueSeq[] =
{
0
}
};
static
const
struct
message
WmEnableWindowSeq
[]
=
{
{
WM_CANCELMODE
,
sent
},
{
WM_ENABLE
,
sent
},
{
0
}
};
static
int
after_end_dialog
;
static
int
sequence_cnt
,
sequence_size
;
static
struct
message
*
sequence
;
...
...
@@ -910,6 +917,24 @@ static void test_messages(void)
ok_sequence
(
WmDrawMenuBarSeq
,
"DrawMenuBar"
);
DestroyWindow
(
hwnd
);
flush_sequence
();
/* Message sequence for EnableWindow */
hparent
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
"Test parent"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
ok
(
hparent
!=
0
,
"Failed to create parent window
\n
"
);
hchild
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
"Test child"
,
WS_CHILDWINDOW
|
WS_VISIBLE
,
0
,
0
,
10
,
10
,
hparent
,
0
,
0
,
NULL
);
ok
(
hchild
!=
0
,
"Failed to create child window
\n
"
);
SetFocus
(
hchild
);
flush_sequence
();
EnableWindow
(
hparent
,
FALSE
);
ok_sequence
(
WmEnableWindowSeq
,
"EnableWindow"
);
DestroyWindow
(
hparent
);
flush_sequence
();
}
static
LRESULT
WINAPI
MsgCheckProcA
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
dlls/user/tests/win.c
View file @
e32e1f05
...
...
@@ -1626,6 +1626,14 @@ static void test_SetFocus(HWND hwnd)
ShowWindow
(
child
,
SW_HIDE
);
ok
(
GetFocus
()
==
hwnd
,
"Focus should still be on parent %p, not %p
\n
"
,
hwnd
,
GetFocus
()
);
ShowWindow
(
hwnd
,
SW_SHOW
);
ShowWindow
(
child
,
SW_SHOW
);
SetFocus
(
child
);
ok
(
GetFocus
()
==
child
,
"Focus should be on child %p
\n
"
,
child
);
EnableWindow
(
hwnd
,
FALSE
);
ok
(
GetFocus
()
==
child
,
"Focus should still be on child %p
\n
"
,
child
);
EnableWindow
(
hwnd
,
TRUE
);
DestroyWindow
(
child
);
}
...
...
windows/win.c
View file @
e32e1f05
...
...
@@ -1752,14 +1752,13 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
}
else
if
(
!
enable
&&
!
retvalue
)
{
HWND
focus_wnd
,
capture_wnd
;
HWND
capture_wnd
;
SendMessageA
(
hwnd
,
WM_CANCELMODE
,
0
,
0
);
WIN_SetStyle
(
hwnd
,
style
|
WS_DISABLED
);
focus_wnd
=
GetFocus
();
if
(
hwnd
==
focus_wnd
||
IsChild
(
hwnd
,
focus_wnd
))
if
(
hwnd
==
GetFocus
())
SetFocus
(
0
);
/* A disabled window can't have the focus */
capture_wnd
=
GetCapture
();
...
...
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