summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Piekos <mateuszpiekos@gmail.com>2012-06-14 14:23:32 (GMT)
committerMateusz Piekos <mateuszpiekos@gmail.com>2012-06-14 14:23:32 (GMT)
commit83f6dbd0036f3f2e23f9015626ef42d4836fbeee (patch)
tree0fbb4ce455b3b22133138ffcd7dd714cc3f652d1 /Swift/Controllers/WhiteboardManager.cpp
parent94259d74a5f21d7dbe4ef30bfe433e3950c135f6 (diff)
downloadswift-contrib-83f6dbd0036f3f2e23f9015626ef42d4836fbeee.zip
swift-contrib-83f6dbd0036f3f2e23f9015626ef42d4836fbeee.tar.bz2
Improved session initialization from UI side
Diffstat (limited to 'Swift/Controllers/WhiteboardManager.cpp')
-rw-r--r--Swift/Controllers/WhiteboardManager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Swift/Controllers/WhiteboardManager.cpp b/Swift/Controllers/WhiteboardManager.cpp
index f6db4ff..c62ce3d 100644
--- a/Swift/Controllers/WhiteboardManager.cpp
+++ b/Swift/Controllers/WhiteboardManager.cpp
@@ -12,6 +12,7 @@
#include <Swift/Controllers/UIEvents/RequestWhiteboardUIEvent.h>
#include <Swift/Controllers/UIEvents/AcceptWhiteboardSessionUIEvent.h>
#include <Swift/Controllers/UIEvents/CancelWhiteboardSessionUIEvent.h>
+#include <Swift/Controllers/UIEvents/ShowWhiteboardUIEvent.h>
#include <Swiften/Client/StanzaChannel.h>
#include <Swiften/Whiteboard/WhiteboardSessionManager.h>
@@ -61,6 +62,13 @@ namespace Swift {
if (sessionCancelEvent) {
cancelSession(sessionCancelEvent->getContact());
}
+ boost::shared_ptr<ShowWhiteboardUIEvent> showWindowEvent = boost::dynamic_pointer_cast<ShowWhiteboardUIEvent>(event);
+ if (showWindowEvent) {
+ WhiteboardWindow* window = findWhiteboardWindow(showWindowEvent->getContact());
+ if (window != NULL) {
+ window->activateWindow();
+ }
+ }
}
void WhiteboardManager::acceptSession(const JID& from) {