The current stc sample built on the master branch should be resolved nvaccess/nvda#13976
But the above problem still exists in the 3.2.4 build. I'm not sure if the update to Scintilla solved this issue at the same time?
Also not sure if there are other accessibility issues?
Are there any plans to port this to 3.2.x?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
Scintilla can't be backported to 3.2. Because 3.2 is compatible with c++98, and Scintilla in the master branch requires c++11.
But maybe only the relevant changes can be backported. I'll try to install nvda and verify that it works in master. And then try to figure out what fixed it. One of the Scintilla updates, or something in wxWidgets.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
Seems like a bug in wxWidgets, not Scintilla. I compiled master with Scintilla 3.7.2 (the one used in 3.2 branch) and it works fine. When I run the stc sample of the 3.2 branch, the problem appears.
For reference, the problem from the linked issue:
Write some text ex. "Hello world" on the first row then press Enter
On the second row write "Hi"
Actual behavior:
In NVDA braille viewer the content with the cursor on the second row is:
" Hi llo world"
It seems in general that after the end of the row it concatenates the remaining characters from the longest row of the control.
I'll try to bisect and find out what fixed it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
Thank you very much for your work.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
It was fixed by fcc7430 Set wxALWAYS_NATIVE_DOUBLE_BUFFER to 1 to wxMSW too.
I don't think we can just apply that to 3.2, because it assumes all other double buffering and composition changes are applied.
The relevant line in the stc code is:
https://github.com/wxWidgets/wxWidgets/blob/b97aee419af105e5c724ead2917e1b04b9abb26a/src/stc/stc.cpp#L228-L234
Where SetBufferedDraw(false); fixes it. But this causes flickering without the double buffering fixes from master.
I'm not sure how NVDA works, but it seems to do some stuff with SCI_ messages. Maybe they can disable buffered drawing with the SCI_SETBUFFEREDDRAW message for stcwindow windows?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
I don't really understand this aspect. Maybe this is indeed a temporary way?
Cc @lukaszgo1, @seanbudd, @michaelDCurran Any thoughts?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
Maybe something else to look at. Is the wxStyledTextCtrl correctly identified as Scintilla control?
Spy++ says the classname of wxStyledTextCtrl will be wxWindow with window caption stcwindow.
elif windowClassName in ("Scintilla","TScintilla"):
from .scintilla import Scintilla as newCls
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
It was fixed by fcc7430
Set wxALWAYS_NATIVE_DOUBLE_BUFFER to 1 to wxMSW too.I don't think we can just apply that to 3.2, because it assumes all other double buffering and composition changes are applied.
The relevant line in the stc code is:
Where
SetBufferedDraw(false);fixes it. But this causes flickering without the double buffering fixes from master.I'm not sure how NVDA works, but it seems to do some stuff with
SCI_messages. Maybe they can disable buffered drawing with theSCI_SETBUFFEREDDRAWmessage forstcwindowwindows?
I followed this article and sent a window message to the wx.StyledTextCtrl control, but it didn't work.
NVDA has a gesture that calls out the wxPython GUI inspection tool. It contains the wx.StyledTextCtrl control. StyledTextCtrl` control, which can be found in the NVDA menu -> Preferences -> Input gestures... Input gestures... Under the Tools category.
Press NVDA+ctrl+z to open the Python console after moving focus to this control.
>>> import watchdog >>> SCI_GETBUFFEREDDRAW = 2034 >>> SCI_SETBUFFEREDDRAW = 2035 >>> nav.name 'stcwindow' >>> nav.windowClassName 'wxWindowNR' >>> watchdog.cancellableSendMessage(nav.windowHandle, SCI_GETBUFFEREDDRAW, 0, 0) 0 >>> watchdog.cancellableSendMessage(nav.windowHandle, SCI_SETBUFFEREDDRAW, 1, 0) 0 >>> watchdog.cancellableSendMessage(nav.windowHandle, SCI_GETBUFFEREDDRAW, 0, 0) 0 >>> watchdog.cancellableSendMessage(nav.windowHandle, SCI_SETBUFFEREDDRAW, 0, 0) 0 >>> watchdog.cancellableSendMessage(nav.windowHandle, SCI_GETBUFFEREDDRAW, 0, 0) 0
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
@MaartenBent any updates on this from wX side? Are you saying this should be fixed on NVDA side?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
I looked at it again, and I think I figured out the problems. NVDA doesn't recognize our control as Scintilla control, so it won't send scintilla messages (SCI_...) to get text and stuff.
I can fix that by using Scintilla as window class instead of wxWindowNR.
Second problem is we don't forward the scintilla messages to the Scintilla control. This is easy to fix.
We already forward WM_IME_ messages. I have to extend this to include the SCI_ messages.
With these fixes, all the lines appear correctly in the speech viewer. I'll try to create a PR with these fixes this weekend.
The double buffering stuff was a red herring. Because it wasn't recognized as Scintilla control, it was handled as normal Edit control instead. And this doesn't seem to work nicely with our double buffering.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()
Closed #18683 as completed via #25956.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.![]()