setWindowFlags for Toaster

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1281 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-05-28 16:21:01 +00:00
parent 8cdb8e077f
commit fe4bb1ce33

View File

@ -26,6 +26,10 @@
#include <QtGui/QtGui>
#ifdef OS_MACOSX
#include <MacWindows.h>
#endif
static const unsigned TIME_TO_SHOW = 20;
QtToaster::QtToaster(QWidget * toaster, QFrame * toasterWindowFrame)
@ -37,6 +41,15 @@ QtToaster::QtToaster(QWidget * toaster, QFrame * toasterWindowFrame)
_toaster = toaster;
_toaster->setParent(_toaster->parentWidget(), Qt::ToolTip | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
#ifdef OS_MACOSX
// Make sure the other windows of the application are not raised when the
// toaster appears
WId wid = _toaster->winId();
SetWindowGroup((WindowRef)wid, NULL);
#else
_toaster->setWindowFlags(_toaster->windowFlags() | Qt::ToolTip);
#endif
WidgetBackgroundImage::setBackgroundImage(toasterWindowFrame, ":images/toaster/toaster-backrs4.png", WidgetBackgroundImage::AdjustSize);
_toaster->resize(184, 128);