mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 02:52:13 +08:00
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From: Marco Martin <notmart@gmail.com>
|
|
Date: Tue, 29 Jul 2014 21:01:16 +0000
|
|
Subject: fix graphical glitch of xembed entries
|
|
X-Git-Url: http://quickgit.kde.org/?p=kde-workspace.git&a=commitdiff&h=3cdf85b5147382bf768d5b624ebf52a08748825b
|
|
---
|
|
fix graphical glitch of xembed entries
|
|
|
|
Patch by Dmitry Ivanov
|
|
The fix is a very simple one-liner setting FullViewportUpdate mode for FdoGraphicsWidget. I'm aware FullViewportUpdate has negative performance impact but I also know it efficiently leaves out any graphical glitches happening due to no repaint of widget when necessary (which is what the bug is about).
|
|
BUG:317066
|
|
REVIEW:114910
|
|
---
|
|
|
|
|
|
--- a/plasma/generic/applets/systemtray/protocols/fdo/fdographicswidget.cpp
|
|
+++ b/plasma/generic/applets/systemtray/protocols/fdo/fdographicswidget.cpp
|
|
@@ -64,6 +64,19 @@
|
|
resize(22, 22);
|
|
|
|
setCacheMode(QGraphicsItem::NoCache);
|
|
+
|
|
+ QGraphicsView *parentView = 0;
|
|
+
|
|
+ foreach (QGraphicsView *view, scene()->views()) {
|
|
+ if (view->isVisible() && view->sceneRect().intersects(sceneBoundingRect())) {
|
|
+ parentView = view;
|
|
+ break;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ if (parentView) {
|
|
+ parentView->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
|
+ }
|
|
|
|
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()),
|
|
this, SLOT(updateWidgetBackground()));
|