Le 05/10/2017 à 22:17, Jean-Marc Lasgouttes a écrit :
74 is PolishRequest, which is a weird thing related to Palettes. We might try to set need_resize_ when this event triggers, on the hypotheses that it is related to some QMacStyle code that resets the viewport when it should not. We asked to leave the viewport alone by setting WA_OpaquePaint.

Indeed, in the handling of QEvent::Tooltip it seems that there needs to be a full repaint when the tooltip is removed. I am not sure why it is not a problem on linux.

Could you try the following, on top of the debug patch if possible. If we are lucky, some cases may improve :)

JMarc

From 0bfd8e133ad9063d1a8d19e115388e812584a953 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Fri, 6 Oct 2017 10:18:47 +0200
Subject: [PATCH] Fix - first try

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

diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp
index 4ec72d4..5f144a7 100644
--- a/src/frontends/qt4/GuiWorkArea.cpp
+++ b/src/frontends/qt4/GuiWorkArea.cpp
@@ -713,6 +713,8 @@ bool GuiWorkArea::event(QEvent * e)
 			else
 				QToolTip::hideText();
 		}
+		d->need_resize_ = true;
+		viewport()->update();
 		// Don't forget to accept the event!
 		e->accept();
 		if (isBlack())
@@ -747,6 +749,11 @@ bool GuiWorkArea::event(QEvent * e)
 		return QAbstractScrollArea::event(e);
 	}
 
+	case QEvent::PolishRequest:
+		d->need_resize_ = true;
+		viewport()->update();
+		return QAbstractScrollArea::event(e);
+
 	default:
 		if (isBlack())
 			LYXERR0("Screen black after event(" << e->type() << ")");
-- 
2.7.4

Reply via email to