From c25d5ae09c2ec4cc6f18316f9aabe617404170a9 Mon Sep 17 00:00:00 2001
From: Tobias Markmann <tm@ayena.de>
Date: Tue, 4 Nov 2014 16:33:28 +0100
Subject: Open context menu for the roster on menu key you find on Windows
 keyboards.

Test-Information:

Tested on Windows 8.1.

Change-Id: Iec6273023289f2da4de2f22cdbabd8a157830633

diff --git a/Swift/QtUI/Roster/QtFilterWidget.cpp b/Swift/QtUI/Roster/QtFilterWidget.cpp
index 64eb312..78949f2 100644
--- a/Swift/QtUI/Roster/QtFilterWidget.cpp
+++ b/Swift/QtUI/Roster/QtFilterWidget.cpp
@@ -66,7 +66,8 @@ bool QtFilterWidget::eventFilter(QObject*, QEvent* event) {
 				return false;
 			} else if (keyEvent->key() == Qt::Key_Alt && event->type() == QEvent::KeyPress) {
 				isModifierSinglePressed_ = true;
-			} else if (keyEvent->key() == Qt::Key_Alt && event->type() == QEvent::KeyRelease && isModifierSinglePressed_) {
+			} else if ((keyEvent->key() == Qt::Key_Alt && event->type() == QEvent::KeyRelease && isModifierSinglePressed_)
+					|| (keyEvent->key() == Qt::Key_Menu)) {
 				QPoint itemOffset(2,2);
 				QPoint contextMenuPosition = treeView_->visualRect(treeView_->currentIndex()).topLeft() + itemOffset;;
 				QApplication::postEvent(treeView_, new QContextMenuEvent(QContextMenuEvent::Keyboard, contextMenuPosition, treeView_->mapToGlobal(contextMenuPosition)));
-- 
cgit v0.10.2-6-g49f6