Le 13/05/2018 à 04:07, Richard Kimberly Heck a écrit :
Right, in that case, we do reload. So we'll have to request an explicit redraw of the screen,
and I suppose a reload of the dialogs, etc.

I'm not sure how to do that, but either I'll figure it out or someone will tell me.....

What about this patch?

JMarc


From e6f1e54238b0ca51ccc2d7c288d7f1c83f44734b Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Mon, 14 May 2018 09:46:54 +0200
Subject: [PATCH] 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.
---
 src/frontends/qt4/GuiWorkArea.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp
index 7c80fcc..8dc0739 100644
--- a/src/frontends/qt4/GuiWorkArea.cpp
+++ b/src/frontends/qt4/GuiWorkArea.cpp
@@ -1247,9 +1247,14 @@ 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 back at
+	// this point, copy our backing store to screen.
+	if (view().busy()) {
+		d->updateScreen(ev->rect());
+		ev->accept();
 		return;
+	}
 
 	// LYXERR(Debug::PAINTING, "paintEvent begin: x: " << rc.x()
 	//	<< " y: " << rc.y() << " w: " << rc.width() << " h: " << rc.height());
-- 
2.7.4

Reply via email to