From ffa6f61cad21573c1b4f8c747a2034d406244ce8 Mon Sep 17 00:00:00 2001 From: Josh Palmer Date: Wed, 26 Sep 2012 21:55:38 +0100 Subject: [PATCH] Initial framework for fixing bug #111 NOTE: Does not actually fix it, but provides a method in which to place a solution. --- Src/base/SystemUiController.cpp | 8 ++++++++ Src/lunaui/cards/CardWindowManager.cpp | 9 +++++++++ Src/lunaui/cards/CardWindowManager.h | 3 +++ 3 files changed, 20 insertions(+) diff --git a/Src/base/SystemUiController.cpp b/Src/base/SystemUiController.cpp index 240231f9..095bc5ca 100644 --- a/Src/base/SystemUiController.cpp +++ b/Src/base/SystemUiController.cpp @@ -384,6 +384,14 @@ bool SystemUiController::handleGestureEvent (QGestureEvent* event) } } } + + if (tap->position().x() <= kGestureBorderSize + || tap->position().x() >= m_uiWidth - kGestureBorderSize + || tap->position().y() <= kGestureBorderSize + || tap->position().y() >= m_uiHeight - kGestureBorderSize) + { + CardWindowManager::instance()->deadzoneTap(tap); + } } } diff --git a/Src/lunaui/cards/CardWindowManager.cpp b/Src/lunaui/cards/CardWindowManager.cpp index 167541b5..c2c8579c 100644 --- a/Src/lunaui/cards/CardWindowManager.cpp +++ b/Src/lunaui/cards/CardWindowManager.cpp @@ -1317,6 +1317,15 @@ void CardWindowManager::firstCardAlert() } } +void CardWindowManager::deadzoneTap(QTapGesture* event) +{ + //Only send events to the active window when maximized + if(NULL == activeWindow() || !isMaximized()) + return; + + qCritical() << "Deadzone Tapped"; +} + void CardWindowManager::handleKeyNavigationMinimized(QKeyEvent* keyEvent) { if (!m_activeGroup || keyEvent->type() != QEvent::KeyPress) diff --git a/Src/lunaui/cards/CardWindowManager.h b/Src/lunaui/cards/CardWindowManager.h index f0b82a71..2cbdd165 100644 --- a/Src/lunaui/cards/CardWindowManager.h +++ b/Src/lunaui/cards/CardWindowManager.h @@ -94,6 +94,9 @@ class CardWindowManager : public WindowManagerBase // cycle through cards in tabbed view void cycleGroupTabs(); + + // convert tap events on the gesture border to single clicks + void deadzoneTap(QTapGesture* event); CardWindow* modalParent() const { return m_parentOfModalCard; }