mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Avoid black screen on macOS
When paintEvent is triggered on macOS, the least we can do is to copy our backing store to the screen.
This commit is contained in:
parent
3591aa833f
commit
d03deeca0c
@ -1247,9 +1247,15 @@ void GuiWorkArea::Private::paintPreeditText(GuiPainter & pain)
|
||||
|
||||
void GuiWorkArea::paintEvent(QPaintEvent * ev)
|
||||
{
|
||||
// Hopefully fixes bug #10989.
|
||||
if (view().busy())
|
||||
// Do not trigger the painting machinery if we are not ready (see
|
||||
// bug #10989). However, since macOS has turned the screen black at
|
||||
// this point, our backing store has to be copied to screen.
|
||||
if (view().busy()) {
|
||||
// this is a no-op except on macOS.
|
||||
d->updateScreen(ev->rect());
|
||||
ev->accept();
|
||||
return;
|
||||
}
|
||||
|
||||
// LYXERR(Debug::PAINTING, "paintEvent begin: x: " << rc.x()
|
||||
// << " y: " << rc.y() << " w: " << rc.width() << " h: " << rc.height());
|
||||
|
Loading…
Reference in New Issue
Block a user