Le 03/10/2017 à 21:32, Jean-Marc Lasgouttes a écrit :
So there are some situations where LyX tries to make a minimal redraw because ut thinks that the screen is still correct, although Qt actually wiped it out. We have to find a way to detect these cases.

Could you try the following debug patch? It prints out the code of all events the GuiWordArea::event() sees. I also removed the cursor blinking to reduce the number of events.

Could you send me the events that get printed on console at the moment where the screen turns black?

JMarc
From 5c11808643ae58b790cf38b3b5ba2d62194f95fa Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Wed, 4 Oct 2017 15:26:41 +0200
Subject: [PATCH] debug

---
 src/frontends/qt4/GuiWorkArea.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp
index 36dd253..25114eb 100644
--- a/src/frontends/qt4/GuiWorkArea.cpp
+++ b/src/frontends/qt4/GuiWorkArea.cpp
@@ -242,7 +242,7 @@ GuiWorkArea::Private::Private(GuiWorkArea * parent)
   completer_(new GuiCompleter(p, p)), dialog_mode_(false), shell_escape_(false),
   read_only_(false), clean_(true), externally_modified_(false)
 {
-	int const time = QApplication::cursorFlashTime() / 2;
+	int const time = 1000000; //QApplication::cursorFlashTime() / 2;
 	if (time > 0) {
 		caret_timeout_.setInterval(time);
 		caret_timeout_.start();
@@ -683,6 +683,7 @@ void GuiWorkArea::scrollTo(int value)
 
 bool GuiWorkArea::event(QEvent * e)
 {
+	LYXERR0("handle event(" << e->type() << ")");
 	switch (e->type()) {
 	case QEvent::ToolTip: {
 		QHelpEvent * helpEvent = static_cast<QHelpEvent *>(e);
-- 
2.7.4

Reply via email to