Subject: bug#51473: [PATCH] Enable xwidget scrolling optimizations, and other xwidgets improvements

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 05 Nov 2021 00:11:58 +0100

Po Lu <[email-masked]> writes:

> The attached changes fix flickering xwidgets by moving xwidget display
> into a separate X window, and also enable the scrolling optimization for
> xwidgets.

Sounds good...

> Someone with access to a Mac will have to do the changes necessary for
> xwidget scrolling to work correctly on macOS, as they don't work on
> GNUstep in the first place.

Does this mean that these patches will break the Macos build?

> However, event passthrough doesn't work yet, and will require some
> thought.  But that would be a fantastic opportunity to clean up the
> current xwidget event handling mess (and perhaps even define a mechanism
> for Lisp code to send events into xwidgets, which would make integrating
> them into the existing Emacs event model much easier.)  Any thoughts?

I'm not really that familiar with how xwidget works, so er does this
mean that the events work less with your patch than before?

I'm unable to test this at all, because:

larsi@elva:~/src/emacs/trunk$ emake;  ./src/emacs -geometry -0+0  
Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal

** (emacs:2173922): ERROR **: 00:09:01.997: GApplication is required for xdg-desktop-portal access in the WebKit sandbox.
Fatal error 5: Trace/breakpoint trap

This is on Debian/bookwork.  (And without your patch, just building with
xwidget and `M-x xwidget-webkit-browse-url RET fsf.org RET', and Emacs
crashes.)  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no