This change solves dialog stacking problems on newer Mac OS X in combination with the OS provided file open dialog.
(cherry picked from commit 97dc585138)
Now painting the workarea is done at paint events as should be.
Explicit painting after updating metrics has been replaced by a much
lighter procedure (updatePosCache) to update the insets positions cache.
Expected benefits:
- better performance
- proper use of subpixel aliasing
The LyXRC variable use_qimage is not needed anymore and is therefore removed.
This patch makes sure that, every time a ParagraphMetrics has its
position set, the inset positions for the insets held by this
paragraph are remembered too.
This is complementary to BufferView::updatePosCache, but I do not have
hard evidence that this is required other than to increase robustness.
It may help in some cases when scrolling the document (scrollbar,
cursor up/down, page up/down).
This unbreaks input methods by splitting the part of the code that
does the actual drawing to a separate paintPreeditText() method which
is called from paintEvent().
The proper solution would have been to introduce the preedit string in
the Row object, like is done for completion, but this is too complex
to do at this point.
The only change in behavior is that now the commit string is inserted
in one fell swoop, intead of emulating a number of key events.
Rename cursor to caret to in order to avoid ambiguity. The caret is
now the blinking thing only.
Remove unused header contents, and some not so useful methods.
No intended change of behavior.
The trick is to remember in BufferView what has been done at the
previous draw, so that the row that contained the caret can be
repainted if needed.
To this end, add an argument paint_caret to BufferView, although
painting the caret is not the job of the BufferView (at this point).
BufferView::needRepaint will act as an interface with
TextMetrics::drawParagraph to know whether the painting of a given
row should be forced.
Currently everything is done at the top row level, so that, if the
caret is in a large table, the whole table will have to be repainted.
It is not clear yet that this is necessary.
Historically, because of two-stage drawing, LyX has been painting on a
Pixmap, and this pixmap is copied to screen at paint event time.
Now that we have three-stage drawing, it is possible to delay the
painting to actual paint event and avoid the intermediate Pixmap.
Known bug: the cursor is never erased.
This fixes the display of closed ERTs, Indexes etc. when they contain
special chars, logos or quotation marks.
(Since quotation marks in ERTs are now insets, not chars anymore,
this also fixes a bug/regression of the display of babel shortcuts
such as "= in closed ERTs; hence I consider this fix necessary for 2.3.x)