Version: 2.3 (using KDE 3.1.1) Installed from: SuSE Compiler: gcc version 3.3 20030226 (prerelease) (SuSE Linux) OS: Linux (i686) release 2.4.20-4GB-athlon If you set a knote window so that it's always in front of other windows, close and open it afterwards, it doesn't behave so anymore, although the window menu displays it as 'always in front'. In fact, if you remove 'always in front' from the window menu now, it suddenly stays in front.
Subject: kdepim/knotes CVS commit by brade: Awful and temporary hack to fix #57367: Always On Top property lost when hide->show a note. IMHO, this is a bug in KWin. Lubos, shouldn't NET::StaysOnTop be saved for hidden windows as well? CCMAIL: l.lunak@kde.org, 57367-done@bugs.kde.org M +6 -1 knote.cpp 1.82 M +2 -0 knote.h 1.26 M +5 -1 knotesapp.cpp 1.53 --- kdepim/knotes/knote.cpp #1.81:1.82 @@ -228,5 +228,10 @@ void KNote::saveConfig() const config.setGroup( "WindowDisplay" ); config.writeEntry( "desktop", wm_client.desktop() ); + + if ( isHidden() && m_alwaysOnTop->isChecked() ) + config.writeEntry( "state", wm_client.state() | NET::StaysOnTop ); + else config.writeEntry( "state", wm_client.state() ); + // TODO: move to group Display config.writeEntry( "position", pos() ); --- kdepim/knotes/knote.h #1.25:1.26 @@ -115,5 +115,7 @@ private: QString m_configFile; +public: KToggleAction *m_alwaysOnTop; +private: KListAction *m_toDesktop; --- kdepim/knotes/knotesapp.cpp #1.52:1.53 @@ -445,8 +445,12 @@ void KNotesApp::showNote( KNote* note ) else { + WId id = note->winId(); + // if not, show note on the current desktop note->show(); note->toDesktop( KWin::currentDesktop() ); - KWin::setActiveWindow( note->winId() ); + if ( note->m_alwaysOnTop->isChecked() ) + KWin::setState( id, KWin::info( id ).state | NET::StaysOnTop ); + KWin::setActiveWindow( id ); note->setFocus(); }