Summary: | RSIBreak uses too much pixmap memory while idle | ||
---|---|---|---|
Product: | [Applications] rsibreak | Reporter: | Richard Lärkäng <larkang> |
Component: | general | Assignee: | Tom Albers <toma> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | me |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | The patch I used |
Description
Richard Lärkäng
2007-04-03 14:48:29 UTC
Created attachment 20161 [details]
The patch I used
Here is the patch I applied. It seems to work fine here, but I'm not very
familiar with the code in rsibreak, so I don't know if there are any problems
with it.
Thanks a lot. We will take a look at the patch soon. SVN commit 668714 by toma: Keep memory footprint low when idle. Patch by Richard Larkang. Thanks a lot! Feel free to optimise more if you can. BUG: 143784 M +10 -2 rsiwidget.cpp M +1 -0 rsiwidget.h --- trunk/extragear/utils/rsibreak/src/rsiwidget.cpp #668713:668714 @@ -103,8 +103,6 @@ i18n("Welcome"), "dont_show_welcome_again_for_050"); - m_backgroundimage.resize(QApplication::desktop()->width(), - QApplication::desktop()->height()); setBackgroundMode( QWidget::NoBackground ); QRect rect = QApplication::desktop()->screenGeometry( QApplication::desktop()->primaryScreen() ); @@ -605,6 +603,16 @@ if (e->key() == m_accel->shortcut("minimize")) m_timer->skipBreak(); } + +void RSIWidget::hideEvent( QHideEvent * e) +{ + kdDebug() << k_funcinfo << endl; + m_backgroundimage = QPixmap(); + setBackgroundPixmap(m_backgroundimage); + + QWidget::hideEvent(e); +} + //--------------------------- CONFIG ----------------------------// void RSIWidget::startTimer( bool idle) --- trunk/extragear/utils/rsibreak/src/rsiwidget.h #668713:668714 @@ -106,6 +106,7 @@ virtual void mousePressEvent( QMouseEvent * e ); virtual void mouseReleaseEvent( QMouseEvent * e ); virtual void keyPressEvent( QKeyEvent * e); + virtual void hideEvent( QHideEvent * e); /** Sets appropriate icon in tooltip and docker. */ void setIcon( int ); |