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