The position of the cursor should not be decreased if it is already at
the start of the paragraph. This can lead to a crash when trying to
display the caret.
(cherry picked from commit 16be88ca18719a98a555ced268431ca1040658b7)
Since the platform is selected at run time (e.g. xcb vs. Wayland), it
is not a good idea to decide at compile time what code is run. Another
example is on macOS, where having xcb libraries available will lead to
lauching the Xquartz whenever LyX is running.
With this patch, things are separated:
- the code is run when run-time platform is "xcb".
- the support code is compiled in when xcb header and libraries are
available.
The cmake code is courtesy of Kornel Benko.
Fixes ticket #13086.
(cherry picked from commit 18c310a8cf60ebc8cab27aeea6fc0a6e1fcc7fcc)
(cherry picked from commit f1fddd86efa22ac9342de723f5ca724f252f8cbe)
(cherry picked from commit 3bc4554e5762c3484477e1c590632756e3f310ad)
(cherry picked from commit 8c14748e782d93870a7328df383403fb37da936f)
Instead of baking our own support for -geometry command line option on
Windows (Qt only does that for Xcb), use the fact that Qt 5 provides
the equivalent -qwindowgeometry flag.
All we need to do is to replace the -geometry option with -qwindowgeometry.
This is part of the effort in ticket #13086 to get rid of the
compile-time QPA_XCB define.
(cherry picked from commit ce9de28f06eb770ae440992fb8ca8b98a07c1cfd)
The current buffer is part of allRelatives(), contrary to what I
thought. Therefore updateId() increased the buffer id by two.
(cherry picked from commit 2eb4e3d3ca063d12371695282ae0bc3d9609ab06)
Each buffer now has an id which is increased when it is marked dirty
(or when one of its relatives is marked dirty).
This can be a big win since updateMacros is very expensive.
(cherry picked from commit 999fb37ebb1aecfda9889fa6a2b2fbb15133f2aa)
(cherry picked from commit fe1a3b57df2cd6adf1bd4752d05b1aae40a4e5b7)
It makes reload more robust and is in any case good enough to avoid
crash in #139091.
Fixes bug #13091.
(cherry picked from commit 52ec69a1af7f8c860d6f1d6ed6337db58d5ce163)
That module was a wrapper over the popen module and it was scheduled to
be removed in Python 3.11.
This code is also compatible with Python 2.
(cherry picked from commit d06a034578da4b20fb26e53ff983a77ca90bd07c)
* The image scale param is shared by XHTML and DocBook
* It does not only apply to math
* Get rid of redundant group headers (#12902)
(cherry picked from commit 1429552063dfe9909dd5789b9fb1715ddee7d77d)
This is needed to provide ePub and other DocBook-based exports with
the right (renamed) images (fixes#12372)
(cherry picked from commit 03c58420060fef520d74d835bb39e1b1c9fd7c1e)
It turns out that Qt font selection via style name is broken on
Windows (QTBUG-101436). As we use our own style name for discriminating
our math fonts and applying proper kerning, we need a fallback method.
With this commit we check for the family name when the style name does
not match. In computing the kerning we also consider the right bearing
reported by the font instead of the width of the enclosing bounding box,
as this produces better results (see bug 13087).
Fixes#13087.
(cherry picked from commit d632753dea7cd3985f64b0c7e9db055c5a6c48f4)
Each token could be delimited by quotation marks or not. The previous
regexes only considered this for two tokens and hence produced wrong
matches for cases such as
\Format gnuplot "gp, gnuplot, plt" "Gnuplot" "" "" "" "vector" "text/plain"
where the extension list wasn't parsed as a single token.
(cherry picked from commit 1efdc11296b0acf98d1180e18c0daa3e9a79bfec)