Changeset View
Changeset View
Standalone View
Standalone View
utils.h
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Line(s) | |||||
153 | }; | 153 | }; | ||
154 | Q_DECLARE_FLAGS(QuickTileMode, QuickTileFlag) | 154 | Q_DECLARE_FLAGS(QuickTileMode, QuickTileFlag) | ||
155 | 155 | | |||
156 | template <typename T> using ScopedCPointer = QScopedPointer<T, QScopedPointerPodDeleter>; | 156 | template <typename T> using ScopedCPointer = QScopedPointer<T, QScopedPointerPodDeleter>; | ||
157 | 157 | | |||
158 | void KWIN_EXPORT updateXTime(); | 158 | void KWIN_EXPORT updateXTime(); | ||
159 | void KWIN_EXPORT grabXServer(); | 159 | void KWIN_EXPORT grabXServer(); | ||
160 | void KWIN_EXPORT ungrabXServer(); | 160 | void KWIN_EXPORT ungrabXServer(); | ||
161 | bool grabbedXServer(); | | |||
162 | bool KWIN_EXPORT grabXKeyboard(xcb_window_t w = rootWindow()); | 161 | bool KWIN_EXPORT grabXKeyboard(xcb_window_t w = rootWindow()); | ||
163 | void KWIN_EXPORT ungrabXKeyboard(); | 162 | void KWIN_EXPORT ungrabXKeyboard(); | ||
164 | 163 | | |||
165 | /** | 164 | /** | ||
166 | * Small helper class which performs @link grabXServer in the ctor and | 165 | * Small helper class which performs @link grabXServer in the ctor and | ||
167 | * @link ungrabXServer in the dtor. Use this class to ensure that grab and | 166 | * @link ungrabXServer in the dtor. Use this class to ensure that grab and | ||
168 | * ungrab are matched. | 167 | * ungrab are matched. | ||
169 | * | 168 | * | ||
Show All 13 Lines | |||||
183 | #define GRAB_SERVER_DURING_CONTEXT XServerGrabber xserverGrabber; | 182 | #define GRAB_SERVER_DURING_CONTEXT XServerGrabber xserverGrabber; | ||
184 | 183 | | |||
185 | // the docs say it's UrgencyHint, but it's often #defined as XUrgencyHint | 184 | // the docs say it's UrgencyHint, but it's often #defined as XUrgencyHint | ||
186 | #ifndef UrgencyHint | 185 | #ifndef UrgencyHint | ||
187 | #define UrgencyHint XUrgencyHint | 186 | #define UrgencyHint XUrgencyHint | ||
188 | #endif | 187 | #endif | ||
189 | 188 | | |||
190 | // converting between X11 mouse/keyboard state mask and Qt button/keyboard states | 189 | // converting between X11 mouse/keyboard state mask and Qt button/keyboard states | ||
191 | int qtToX11Button(Qt::MouseButton button); | | |||
192 | Qt::MouseButton x11ToQtMouseButton(int button); | 190 | Qt::MouseButton x11ToQtMouseButton(int button); | ||
193 | int qtToX11State(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); | | |||
194 | Qt::MouseButtons KWIN_EXPORT x11ToQtMouseButtons(int state); | 191 | Qt::MouseButtons KWIN_EXPORT x11ToQtMouseButtons(int state); | ||
195 | Qt::KeyboardModifiers KWIN_EXPORT x11ToQtKeyboardModifiers(int state); | 192 | Qt::KeyboardModifiers KWIN_EXPORT x11ToQtKeyboardModifiers(int state); | ||
196 | 193 | | |||
197 | void checkNonExistentClients(); | 194 | void checkNonExistentClients(); | ||
198 | 195 | | |||
199 | /** | 196 | /** | ||
200 | * Separate the concept of an unet QPoint and 0,0 | 197 | * Separate the concept of an unet QPoint and 0,0 | ||
201 | */ | 198 | */ | ||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |