Use the real ascent of glyph 'x' as LyX 2.3.x did.
It can make a difference at least on Windows with many fonts.
Fixes bug #13100.
(cherry picked from commit 194b53ef9d)
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 16be88ca18)
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 18c310a8cf)
(cherry picked from commit f1fddd86ef)
(cherry picked from commit 3bc4554e57)
(cherry picked from commit 8c14748e78)
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 ce9de28f06)
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 999fb37ebb)
(cherry picked from commit fe1a3b57df)
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 d06a034578)
Previously, the tooltip was assigned during updateBuffer. But then
we could not determine the value for forward references.
(cherry picked from commit b494286a9c)
There are several reasons to do it this way, among which is odd
behavior of the TOC filter if we put anything else there. This also
allows for filtering of the references themsevles in a natural way.
The change, I think, was really an unintended consequence of other
changes connected to showing formatted references in the work area.
(cherry picked from commit 1de4645286)
This trivial patch makes scrolling-by-selection smoother by dividing
the step size and the time between steps by 8 when generating
synthetic events in work area.
The scrolling speed is unchanged, but the result is visually better.
(cherry picked from commit 1cc1f0ba27)
\boxed{} is the only box in LaTeX that contains math. It is amusing
that the example file that we had for ticket #13609 should not have
been a problem since there is no reason to force <mtext> there.
(cherry picked from commit 1186d90edf)
Instead of generating code and parsing it to add <mtext>...</mtext> at
the right spots, this commit honors the text mode setting that was
already present in the codebase to generate it automatically.
This is the work of two helper methods in MathMLStream:
* beforeText() notices when the stream is in text mode and that a
<mtext> has not yet been generated. In this case it inserts it, so
that raw text can be emitted afterwards.
* beforeTag() checks whether a <mtext> needs to be closed at this
point, and does it if needed.
To make this work, the code now tracks the nesting level in the
stream, and compares it the what the level was when text mode has been
enabled using the SetMode helper function.
In order to avoid later bugs, member os() that allows to access the
underlying stream of MathMLStream is removed. This required many <<
operators to become friends of MathMLStream.
In InsetMathBox, rename splitAndWrapInMText() to mathmlizeHelper(),
which is not just a method that sets text mode inside a <mrow>
element.
In InsetMathFont and InsetMathHull, the explicit generation of nesting
in <mtext>...</mtext> can be removed now.
Fixes bug #13069.
(cherry picked from commit 216a6fb348)
When using system colors it may happen (on windows 11 in particular)
that the background color is actually translucid. This is not
something we are prepared to handle and it creates ghosts on screen.
The fix is easy: the alpha channel of the colors is set to 255.
Fixes bug #13084.
(cherry picked from commit 095bb18331)