Drop InputRedirection::toXPointerButton
Unused code is unused.
This commit is contained in:
parent
e97eaffc6b
commit
357e082d7a
2 changed files with 0 additions and 37 deletions
34
input.cpp
34
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();
|
||||
|
|
3
input.h
3
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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue