Changeset View
Changeset View
Standalone View
Standalone View
kstyle/oxygenwindowmanager.h
Show All 25 Lines | |||||
26 | #include <QEvent> | 26 | #include <QEvent> | ||
27 | 27 | | |||
28 | #include <QBasicTimer> | 28 | #include <QBasicTimer> | ||
29 | #include <QObject> | 29 | #include <QObject> | ||
30 | #include <QSet> | 30 | #include <QSet> | ||
31 | #include <QString> | 31 | #include <QString> | ||
32 | #include <QWidget> | 32 | #include <QWidget> | ||
33 | 33 | | |||
34 | #if OXYGEN_HAVE_KWAYLAND | ||||
35 | namespace KWayland | ||||
36 | { | ||||
37 | namespace Client | ||||
38 | { | ||||
39 | class Pointer; | ||||
40 | class Seat; | ||||
41 | } | ||||
42 | } | ||||
43 | #endif | ||||
44 | | ||||
34 | namespace Oxygen | 45 | namespace Oxygen | ||
35 | { | 46 | { | ||
36 | 47 | | |||
37 | class WindowManager: public QObject | 48 | class WindowManager: public QObject | ||
38 | { | 49 | { | ||
39 | 50 | | |||
40 | Q_OBJECT | 51 | Q_OBJECT | ||
41 | 52 | | |||
▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | |||||
120 | 131 | | |||
121 | //* set list of blackListed widgets | 132 | //* set list of blackListed widgets | ||
122 | /** | 133 | /** | ||
123 | black list is read from options and is used to adjust | 134 | black list is read from options and is used to adjust | ||
124 | per-app window dragging issues | 135 | per-app window dragging issues | ||
125 | */ | 136 | */ | ||
126 | void initializeBlackList( void ); | 137 | void initializeBlackList( void ); | ||
127 | 138 | | |||
139 | //* initializes the Wayland specific parts | ||||
140 | void initializeWayland(); | ||||
141 | | ||||
142 | //* The Wayland Seat's hasPointer property changed | ||||
143 | void waylandHasPointerChanged( bool hasPointer ); | ||||
144 | | ||||
128 | //@} | 145 | //@} | ||
129 | 146 | | |||
130 | //* returns true if widget is dragable | 147 | //* returns true if widget is dragable | ||
131 | bool isDragable( QWidget* ); | 148 | bool isDragable( QWidget* ); | ||
132 | 149 | | |||
133 | //* returns true if widget is dragable | 150 | //* returns true if widget is dragable | ||
134 | bool isBlackListed( QWidget* ); | 151 | bool isBlackListed( QWidget* ); | ||
135 | 152 | | |||
136 | //* returns true if widget is dragable | 153 | //* returns true if widget is dragable | ||
137 | bool isWhiteListed( QWidget* ) const; | 154 | bool isWhiteListed( QWidget* ) const; | ||
138 | 155 | | |||
139 | //* returns true if drag can be started from current widget | 156 | //* returns true if drag can be started from current widget | ||
140 | bool canDrag( QWidget* ); | 157 | bool canDrag( QWidget* ); | ||
141 | 158 | | |||
142 | //* returns true if drag can be started from current widget and position | 159 | //* returns true if drag can be started from current widget and position | ||
143 | /** child at given position is passed as second argument */ | 160 | /** child at given position is passed as second argument */ | ||
144 | bool canDrag( QWidget*, QWidget*, const QPoint& ); | 161 | bool canDrag( QWidget*, QWidget*, const QPoint& ); | ||
145 | 162 | | |||
146 | //* reset drag | 163 | //* reset drag | ||
147 | void resetDrag( void ); | 164 | void resetDrag( void ); | ||
148 | 165 | | |||
149 | //* start drag | 166 | //* start drag | ||
150 | void startDrag( QWidget*, const QPoint& ); | 167 | void startDrag( QWidget*, const QPoint& ); | ||
151 | 168 | | |||
169 | //* X11 specific implementation for startDrag | ||||
170 | void startDragX11( QWidget*, const QPoint& ); | ||||
171 | | ||||
172 | //* Wayland specific implementation for startDrag | ||||
173 | void startDragWayland( QWidget*, const QPoint& ); | ||||
174 | | ||||
152 | //* returns true if window manager is used for moving | 175 | //* returns true if window manager is used for moving | ||
153 | /** right now this is true only for X11 */ | 176 | /** right now this is true only for X11 */ | ||
154 | bool supportWMMoveResize( void ) const; | 177 | bool supportWMMoveResize( void ) const; | ||
155 | 178 | | |||
156 | //* utility function | 179 | //* utility function | ||
157 | bool isDockWidgetTitle( const QWidget* ) const; | 180 | bool isDockWidgetTitle( const QWidget* ) const; | ||
158 | 181 | | |||
159 | //*@name lock | 182 | //*@name lock | ||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | |||||
251 | 274 | | |||
252 | //* cursor override | 275 | //* cursor override | ||
253 | /** used to keep track of application cursor being overridden when dragging in non-WM mode */ | 276 | /** used to keep track of application cursor being overridden when dragging in non-WM mode */ | ||
254 | bool _cursorOverride; | 277 | bool _cursorOverride; | ||
255 | 278 | | |||
256 | //* application event filter | 279 | //* application event filter | ||
257 | QObject* _appEventFilter; | 280 | QObject* _appEventFilter; | ||
258 | 281 | | |||
282 | #if OXYGEN_HAVE_KWAYLAND | ||||
283 | //* The Wayland seat object which needs to be passed to move requests. | ||||
284 | KWayland::Client::Seat* _seat; | ||||
285 | //* The Wayland pointer object where we get pointer events on. | ||||
286 | KWayland::Client::Pointer* _pointer; | ||||
287 | //* latest searial which needs to be passed to the move requests. | ||||
288 | quint32 _waylandSerial; | ||||
289 | #endif | ||||
290 | | ||||
259 | //* allow access of all private members to the app event filter | 291 | //* allow access of all private members to the app event filter | ||
260 | friend class AppEventFilter; | 292 | friend class AppEventFilter; | ||
261 | 293 | | |||
262 | }; | 294 | }; | ||
263 | 295 | | |||
264 | //____________________________________________________________________ | 296 | //____________________________________________________________________ | ||
265 | template<typename T> | 297 | template<typename T> | ||
266 | T WindowManager::findParent( const QWidget* widget ) const | 298 | T WindowManager::findParent( const QWidget* widget ) const | ||
Show All 12 Lines |