From 98ea35253a5bd8769b3623c8e9cf4b2c6c7b2174 Mon Sep 17 00:00:00 2001
From: Matthew Hodgson <matthew@matrix.org>
Date: Wed, 21 Oct 2015 01:21:21 +0100
Subject: [PATCH] shift-click the video button to screenshare rather than
 overriding the button entirely.

---
 src/CallHandler.js                      | 6 ++++++
 src/controllers/molecules/RoomHeader.js | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/CallHandler.js b/src/CallHandler.js
index 0a7a1cf922..cf8460db6c 100644
--- a/src/CallHandler.js
+++ b/src/CallHandler.js
@@ -158,6 +158,12 @@ function _onAction(payload) {
             newCall.placeVoiceCall();
         }
         else if (payload.type === 'video') {
+            newCall.placeVideoCall(
+                payload.remote_element,
+                payload.local_element
+            );
+        }
+        else if (payload.type === 'screensharing') {
             newCall.placeScreenSharingCall(
                 payload.remote_element,
                 payload.local_element
diff --git a/src/controllers/molecules/RoomHeader.js b/src/controllers/molecules/RoomHeader.js
index d16e3cbd42..b0bf0002da 100644
--- a/src/controllers/molecules/RoomHeader.js
+++ b/src/controllers/molecules/RoomHeader.js
@@ -69,10 +69,10 @@ module.exports = {
         });
     },
 
-    onVideoClick: function() {
+    onVideoClick: function(e) {
         dis.dispatch({
             action: 'place_call',
-            type: "video",
+            type: e.shiftKey ? "screensharing" : "video",
             room_id: this.props.room.roomId
         });
     },
-- 
GitLab