* devel@quassel-irc.org *
* *
* This contains code from KStatusNotifierItem, part of the KDE libs *
* devel@quassel-irc.org *
* *
* This contains code from KStatusNotifierItem, part of the KDE libs *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
if (obj == mainWidget() && event->type() == QEvent::ActivationChange) {
_dwTickCount = GetTickCount();
}
if (obj == mainWidget() && event->type() == QEvent::ActivationChange) {
_dwTickCount = GetTickCount();
}
// Code taken from KStatusNotifierItem for handling minimize/restore
bool GraphicalUi::checkMainWidgetVisibility(bool perform)
{
// Code taken from KStatusNotifierItem for handling minimize/restore
bool GraphicalUi::checkMainWidgetVisibility(bool perform)
{
// the problem is that we lose focus when the systray icon is activated
// and we don't know the former active window
// therefore we watch for activation event and use our stopwatch :)
// the problem is that we lose focus when the systray icon is activated
// and we don't know the former active window
// therefore we watch for activation event and use our stopwatch :)
KWindowInfo info1 = KWindowSystem::windowInfo(mainWidget()->winId(), NET::XAWMState | NET::WMState | NET::WMDesktop);
// mapped = visible (but possibly obscured)
bool mapped = (info1.mappingState() == NET::Visible) && !info1.isMinimized();
KWindowInfo info1 = KWindowSystem::windowInfo(mainWidget()->winId(), NET::XAWMState | NET::WMState | NET::WMDesktop);
// mapped = visible (but possibly obscured)
bool mapped = (info1.mappingState() == NET::Visible) && !info1.isMinimized();
// this does not actually work on all platforms... and causes more evil than good
// mainWidget()->move(mainWidget()->frameGeometry().topLeft()); // avoid placement policies
// this does not actually work on all platforms... and causes more evil than good
// mainWidget()->move(mainWidget()->frameGeometry().topLeft()); // avoid placement policies
KWindowInfo info = KWindowSystem::windowInfo(mainWidget()->winId(), NET::WMDesktop | NET::WMFrameExtents);
_onAllDesktops = info.onAllDesktops();
#endif
if (instance()->isHidingMainWidgetAllowed())
KWindowInfo info = KWindowSystem::windowInfo(mainWidget()->winId(), NET::WMDesktop | NET::WMFrameExtents);
_onAllDesktops = info.onAllDesktops();
#endif
if (instance()->isHidingMainWidgetAllowed())