Goldwave helped find more missing functionality.
This commit is contained in:
1 parent
df7879acb5
commit
67ebc28d15
9 files changed
+134
-8
No files matched your search
@@ -38,6 +38,7 @@ HWND lastListControl = nullptr;
|
||||
int lastListIndex = -1;
|
||||
int lastListCount = 0;
|
||||
bool lastListSelected = false;
|
||||
int lastListChecked = -1;
|
||||
HWND lastNativeControl = nullptr;
|
||||
NativeItemKey lastNativeItem;
|
||||
|
||||
@@ -332,10 +333,15 @@ ControlDescription describe_standard_control(HWND window) {
|
||||
if (!row.text.empty()) control.position = row.index + 1;
|
||||
control.count = row.count;
|
||||
if (row.selected) control.states = "selected";
|
||||
if (row.checked >= 0) {
|
||||
if (!control.states.empty()) control.states += ", ";
|
||||
control.states += row.checked ? "checked" : "not checked";
|
||||
}
|
||||
lastListControl = window;
|
||||
lastListIndex = row.index;
|
||||
lastListCount = row.count;
|
||||
lastListSelected = row.selected;
|
||||
lastListChecked = row.checked;
|
||||
return control;
|
||||
}
|
||||
|
||||
@@ -427,6 +433,7 @@ void poll_control_focus(bool refresh = false) {
|
||||
lastListIndex = -1;
|
||||
lastListCount = 0;
|
||||
lastListSelected = false;
|
||||
lastListChecked = -1;
|
||||
const auto key = native_item_key(info.hwndFocus);
|
||||
if (info.hwndFocus != lastNativeControl) {
|
||||
present_standard_focus(info.hwndFocus);
|
||||
@@ -448,9 +455,11 @@ void poll_control_focus(bool refresh = false) {
|
||||
SendMessageTimeoutW(info.hwndFocus, LVM_GETITEMSTATE, index, LVIS_SELECTED,
|
||||
SMTO_ABORTIFHUNG, 100, &state);
|
||||
const bool selected = state & LVIS_SELECTED;
|
||||
const int checked = list_view_checked(info.hwndFocus, index);
|
||||
if (info.hwndFocus != lastListControl) {
|
||||
present_standard_focus(info.hwndFocus);
|
||||
} else if (refresh || index != lastListIndex || count != lastListCount || selected != lastListSelected) {
|
||||
} else if (refresh || index != lastListIndex || count != lastListCount ||
|
||||
selected != lastListSelected || checked != lastListChecked) {
|
||||
const auto control = describe_standard_control(info.hwndFocus);
|
||||
present_accessible_event(source_id(info.hwndFocus, "standard"), "selection",
|
||||
control, window_title(info.hwndFocus));
|
||||
@@ -461,6 +470,7 @@ void poll_control_focus(bool refresh = false) {
|
||||
lastListIndex = -1;
|
||||
lastListCount = 0;
|
||||
lastListSelected = false;
|
||||
lastListChecked = -1;
|
||||
}
|
||||
|
||||
void present_menu_event(const WineAccessMenuEvent &event) {
|
||||
|
||||
Reference in new issue
Block a user