From 4040b1ae2f1dad4350668af88ad1435c1a26ec5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 5 Dec 2011 15:29:26 +0100 Subject: [PATCH] queue aurorae decoration button events to prevent them from destroying the scene in the same event cycle BUG: 242116 REVIEW: 103336 --- clients/aurorae/src/aurorae.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp index 60ec2b2c1a..f6d59ca69d 100644 --- a/clients/aurorae/src/aurorae.cpp +++ b/clients/aurorae/src/aurorae.cpp @@ -40,6 +40,8 @@ AuroraeFactory::AuroraeFactory() void AuroraeFactory::init() { + qRegisterMetaType("Qt::MouseButtons"); + KConfig conf("auroraerc"); KConfigGroup group(&conf, "Engine"); @@ -137,16 +139,16 @@ AuroraeClient::AuroraeClient(KDecorationBridge *bridge, KDecorationFactory *fact options()->customButtonPositions() ? options()->titleButtonsLeft() : AuroraeFactory::instance()->theme()->defaultButtonsLeft(), options()->customButtonPositions() ? options()->titleButtonsRight() : AuroraeFactory::instance()->theme()->defaultButtonsRight(), providesContextHelp(), NULL); - connect(m_scene, SIGNAL(closeWindow()), SLOT(closeWindow())); - connect(m_scene, SIGNAL(maximize(Qt::MouseButtons)), SLOT(maximize(Qt::MouseButtons))); - connect(m_scene, SIGNAL(showContextHelp()), SLOT(showContextHelp())); - connect(m_scene, SIGNAL(minimizeWindow()), SLOT(minimize())); - connect(m_scene, SIGNAL(menuClicked()), SLOT(menuClicked())); - connect(m_scene, SIGNAL(menuDblClicked()), SLOT(closeWindow())); - connect(m_scene, SIGNAL(toggleOnAllDesktops()), SLOT(toggleOnAllDesktops())); - connect(m_scene, SIGNAL(toggleShade()), SLOT(toggleShade())); - connect(m_scene, SIGNAL(toggleKeepAbove()), SLOT(toggleKeepAbove())); - connect(m_scene, SIGNAL(toggleKeepBelow()), SLOT(toggleKeepBelow())); + connect(m_scene, SIGNAL(closeWindow()), SLOT(closeWindow()), Qt::QueuedConnection); + connect(m_scene, SIGNAL(maximize(Qt::MouseButtons)), SLOT(maximize(Qt::MouseButtons)), Qt::QueuedConnection); + connect(m_scene, SIGNAL(showContextHelp()), SLOT(showContextHelp()), Qt::QueuedConnection); + connect(m_scene, SIGNAL(minimizeWindow()), SLOT(minimize()), Qt::QueuedConnection); + connect(m_scene, SIGNAL(menuClicked()), SLOT(menuClicked()), Qt::QueuedConnection); + connect(m_scene, SIGNAL(menuDblClicked()), SLOT(closeWindow()), Qt::QueuedConnection); + connect(m_scene, SIGNAL(toggleOnAllDesktops()), SLOT(toggleOnAllDesktops()), Qt::QueuedConnection); + connect(m_scene, SIGNAL(toggleShade()), SLOT(toggleShade()), Qt::QueuedConnection); + connect(m_scene, SIGNAL(toggleKeepAbove()), SLOT(toggleKeepAbove()), Qt::QueuedConnection); + connect(m_scene, SIGNAL(toggleKeepBelow()), SLOT(toggleKeepBelow()), Qt::QueuedConnection); connect(m_scene, SIGNAL(titlePressed(Qt::MouseButton,Qt::MouseButtons)), SLOT(titlePressed(Qt::MouseButton,Qt::MouseButtons))); connect(m_scene, SIGNAL(titleReleased(Qt::MouseButton,Qt::MouseButtons)),