Fix memory leak on icon tray by letting events pass the parent widget.
This commit is contained in:
1 parent
c10bf4b177
commit
5f508fa47c
4 files changed
+7
No files matched your search
@@ -51,6 +51,7 @@ UnityIndicator::UnityIndicator(QWidget *obj_parent) :
|
|||||||
TrayIndicator(obj_parent)
|
TrayIndicator(obj_parent)
|
||||||
{
|
{
|
||||||
notify_init("qcma");
|
notify_init("qcma");
|
||||||
|
setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
UnityIndicator::~UnityIndicator()
|
UnityIndicator::~UnityIndicator()
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ static void noDebugOutput(QtMsgType type, const char *message)
|
|||||||
case QtFatalMsg:
|
case QtFatalMsg:
|
||||||
fprintf(stderr, "Fatal: %s\n", message);
|
fprintf(stderr, "Fatal: %s\n", message);
|
||||||
abort();
|
abort();
|
||||||
|
break;
|
||||||
|
case QtInfoMsg:
|
||||||
|
fprintf(stderr, "Info: %s\n", message);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ QTrayIcon::QTrayIcon(QWidget *obj_parent)
|
|||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
notify_init("qcma");
|
notify_init("qcma");
|
||||||
#endif
|
#endif
|
||||||
|
setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
QTrayIcon::~QTrayIcon()
|
QTrayIcon::~QTrayIcon()
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
KDENotifierTray::KDENotifierTray(QWidget *obj_parent)
|
KDENotifierTray::KDENotifierTray(QWidget *obj_parent)
|
||||||
: TrayIndicator(obj_parent)
|
: TrayIndicator(obj_parent)
|
||||||
{
|
{
|
||||||
|
setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KDENotifierTray::init()
|
void KDENotifierTray::init()
|
||||||
|
|||||||
Reference in new issue
Block a user