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
24dc6600
Commit
24dc6600
authored
Mar 10, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix item selection with VK_SPACE when Ctrl is pressed.
parent
1a2ccfe9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
listview.c
dlls/comctl32/listview.c
+12
-10
No files found.
dlls/comctl32/listview.c
View file @
24dc6600
...
...
@@ -425,7 +425,7 @@ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *, INT, BOOL);
static
LRESULT
LISTVIEW_Command
(
const
LISTVIEW_INFO
*
,
WPARAM
,
LPARAM
);
static
BOOL
LISTVIEW_SortItems
(
LISTVIEW_INFO
*
,
PFNLVCOMPARE
,
LPARAM
);
static
INT
LISTVIEW_GetStringWidthT
(
const
LISTVIEW_INFO
*
,
LPCWSTR
,
BOOL
);
static
BOOL
LISTVIEW_KeySelection
(
LISTVIEW_INFO
*
,
INT
);
static
BOOL
LISTVIEW_KeySelection
(
LISTVIEW_INFO
*
,
INT
,
BOOL
);
static
UINT
LISTVIEW_GetItemState
(
const
LISTVIEW_INFO
*
,
INT
,
UINT
);
static
BOOL
LISTVIEW_SetItemState
(
LISTVIEW_INFO
*
,
INT
,
const
LVITEMW
*
);
static
LRESULT
LISTVIEW_VScroll
(
LISTVIEW_INFO
*
,
INT
,
INT
,
HWND
);
...
...
@@ -1590,7 +1590,7 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
nItem
=
notify_hdr
(
infoPtr
,
LVN_ODFINDITEMW
,
(
LPNMHDR
)
&
nmlv
.
hdr
);
if
(
nItem
!=
-
1
)
LISTVIEW_KeySelection
(
infoPtr
,
nItem
);
LISTVIEW_KeySelection
(
infoPtr
,
nItem
,
FALSE
);
return
0
;
}
...
...
@@ -1623,7 +1623,7 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
}
while
(
idx
!=
endidx
);
if
(
nItem
!=
-
1
)
LISTVIEW_KeySelection
(
infoPtr
,
nItem
);
LISTVIEW_KeySelection
(
infoPtr
,
nItem
,
FALSE
);
return
0
;
}
...
...
@@ -3220,12 +3220,13 @@ static void LISTVIEW_SetSelection(LISTVIEW_INFO *infoPtr, INT nItem)
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I] nItem : item index
* [I] space : VK_SPACE code sent
*
* RETURN:
* SUCCESS : TRUE (needs to be repainted)
* FAILURE : FALSE (nothing has changed)
*/
static
BOOL
LISTVIEW_KeySelection
(
LISTVIEW_INFO
*
infoPtr
,
INT
nItem
)
static
BOOL
LISTVIEW_KeySelection
(
LISTVIEW_INFO
*
infoPtr
,
INT
nItem
,
BOOL
space
)
{
/* FIXME: pass in the state */
WORD
wShift
=
HIWORD
(
GetKeyState
(
VK_SHIFT
));
...
...
@@ -3252,11 +3253,12 @@ static BOOL LISTVIEW_KeySelection(LISTVIEW_INFO *infoPtr, INT nItem)
LVITEMW
lvItem
;
lvItem
.
state
=
~
LISTVIEW_GetItemState
(
infoPtr
,
nItem
,
LVIS_SELECTED
);
lvItem
.
stateMask
=
LVIS_SELECTED
;
LISTVIEW_SetItemState
(
infoPtr
,
nItem
,
&
lvItem
);
if
(
lvItem
.
state
&
LVIS_SELECTED
)
infoPtr
->
nSelectionMark
=
nItem
;
if
(
space
)
{
LISTVIEW_SetItemState
(
infoPtr
,
nItem
,
&
lvItem
);
if
(
lvItem
.
state
&
LVIS_SELECTED
)
infoPtr
->
nSelectionMark
=
nItem
;
}
bResult
=
LISTVIEW_SetItemFocus
(
infoPtr
,
nItem
);
}
else
...
...
@@ -8560,7 +8562,7 @@ static LRESULT LISTVIEW_KeyDown(LISTVIEW_INFO *infoPtr, INT nVirtualKey, LONG lK
}
if
((
nItem
!=
-
1
)
&&
(
nItem
!=
infoPtr
->
nFocusedItem
||
nVirtualKey
==
VK_SPACE
))
LISTVIEW_KeySelection
(
infoPtr
,
nItem
);
LISTVIEW_KeySelection
(
infoPtr
,
nItem
,
nVirtualKey
==
VK_SPACE
);
return
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