[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] krita/ui: Add a workaround for Intel video driver on Windows
From: Dmitry Kazakov <dimula73 () gmail ! com>
Date: 2014-02-01 6:42:37
Message-ID: E1W9UHl-0003VB-GH () scm ! kde ! org
[Download RAW message or body]
Git commit 77fb87c6dc97d4db88c31a831decc8c6536181ad by Dmitry Kazakov.
Committed on 01/02/2014 at 06:41.
Pushed by dkazakov into branch 'master'.
Add a workaround for Intel video driver on Windows
This workaround just warns the user and shows the scrollbars on screen.
CCBUG:330040
M +44 -0 krita/ui/kis_view2.cpp
http://commits.kde.org/calligra/77fb87c6dc97d4db88c31a831decc8c6536181ad
diff --git a/krita/ui/kis_view2.cpp b/krita/ui/kis_view2.cpp
index 4548977..a0332ae 100644
--- a/krita/ui/kis_view2.cpp
+++ b/krita/ui/kis_view2.cpp
@@ -1384,9 +1384,53 @@ void KisView2::showStatusBar(bool toggled)
}
}
+#if defined HAVE_OPENGL && defined Q_OS_WIN32
+#include <QGLContext>
+#endif
+
void KisView2::showJustTheCanvas(bool toggled)
{
KisConfig cfg;
+
+/**
+ * Workaround for a broken Intel video driver on Windows :(
+ * See bug 330040
+ */
+#if defined HAVE_OPENGL && defined Q_OS_WIN32
+
+ if (toggled && cfg.useOpenGL()) {
+ QString renderer((const char*)glGetString(GL_RENDERER));
+ bool failingDriver = renderer.startsWith("Intel(R) HD Graphics");
+
+ if (failingDriver &&
+ cfg.hideStatusbarFullscreen() &&
+ cfg.hideDockersFullscreen() &&
+ cfg.hideTitlebarFullscreen() &&
+ cfg.hideMenuFullscreen() &&
+ cfg.hideToolbarFullscreen() &&
+ cfg.hideScrollbarsFullscreen()) {
+
+ int result =
+ KMessageBox::warningYesNo(this,
+ "Intel(R) HD Graphics video adapters "
+ "are known to have problems with running "
+ "Krita in pure canvas only mode. At least "
+ "one UI control must be shown to "
+ "workaround it.\n\nShow the scroll bars?",
+ "Failing video adapter",
+ KStandardGuiItem::yes(),
+ KStandardGuiItem::no(),
+ "messagebox_WorkaroundIntelVideoOnWindows");
+
+ if (result == KMessageBox::Yes) {
+ cfg.setHideScrollbarsFullscreen(false);
+ }
+ }
+ }
+
+#endif /* defined HAVE_OPENGL && defined Q_OS_WIN32 */
+
+
KToggleAction *action;
if (cfg.hideStatusbarFullscreen()) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic