From 357e082d7a5feb4bf2c88d2eaed6a4699546c413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 9 Feb 2016 12:39:19 +0100 Subject: [PATCH] Drop InputRedirection::toXPointerButton Unused code is unused. --- input.cpp | 34 ---------------------------------- input.h | 3 --- 2 files changed, 37 deletions(-) diff --git a/input.cpp b/input.cpp index cbbe588e7b..c6b9b5279f 100644 --- a/input.cpp +++ b/input.cpp @@ -1265,40 +1265,6 @@ Toplevel *InputRedirection::findToplevel(const QPoint &pos) return NULL; } -uint8_t InputRedirection::toXPointerButton(uint32_t button) -{ - switch (button) { - case BTN_LEFT: - return XCB_BUTTON_INDEX_1; - case BTN_RIGHT: - return XCB_BUTTON_INDEX_3; - case BTN_MIDDLE: - return XCB_BUTTON_INDEX_2; - default: - // TODO: add more buttons - return XCB_BUTTON_INDEX_ANY; - } -} - -uint8_t InputRedirection::toXPointerButton(InputRedirection::PointerAxis axis, qreal delta) -{ - switch (axis) { - case PointerAxisVertical: - if (delta < 0) { - return 4; - } else { - return 5; - } - case PointerAxisHorizontal: - if (delta < 0) { - return 6; - } else { - return 7; - } - } - return XCB_BUTTON_INDEX_ANY; -} - Qt::KeyboardModifiers InputRedirection::keyboardModifiers() const { return m_xkb->modifiers(); diff --git a/input.h b/input.h index cd167ed483..609d3fe3df 100644 --- a/input.h +++ b/input.h @@ -145,9 +145,6 @@ public: bool supportsPointerWarping() const; void warpPointer(const QPointF &pos); - static uint8_t toXPointerButton(uint32_t button); - static uint8_t toXPointerButton(PointerAxis axis, qreal delta); - public Q_SLOTS: void updatePointerWindow();