projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ldap: Some cleanups for GH-170
[quassel.git]
/
src
/
uisupport
/
graphicalui.cpp
diff --git
a/src/uisupport/graphicalui.cpp
b/src/uisupport/graphicalui.cpp
index
0fb34b0
..
3d3c3b6
100644
(file)
--- a/
src/uisupport/graphicalui.cpp
+++ b/
src/uisupport/graphicalui.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
5
by the Quassel Project *
+ * Copyright (C) 2005-201
6
by the Quassel Project *
* 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 *
@@
-52,6
+52,9
@@
GraphicalUi::GraphicalUi(QObject *parent) : AbstractUi(parent)
#ifdef Q_OS_WIN
_dwTickCount = 0;
#endif
#ifdef Q_OS_WIN
_dwTickCount = 0;
#endif
+#ifdef Q_OS_MAC
+ GetFrontProcess(&_procNum);
+#endif
}
}
@@
-146,6
+149,9
@@
bool GraphicalUi::eventFilter(QObject *obj, QEvent *event)
}
}
+// NOTE: Window activation stuff seems to work just fine in Plasma 5 without requiring X11 hacks.
+// TODO: Evaluate cleaning all this up once we can get rid of Qt4/KDE4
+
// 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)
@@
-296,9
+302,13
@@
void GraphicalUi::activateMainWidget()
// 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
+#ifdef Q_OS_MAC
+ SetFrontProcess(&instance()->_procNum);
+#else
mainWidget()->show();
mainWidget()->raise();
mainWidget()->activateWindow();
mainWidget()->show();
mainWidget()->raise();
mainWidget()->activateWindow();
+#endif
#endif /* HAVE_KDE4 */
}
#endif /* HAVE_KDE4 */
}
@@
-312,7
+322,11
@@
void GraphicalUi::hideMainWidget()
#endif
if (instance()->isHidingMainWidgetAllowed())
#endif
if (instance()->isHidingMainWidgetAllowed())
+#ifdef Q_OS_MAC
+ ShowHideProcess(&instance()->_procNum, false);
+#else
mainWidget()->hide();
mainWidget()->hide();
+#endif
}
}