Notepad++ should work now.

This commit is contained in:
Storm Dragon committed 2026-10-10 22:39:24 -04:00
1 parent cbce83581a
commit df7879acb5
12 files changed
+523 -18

No files matched your search

+7 -3
View File
@@ -512,7 +512,10 @@ void present_text_event(const WineAccessTextEvent &event) {
if (owner == nullptr || owner != GetAncestor(GetForegroundWindow(), GA_ROOT) ||
!GetGUIThreadInfo(GetWindowThreadProcessId(owner, nullptr), &info) || info.hwndFocus != window)
return;
if ((GetWindowLongPtrW(window, GWL_STYLE) & ES_PASSWORD) &&
const bool scintilla = event.flags & WINE_ACCESS_TEXT_SCINTILLA;
const bool readOnly = scintilla ? (event.flags & WINE_ACCESS_TEXT_READONLY) != 0
: (GetWindowLongPtrW(window, GWL_STYLE) & ES_READONLY) != 0;
if (!scintilla && (GetWindowLongPtrW(window, GWL_STYLE) & ES_PASSWORD) &&
event.kind != WINE_ACCESS_TEXT_PASSWORD)
return;
std::string text = to_utf8(event.text);
@@ -527,7 +530,7 @@ void present_text_event(const WineAccessTextEvent &event) {
wchar_t label[256] = {};
find_control_label(window, label, std::size(label));
control.name = to_utf8(label);
control.role = GetWindowLongPtrW(window, GWL_STYLE) & ES_READONLY ? "read only edit" : "edit";
control.role = readOnly ? "read only edit" : "edit";
control.value = text.empty() ? "blank" : text;
} else {
if (text == " ") text = "space";
@@ -552,12 +555,13 @@ void present_text_event(const WineAccessTextEvent &event) {
// Re-establish focus before its first action without re-reading the document.
if (!focus && lastTextControl != window) {
ControlDescription focused;
focused.role = GetWindowLongPtrW(window, GWL_STYLE) & ES_READONLY ? "read only edit" : "edit";
focused.role = readOnly ? "read only edit" : "edit";
if (!present_accessible_event(source, "focus", focused, title)) return;
}
if (event.kind != WINE_ACCESS_TEXT_PASSWORD)
control.states = "start=" + std::to_string(event.start) + " end=" +
std::to_string(event.end) + " kind=" + std::to_string(event.kind);
if (scintilla) control.states += " offset_unit=byte";
// Text commands are ordered actions, not transient focus notifications.
if (present_accessible_event(source, focus ? "focus" : "text", control, title))
lastTextControl = window;