From 9ce651fc309de0bebe536b68a0d95de1eb5856d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sat, 23 Sep 2017 21:14:21 +0200 Subject: [PATCH] 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 --- utils.cpp | 36 ------------------------------------ utils.h | 3 --- 2 files changed, 39 deletions(-) diff --git a/utils.cpp b/utils.cpp index c58e8b19f5..7314044f23 100644 --- a/utils.cpp +++ b/utils.cpp @@ -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; diff --git a/utils.h b/utils.h index ff9e6e0f62..db18b82a9a 100644 --- a/utils.h +++ b/utils.h @@ -158,7 +158,6 @@ template using ScopedCPointer = QScopedPointer