diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-06-30 13:52:46 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-06-30 15:19:24 +0200 |
commit | 2021c6c8f74df35f7bf71f9d4a6208c055a3cf15 (patch) | |
tree | 30051aceb2ba2f1e0c9a6c85699ba7164b3d537b /src/widgets/util | |
parent | 813462a0cedc1053c6460c3db6734ec534fe3363 (diff) |
Fix pixel noise in X11 systray icons that are not 22x22
If a system tray icon is set to a non default size by an X11 system tray,
the area beyond 22x22 will not be painted, since the first paint is
performed before the first resize, and the first resize does not trigger
expose either.
The bug can be seen in KDE if the system tray is not 22 pixel height.
This patch triggers updates on resize to ensure we always repaint
fully on resize.
Change-Id: Ia81d2329a2c9faff220f07163ac38cafbd520ffc
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets/util')
-rw-r--r-- | src/widgets/util/qsystemtrayicon_x11.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/widgets/util/qsystemtrayicon_x11.cpp b/src/widgets/util/qsystemtrayicon_x11.cpp index 347e5701c0..21ce23437f 100644 --- a/src/widgets/util/qsystemtrayicon_x11.cpp +++ b/src/widgets/util/qsystemtrayicon_x11.cpp @@ -83,6 +83,7 @@ protected: virtual void mouseDoubleClickEvent(QMouseEvent *ev); virtual bool event(QEvent *); virtual void paintEvent(QPaintEvent *); + virtual void resizeEvent(QResizeEvent *); private slots: void systemTrayWindowChanged(QScreen *screen); @@ -205,6 +206,11 @@ void QSystemTrayIconSys::paintEvent(QPaintEvent *) q->icon().paint(&painter, rect); } +void QSystemTrayIconSys::resizeEvent(QResizeEvent *) +{ + update(); +} + //////////////////////////////////////////////////////////////////////////// QSystemTrayIconPrivate::QSystemTrayIconPrivate() |