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
fb298aed
Commit
fb298aed
authored
Feb 20, 2014
by
Huw Davies
Committed by
Alexandre Julliard
Feb 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: If the listbox loses focus while holding capture, release it by…
user32: If the listbox loses focus while holding capture, release it by essentially simulating a button up event.
parent
5782bac2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
listbox.c
dlls/user32/listbox.c
+1
-0
listbox.c
dlls/user32/tests/listbox.c
+30
-0
No files found.
dlls/user32/listbox.c
View file @
fb298aed
...
...
@@ -2995,6 +2995,7 @@ LRESULT ListBoxWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
SEND_NOTIFICATION
(
descr
,
LBN_SETFOCUS
);
return
0
;
case
WM_KILLFOCUS
:
LISTBOX_HandleLButtonUp
(
descr
);
/* Release capture if we have it */
descr
->
in_focus
=
FALSE
;
descr
->
wheel_remain
=
0
;
if
((
descr
->
focus_item
!=
-
1
)
&&
descr
->
caret_on
)
...
...
dlls/user32/tests/listbox.c
View file @
fb298aed
...
...
@@ -234,6 +234,8 @@ static void check_item_height(void)
DestroyWindow
(
hLB
);
}
static
int
got_selchange
;
static
LRESULT
WINAPI
main_window_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
msg
)
...
...
@@ -267,6 +269,10 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
break
;
}
case
WM_COMMAND
:
if
(
HIWORD
(
wparam
)
==
LBN_SELCHANGE
)
got_selchange
++
;
break
;
default:
break
;
}
...
...
@@ -1588,6 +1594,29 @@ todo_wine
DestroyWindow
(
parent
);
}
static
void
test_missing_lbuttonup
(
void
)
{
HWND
listbox
,
parent
,
capture
;
parent
=
create_parent
();
listbox
=
create_listbox
(
WS_CHILD
|
WS_VISIBLE
,
parent
);
/* Send button down without a corresponding button up */
SendMessageA
(
listbox
,
WM_LBUTTONDOWN
,
0
,
MAKELPARAM
(
10
,
10
));
capture
=
GetCapture
();
ok
(
capture
==
listbox
,
"got %p expected %p
\n
"
,
capture
,
listbox
);
/* Capture is released and LBN_SELCHANGE sent during WM_KILLFOCUS */
got_selchange
=
0
;
SetFocus
(
NULL
);
capture
=
GetCapture
();
ok
(
capture
==
NULL
,
"got %p
\n
"
,
capture
);
ok
(
got_selchange
,
"got %d
\n
"
,
got_selchange
);
DestroyWindow
(
listbox
);
DestroyWindow
(
parent
);
}
START_TEST
(
listbox
)
{
const
struct
listbox_test
SS
=
...
...
@@ -1668,4 +1697,5 @@ START_TEST(listbox)
test_listbox_dlgdir
();
test_set_count
();
test_GetListBoxInfo
();
test_missing_lbuttonup
();
}
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