Commit 9ce651fc authored by Martin Flöser's avatar Martin Flöser

Drop unused functions from utils

Summary: Not used anywhere in KWin -> can go.

Test Plan: Still compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7956
parent e74eacd2
......@@ -94,11 +94,6 @@ void ungrabXServer()
}
}
bool grabbedXServer()
{
return server_grab_count > 0;
}
static bool keyboard_grabbed = false;
bool grabXKeyboard(xcb_window_t w)
......@@ -154,17 +149,6 @@ void Process::setupChildProcess()
// converting between X11 mouse/keyboard state mask and Qt button/keyboard states
int qtToX11Button(Qt::MouseButton button)
{
if (button == Qt::LeftButton)
return XCB_BUTTON_INDEX_1;
else if (button == Qt::MidButton)
return XCB_BUTTON_INDEX_2;
else if (button == Qt::RightButton)
return XCB_BUTTON_INDEX_3;
return XCB_BUTTON_INDEX_ANY; // 0
}
Qt::MouseButton x11ToQtMouseButton(int button)
{
if (button == XCB_BUTTON_INDEX_1)
......@@ -180,26 +164,6 @@ Qt::MouseButton x11ToQtMouseButton(int button)
return Qt::NoButton;
}
int qtToX11State(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
{
int ret = 0;
if (buttons & Qt::LeftButton)
ret |= XCB_KEY_BUT_MASK_BUTTON_1;
if (buttons & Qt::MidButton)
ret |= XCB_KEY_BUT_MASK_BUTTON_2;
if (buttons & Qt::RightButton)
ret |= XCB_KEY_BUT_MASK_BUTTON_3;
if (modifiers & Qt::ShiftModifier)
ret |= XCB_KEY_BUT_MASK_SHIFT;
if (modifiers & Qt::ControlModifier)
ret |= XCB_KEY_BUT_MASK_CONTROL;
if (modifiers & Qt::AltModifier)
ret |= KKeyServer::modXAlt();
if (modifiers & Qt::MetaModifier)
ret |= KKeyServer::modXMeta();
return ret;
}
Qt::MouseButtons x11ToQtMouseButtons(int state)
{
Qt::MouseButtons ret = 0;
......
......@@ -158,7 +158,6 @@ template <typename T> using ScopedCPointer = QScopedPointer<T, QScopedPointerPod
void KWIN_EXPORT updateXTime();
void KWIN_EXPORT grabXServer();
void KWIN_EXPORT ungrabXServer();
bool grabbedXServer();
bool KWIN_EXPORT grabXKeyboard(xcb_window_t w = rootWindow());
void KWIN_EXPORT ungrabXKeyboard();
......@@ -188,9 +187,7 @@ public:
#endif
// converting between X11 mouse/keyboard state mask and Qt button/keyboard states
int qtToX11Button(Qt::MouseButton button);
Qt::MouseButton x11ToQtMouseButton(int button);
int qtToX11State(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
Qt::MouseButtons KWIN_EXPORT x11ToQtMouseButtons(int state);
Qt::KeyboardModifiers KWIN_EXPORT x11ToQtKeyboardModifiers(int state);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment