arsd bug fixes, stack overflow answer about X child windows

Posted 2022-04-04

I've done a little bit of work on my D browser, but most the week has been spent fixing bugs and doing work meetings, but I'll link to something I wrote about X below.

Core D Development Statistics

In the community

Community announcements

See more at the announce forum.

What Adam is working on

I had to fix more bugs in minigui, http2, and my new webview, some of which originate from inside the upstream chromium code and are exasperated inside the chromium embedded framework.

The minigui bugs were caused by performance enhancements I implemented after enabling visual styles in a test program and I think they're good enough now: the resize performance is significantly improved by deferring redraw events, but that created redraw problems. I think I got them mostly fixed, and also found a transparency regression enabling something a few weeks ago on button borders. All quite minor, but it ruined the look.

The http2 bugs were related to openssl cert verifications on Windows. With older openssl versions, it wasn't verifying at all, and the newer openssl version is often distributed with a different filename, so it was unlikely to be loaded, even if present. I changed the code to look for the new version first now, and then import certificates from Windows, skipping the expired one that was breaking Let's Encrypt. It does NOT auto-update Windows certs since OpenSSL does the actual verification, skipping the Windows thing. But this is normal for openssl and your certs likely updated by other programs anyway. Still, it was a bit of an ordeal to track down.

Finally, with the webview fixes, it had to do with focus stealing being done by CEF. I had to disable this to make the program usable, but this broke other things. Some of the X analysis from this I wrote up on stack overflow here:

and the code is committed - I overrided the hook to disable their horrible internal action, and sent javascript to simulate the focus/blur events as the weird core code wouldn't work if it never got the native explicit focus. Strange. I am hoping doing my end of the XEmbed implementation will make it smoother too, but there's no hits for that in the CEF code, so it might not cooperate, we'll see.

I might release more info about my custom browser later, it is a fairly simple thing (most the code in arsd.minigui_addons.webview, which im trying to keep reusable for other D tasks) but I'm not sure, it keeps it simple just focusing on what works for me without worrying about anyone else.