Fixes for edit boxes in wine.
This commit is contained in:
1 parent
c5657ee5d4
commit
39b7488aea
7 files changed
+112
-7
No files matched your search
@@ -3,6 +3,7 @@
|
||||
#include "nvdaController.h"
|
||||
#include "menu_bridge.h"
|
||||
#include "edit_hook.h"
|
||||
#include "msaa_states.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
#include <gio/gio.h>
|
||||
@@ -522,14 +523,19 @@ void CALLBACK winevent_callback(HWINEVENTHOOK, DWORD event, HWND window,
|
||||
VARIANT role{};
|
||||
VariantInit(&role);
|
||||
std::string roleText;
|
||||
LONG roleId = 0;
|
||||
if (SUCCEEDED(accessible->get_accRole(child, &role)))
|
||||
roleText = variant_text(role);
|
||||
if (role.vt == VT_I4) roleId = role.lVal;
|
||||
VariantClear(&role);
|
||||
VARIANT state{};
|
||||
VariantInit(&state);
|
||||
std::string stateText;
|
||||
if (SUCCEEDED(accessible->get_accState(child, &state)))
|
||||
stateText = variant_text(state);
|
||||
bool password = false;
|
||||
if (SUCCEEDED(accessible->get_accState(child, &state)) && state.vt == VT_I4) {
|
||||
stateText = msaa_states(static_cast<DWORD>(state.lVal), roleId);
|
||||
password = state.lVal & STATE_SYSTEM_PROTECTED;
|
||||
}
|
||||
VariantClear(&state);
|
||||
LONG childCount = 0;
|
||||
accessible->get_accChildCount(&childCount);
|
||||
@@ -568,7 +574,7 @@ void CALLBACK winevent_callback(HWINEVENTHOOK, DWORD event, HWND window,
|
||||
ControlDescription control;
|
||||
control.name = name;
|
||||
control.role = roleText;
|
||||
control.value = value;
|
||||
control.value = password ? "" : value;
|
||||
control.states = stateText;
|
||||
control.description = description;
|
||||
control.count = static_cast<int>(childCount);
|
||||
|
||||
Reference in new issue
Block a user