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
0ac74d18
Commit
0ac74d18
authored
Mar 27, 2017
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Always send WM_CANCELMODE when disabling a window.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b4fea4f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
13 deletions
+32
-13
msg.c
dlls/user32/tests/msg.c
+20
-1
win.c
dlls/user32/win.c
+12
-12
No files found.
dlls/user32/tests/msg.c
View file @
0ac74d18
...
...
@@ -1796,11 +1796,24 @@ static const struct message WmEnableWindowSeq_1[] =
static
const
struct
message
WmEnableWindowSeq_2
[]
=
{
{
WM_CANCELMODE
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
EVENT_OBJECT_STATECHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
0
}
};
static
const
struct
message
WmEnableWindowSeq_3
[]
=
{
{
EVENT_OBJECT_STATECHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
WM_ENABLE
,
sent
|
wparam
|
lparam
,
TRUE
,
0
},
{
0
}
};
static
const
struct
message
WmEnableWindowSeq_4
[]
=
{
{
EVENT_OBJECT_STATECHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
0
}
};
static
const
struct
message
WmGetScrollRangeSeq
[]
=
{
{
SBM_GETRANGE
,
sent
},
...
...
@@ -5484,8 +5497,14 @@ static void test_messages(void)
EnableWindow
(
hparent
,
FALSE
);
ok_sequence
(
WmEnableWindowSeq_1
,
"EnableWindow(FALSE)"
,
FALSE
);
EnableWindow
(
hparent
,
FALSE
);
ok_sequence
(
WmEnableWindowSeq_2
,
"EnableWindow(FALSE)"
,
FALSE
);
EnableWindow
(
hparent
,
TRUE
);
ok_sequence
(
WmEnableWindowSeq_3
,
"EnableWindow(TRUE)"
,
FALSE
);
EnableWindow
(
hparent
,
TRUE
);
ok_sequence
(
WmEnableWindowSeq_
2
,
"EnableWindow(TRUE)"
,
FALSE
);
ok_sequence
(
WmEnableWindowSeq_
4
,
"EnableWindow(TRUE)"
,
FALSE
);
flush_events
();
flush_sequence
();
...
...
dlls/user32/win.c
View file @
0ac74d18
...
...
@@ -2152,23 +2152,23 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
TRACE
(
"( %p, %d )
\n
"
,
hwnd
,
enable
);
retvalue
=
!
IsWindowEnabled
(
hwnd
);
if
(
enable
&&
retvalue
)
if
(
enable
)
{
WIN_SetStyle
(
hwnd
,
0
,
WS_DISABLED
)
;
SendMessageW
(
hwnd
,
WM_ENABLE
,
TRUE
,
0
);
retvalue
=
(
WIN_SetStyle
(
hwnd
,
0
,
WS_DISABLED
)
&
WS_DISABLED
)
!=
0
;
if
(
retvalue
)
SendMessageW
(
hwnd
,
WM_ENABLE
,
TRUE
,
0
);
}
else
if
(
!
enable
&&
!
retvalue
)
else
{
SendMessageW
(
hwnd
,
WM_CANCELMODE
,
0
,
0
);
WIN_SetStyle
(
hwnd
,
WS_DISABLED
,
0
);
SendMessageW
(
hwnd
,
WM_CANCELMODE
,
0
,
0
);
if
(
hwnd
==
GetFocus
())
SetFocus
(
0
);
/* A disabled window can't have the focus */
retvalue
=
(
WIN_SetStyle
(
hwnd
,
WS_DISABLED
,
0
)
&
WS_DISABLED
)
!=
0
;
if
(
!
retvalue
)
{
if
(
hwnd
==
GetFocus
())
SetFocus
(
0
);
/* A disabled window can't have the focus */
SendMessageW
(
hwnd
,
WM_ENABLE
,
FALSE
,
0
);
SendMessageW
(
hwnd
,
WM_ENABLE
,
FALSE
,
0
);
}
}
return
retvalue
;
}
...
...
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