Merge lp:~aacid/qtmir/system_includes into lp:qtmir
- system_includes
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~aacid/qtmir/system_includes |
Merge into: | lp:qtmir |
Prerequisite: | lp:~ci-train-bot/qtmir/qtmir-ubuntu-yakkety-landing-025 |
Diff against target: |
1102 lines (+197/-357) 32 files modified
CMakeLists.txt (+7/-6) debian/changelog (+25/-0) debian/control (+2/-2) debian/gles-patches/convert-to-gles.patch (+1/-1) demos/qml-demo-client/CMakeLists.txt (+3/-6) demos/qml-demo-shell/CMakeLists.txt (+3/-6) src/modules/Unity/Application/CMakeLists.txt (+6/-3) src/modules/Unity/Application/mirsurface.cpp (+36/-0) src/modules/Unity/Application/mirsurface.h (+8/-1) src/modules/Unity/Application/mirsurfaceinterface.h (+2/-0) src/modules/Unity/Application/mirsurfaceitem.cpp (+11/-49) src/modules/Unity/Application/mirsurfaceitem.h (+1/-2) src/modules/Unity/Application/plugin.cpp (+0/-10) src/modules/Unity/Application/ubuntukeyboardinfo.cpp (+0/-173) src/modules/Unity/Application/ubuntukeyboardinfo.h (+0/-87) src/modules/Unity/Screens/CMakeLists.txt (+4/-0) src/platforms/mirserver/CMakeLists.txt (+4/-0) src/platforms/mirserver/mirwindowmanager.cpp (+9/-4) src/platforms/mirserver/surfaceobserver.cpp (+20/-0) src/platforms/mirserver/surfaceobserver.h (+3/-1) tests/framework/CMakeLists.txt (+5/-1) tests/framework/fake_mirsurface.h (+5/-2) tests/mirserver/Clipboard/CMakeLists.txt (+4/-0) tests/mirserver/QtEventFeeder/CMakeLists.txt (+4/-0) tests/mirserver/Screen/CMakeLists.txt (+4/-0) tests/mirserver/ScreensModel/CMakeLists.txt (+4/-0) tests/mirserver/WindowManager/CMakeLists.txt (+4/-0) tests/modules/Application/CMakeLists.txt (+4/-1) tests/modules/ApplicationManager/CMakeLists.txt (+5/-1) tests/modules/SessionManager/CMakeLists.txt (+5/-1) tests/modules/SharedWakelock/CMakeLists.txt (+4/-0) tests/modules/SurfaceManager/CMakeLists.txt (+4/-0) |
To merge this branch: | bzr merge lp:~aacid/qtmir/system_includes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity8 CI Bot (community) | continuous-integration | Needs Fixing | |
Gerry Boland (community) | Approve | ||
Review via email: mp+296598@code.launchpad.net |
This proposal supersedes a proposal from 2016-06-06.
This proposal has been superseded by a proposal from 2016-07-15.
Commit message
Mark system includes as such
Description of the change
* Are there any related MPs required for this MP to build/function as expected?
Prereq
* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A
- 519. By Albert Astals Cid
-
spacing++
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:518
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:519
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Gerry Boland (gerboland) wrote : | # |
This should be good. CI unhappy only as this based on the contents of the latest silo, which has a newer unity-api
Unmerged revisions
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2016-07-01 16:15:54 +0000 |
3 | +++ CMakeLists.txt 2016-07-15 15:13:44 +0000 |
4 | @@ -83,22 +83,23 @@ |
5 | pkg_check_modules(GSETTINGS_QT REQUIRED gsettings-qt) |
6 | pkg_check_modules(QTDBUSTEST libqtdbustest-1 REQUIRED) |
7 | pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED) |
8 | -pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=18) |
9 | +pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=19) |
10 | pkg_check_modules(CGMANAGER libcgmanager REQUIRED) |
11 | |
12 | +include_directories(SYSTEM ${APPLICATION_API_INCLUDE_DIRS}) |
13 | + |
14 | + |
15 | add_definitions(-DMIR_REQUIRE_DEPRECATED_EVENT_OPT_IN=1) |
16 | |
17 | # Use the fast string builder |
18 | add_definitions(-DQT_USE_QSTRINGBUILDER) |
19 | |
20 | -include_directories( ${APPLICATION_API_INCLUDE_DIRS} ) |
21 | - |
22 | # We expect this to be set via debian/rules for GLES builds |
23 | if ("${USE_OPENGLES}" STREQUAL 1) |
24 | message(STATUS "Qt5 determined to be compiled with GLES support") |
25 | pkg_check_modules(GLESv2 glesv2) |
26 | add_definitions(-DQT_USING_GLES) |
27 | - include_directories (${GLESv2_INCLUDE_DIRS}) |
28 | + include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS}) |
29 | set (GL_LIBRARIES "${GLESv2_LIBRARIES}") |
30 | # Because qt/gl and qt/gles are not parallel installable we have a difficulty |
31 | # building qtmir-desktop on armhf. We would like to link against opengl and bind the |
32 | @@ -109,13 +110,13 @@ |
33 | message(STATUS "Linking against OpenGL ES but binding OpenGL API") |
34 | pkg_check_modules(GLESv2 glesv2) |
35 | add_definitions(-DQT_USING_GL) |
36 | - include_directories (${GLESv2_INCLUDE_DIRS}) |
37 | + include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS}) |
38 | set (GL_LIBRARIES "${GLESv2_LIBRARIES}") |
39 | else() |
40 | message(STATUS "Qt5 determined to be compiled with OpenGL support") |
41 | pkg_check_modules(GL gl) |
42 | add_definitions(-DQT_USING_OPENGL) |
43 | - include_directories (${GL_INCLUDE_DIRS}) |
44 | + include_directories (SYSTEM ${GL_INCLUDE_DIRS}) |
45 | endif() |
46 | |
47 | # Standard install paths |
48 | |
49 | === modified file 'debian/changelog' |
50 | --- debian/changelog 2016-07-12 13:39:51 +0000 |
51 | +++ debian/changelog 2016-07-15 15:13:44 +0000 |
52 | @@ -49,6 +49,31 @@ |
53 | |
54 | -- Albert Astals Cid <albert.astals@canonical.com> Tue, 14 Jun 2016 08:38:00 +0000 |
55 | |
56 | +qtmir (0.4.8+16.10.20160606.1-0ubuntu1) yakkety; urgency=medium |
57 | + |
58 | + [ Albert Astals Cid ] |
59 | + * Add support for compiler sanitizers via ECM |
60 | + * Compile with -fsanitize=undefined |
61 | + * Fix leak in ScreensModelTest (LP: #1585502) |
62 | + * Fix leak in SessionManager test (LP: #1585498) |
63 | + * Remove unused m_sessions member |
64 | + * Add missing breaks |
65 | + * Initialize m_lastX and m_lastY |
66 | + * Initialize m_sessionId |
67 | + * Give the locker a name |
68 | + * Fix memory leak in QtEventFeederTest (LP: #1585503) |
69 | + * Fix leaks in application_manager_test (LP: #1585501) |
70 | + |
71 | + [ Daniel d'Andrada ] |
72 | + * Improve Session debug logging |
73 | + * MirSurfaceListModel: prepending a surface always causes |
74 | + firstChanged() emission |
75 | + |
76 | + [ Michael Zanetti ] |
77 | + * Adding ApplicationInfo::surfaceCount property |
78 | + |
79 | + -- MichaĆ Sawicz <michal.sawicz@canonical.com> Mon, 06 Jun 2016 15:45:57 +0000 |
80 | + |
81 | qtmir (0.4.8+16.10.20160602-0ubuntu1) yakkety; urgency=medium |
82 | |
83 | * rebuild for mir 0.23 |
84 | |
85 | === modified file 'debian/control' |
86 | --- debian/control 2016-07-12 13:26:59 +0000 |
87 | +++ debian/control 2016-07-15 15:13:44 +0000 |
88 | @@ -23,7 +23,7 @@ |
89 | libubuntu-app-launch2-dev (>= 0.9), |
90 | libubuntu-application-api-dev (>= 2.1.0), |
91 | libudev-dev, |
92 | - libunity-api-dev (>= 7.114), |
93 | + libunity-api-dev (>= 7.116), |
94 | liburl-dispatcher1-dev, |
95 | libxkbcommon-dev, |
96 | libxrender-dev, |
97 | @@ -94,7 +94,7 @@ |
98 | Conflicts: libqtmir, |
99 | libunity-mir1, |
100 | Provides: unity-application-impl, |
101 | - unity-application-impl-17, |
102 | + unity-application-impl-19, |
103 | Description: Qt plugin for Unity specific Mir APIs |
104 | QtMir provides Qt/QML bindings for Mir features that are exposed through the |
105 | qtmir-desktop or qtmir-android QPA plugin such as Application management |
106 | |
107 | === modified file 'debian/gles-patches/convert-to-gles.patch' |
108 | --- debian/gles-patches/convert-to-gles.patch 2016-07-12 13:38:40 +0000 |
109 | +++ debian/gles-patches/convert-to-gles.patch 2016-07-15 15:13:44 +0000 |
110 | @@ -84,7 +84,7 @@ |
111 | -Conflicts: libqtmir, |
112 | - libunity-mir1, |
113 | -Provides: unity-application-impl, |
114 | -- unity-application-impl-17, |
115 | +- unity-application-impl-19, |
116 | -Description: Qt plugin for Unity specific Mir APIs |
117 | - QtMir provides Qt/QML bindings for Mir features that are exposed through the |
118 | - qtmir-desktop or qtmir-android QPA plugin such as Application management |
119 | |
120 | === modified file 'demos/qml-demo-client/CMakeLists.txt' |
121 | --- demos/qml-demo-client/CMakeLists.txt 2015-09-01 16:16:47 +0000 |
122 | +++ demos/qml-demo-client/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
123 | @@ -2,19 +2,16 @@ |
124 | configure_file(${DEMO_CLIENT}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${DEMO_CLIENT}.desktop @ONLY) |
125 | |
126 | include_directories( |
127 | + SYSTEM |
128 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
129 | + ${Qt5Qml_PRIVATE_INCLUDE_DIRS} |
130 | + ${Qt5Quick_PRIVATE_INCLUDE_DIRS} |
131 | ) |
132 | |
133 | add_executable(${DEMO_CLIENT} |
134 | main.cpp |
135 | ) |
136 | |
137 | -include_directories( |
138 | - ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
139 | - ${Qt5Qml_PRIVATE_INCLUDE_DIRS} |
140 | - ${Qt5Quick_PRIVATE_INCLUDE_DIRS} |
141 | -) |
142 | - |
143 | target_link_libraries( |
144 | ${DEMO_CLIENT} |
145 | Qt5::Core |
146 | |
147 | === modified file 'demos/qml-demo-shell/CMakeLists.txt' |
148 | --- demos/qml-demo-shell/CMakeLists.txt 2015-09-01 16:16:47 +0000 |
149 | +++ demos/qml-demo-shell/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
150 | @@ -1,19 +1,16 @@ |
151 | set(DEMO_SHELL qtmir-demo-shell) |
152 | |
153 | include_directories( |
154 | + SYSTEM |
155 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
156 | + ${Qt5Qml_PRIVATE_INCLUDE_DIRS} |
157 | + ${Qt5Quick_PRIVATE_INCLUDE_DIRS} |
158 | ) |
159 | |
160 | add_executable(${DEMO_SHELL} |
161 | main.cpp |
162 | ) |
163 | |
164 | -include_directories( |
165 | - ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
166 | - ${Qt5Qml_PRIVATE_INCLUDE_DIRS} |
167 | - ${Qt5Quick_PRIVATE_INCLUDE_DIRS} |
168 | -) |
169 | - |
170 | target_link_libraries( |
171 | ${DEMO_SHELL} |
172 | Qt5::Core |
173 | |
174 | === modified file 'src/modules/Unity/Application/CMakeLists.txt' |
175 | --- src/modules/Unity/Application/CMakeLists.txt 2016-07-01 16:15:54 +0000 |
176 | +++ src/modules/Unity/Application/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
177 | @@ -1,4 +1,10 @@ |
178 | include_directories( |
179 | + ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
180 | + ${CMAKE_SOURCE_DIR}/src/common |
181 | +) |
182 | + |
183 | +include_directories( |
184 | + SYSTEM |
185 | ${GLIB_INCLUDE_DIRS} |
186 | ${GIO_INCLUDE_DIRS} |
187 | ${GIO_UNIX_INCLUDE_DIRS} |
188 | @@ -7,8 +13,6 @@ |
189 | ${PROCESS_CPP_INCLUDE_DIRS} |
190 | ${UBUNTU_PLATFORM_API_INCLUDE_DIRS} |
191 | ${UBUNTU_APP_LAUNCH_INCLUDE_DIRS} |
192 | - ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
193 | - ${CMAKE_SOURCE_DIR}/src/common |
194 | ${GSETTINGS_QT_INCLUDE_DIRS} |
195 | ${CGMANAGER_INCLUDE_DIRS} |
196 | |
197 | @@ -33,7 +37,6 @@ |
198 | plugin.cpp |
199 | dbuswindowstack.cpp |
200 | mirsurfacemanager.cpp |
201 | - ubuntukeyboardinfo.cpp |
202 | mirfocuscontroller.cpp |
203 | mirsurface.cpp |
204 | mirsurfaceinterface.h |
205 | |
206 | === modified file 'src/modules/Unity/Application/mirsurface.cpp' |
207 | --- src/modules/Unity/Application/mirsurface.cpp 2016-06-23 19:58:48 +0000 |
208 | +++ src/modules/Unity/Application/mirsurface.cpp 2016-07-15 15:13:44 +0000 |
209 | @@ -219,6 +219,7 @@ |
210 | connect(observer.get(), &SurfaceObserver::shellChromeChanged, this, [&](MirShellChrome shell_chrome) { |
211 | setShellChrome(static_cast<Mir::ShellChrome>(shell_chrome)); |
212 | }); |
213 | + connect(observer.get(), &SurfaceObserver::inputBoundsChanged, this, &MirSurface::setInputBounds); |
214 | observer->setListener(this); |
215 | } |
216 | |
217 | @@ -277,12 +278,15 @@ |
218 | { |
219 | switch (attribute) { |
220 | case mir_surface_attrib_type: |
221 | + DEBUG_MSG << " type = " << mirSurfaceTypeToStr(state()); |
222 | Q_EMIT typeChanged(type()); |
223 | break; |
224 | case mir_surface_attrib_state: |
225 | + DEBUG_MSG << " state = " << mirSurfaceStateToStr(state()); |
226 | Q_EMIT stateChanged(state()); |
227 | break; |
228 | case mir_surface_attrib_visibility: |
229 | + DEBUG_MSG << " visible = " << visible(); |
230 | Q_EMIT visibleChanged(visible()); |
231 | break; |
232 | default: |
233 | @@ -885,6 +889,24 @@ |
234 | m_surface->move_to(Point{ X{targetScreenTopLeftPx.x()}, Y{targetScreenTopLeftPx.y()} }); |
235 | } |
236 | |
237 | +bool MirSurface::inputAreaContains(const QPoint &point) const |
238 | +{ |
239 | + bool result; |
240 | + |
241 | + |
242 | + // Can't use it due to https://bugs.launchpad.net/mir/+bug/1598936 |
243 | + // FIXME: Use the line below instead of m_inputBounds once this bug gets fixed. |
244 | + //result = m_surface->input_area_contains(mir::geometry::Point(point.x(), point.y())); |
245 | + |
246 | + if (m_inputBounds.isNull()) { |
247 | + result = true; |
248 | + } else { |
249 | + result = m_inputBounds.contains(point); |
250 | + } |
251 | + |
252 | + return result; |
253 | +} |
254 | + |
255 | void MirSurface::setCursor(const QCursor &cursor) |
256 | { |
257 | DEBUG_MSG << "(" << qtCursorShapeToStr(cursor.shape()) << ")"; |
258 | @@ -976,6 +998,11 @@ |
259 | return m_focused; |
260 | } |
261 | |
262 | +QRect MirSurface::inputBounds() const |
263 | +{ |
264 | + return m_inputBounds; |
265 | +} |
266 | + |
267 | void MirSurface::requestFocus() |
268 | { |
269 | DEBUG_MSG << "()"; |
270 | @@ -1017,3 +1044,12 @@ |
271 | m_closeTimer->start(); |
272 | } |
273 | } |
274 | + |
275 | +void MirSurface::setInputBounds(const QRect &rect) |
276 | +{ |
277 | + if (m_inputBounds != rect) { |
278 | + DEBUG_MSG << "(" << rect << ")"; |
279 | + m_inputBounds = rect; |
280 | + Q_EMIT inputBoundsChanged(m_inputBounds); |
281 | + } |
282 | +} |
283 | |
284 | === modified file 'src/modules/Unity/Application/mirsurface.h' |
285 | --- src/modules/Unity/Application/mirsurface.h 2016-06-23 19:58:48 +0000 |
286 | +++ src/modules/Unity/Application/mirsurface.h 2016-07-15 15:13:44 +0000 |
287 | @@ -24,6 +24,7 @@ |
288 | #include <QCursor> |
289 | #include <QMutex> |
290 | #include <QPointer> |
291 | +#include <QRect> |
292 | #include <QSharedPointer> |
293 | #include <QWeakPointer> |
294 | #include <QSet> |
295 | @@ -89,6 +90,7 @@ |
296 | int heightIncrement() const override; |
297 | |
298 | bool focused() const override; |
299 | + QRect inputBounds() const override; |
300 | |
301 | Q_INVOKABLE void requestFocus() override; |
302 | Q_INVOKABLE void close() override; |
303 | @@ -148,9 +150,11 @@ |
304 | |
305 | Mir::ShellChrome shellChrome() const override; |
306 | |
307 | + void setScreen(QScreen *screen) override; |
308 | + |
309 | SessionInterface* session() override { return m_session.data(); } |
310 | |
311 | - void setScreen(QScreen *screen) override; |
312 | + bool inputAreaContains(const QPoint &) const override; |
313 | |
314 | //// |
315 | // Own API |
316 | @@ -177,6 +181,7 @@ |
317 | void emitSizeChanged(); |
318 | void setCursor(const QCursor &cursor); |
319 | void onCloseTimedOut(); |
320 | + void setInputBounds(const QRect &rect); |
321 | |
322 | private: |
323 | void syncSurfaceSizeWithItemSize(); |
324 | @@ -226,6 +231,8 @@ |
325 | int m_widthIncrement{0}; |
326 | int m_heightIncrement{0}; |
327 | |
328 | + QRect m_inputBounds; |
329 | + |
330 | bool m_focused{false}; |
331 | |
332 | enum ClosingState { |
333 | |
334 | === modified file 'src/modules/Unity/Application/mirsurfaceinterface.h' |
335 | --- src/modules/Unity/Application/mirsurfaceinterface.h 2016-06-23 19:58:48 +0000 |
336 | +++ src/modules/Unity/Application/mirsurfaceinterface.h 2016-07-15 15:13:44 +0000 |
337 | @@ -106,6 +106,8 @@ |
338 | |
339 | virtual SessionInterface* session() = 0; |
340 | |
341 | + virtual bool inputAreaContains(const QPoint &) const = 0; |
342 | + |
343 | public Q_SLOTS: |
344 | virtual void onCompositorSwappedBuffers() = 0; |
345 | |
346 | |
347 | === modified file 'src/modules/Unity/Application/mirsurfaceitem.cpp' |
348 | --- src/modules/Unity/Application/mirsurfaceitem.cpp 2016-05-24 20:13:10 +0000 |
349 | +++ src/modules/Unity/Application/mirsurfaceitem.cpp 2016-07-15 15:13:44 +0000 |
350 | @@ -20,7 +20,6 @@ |
351 | #include "mirsurfaceitem.h" |
352 | #include "mirfocuscontroller.h" |
353 | #include "logging.h" |
354 | -#include "ubuntukeyboardinfo.h" |
355 | #include "tracepoints.h" // generated from tracepoints.tp |
356 | #include "timestamp.h" |
357 | |
358 | @@ -100,10 +99,6 @@ |
359 | setSmooth(true); |
360 | setFlag(QQuickItem::ItemHasContents, true); //so scene graph will render this item |
361 | |
362 | - if (!UbuntuKeyboardInfo::instance()) { |
363 | - new UbuntuKeyboardInfo; |
364 | - } |
365 | - |
366 | m_updateMirSurfaceSizeTimer.setSingleShot(true); |
367 | m_updateMirSurfaceSizeTimer.setInterval(1); |
368 | connect(&m_updateMirSurfaceSizeTimer, &QTimer::timeout, this, &MirSurfaceItem::updateMirSurfaceSize); |
369 | @@ -295,17 +290,9 @@ |
370 | |
371 | void MirSurfaceItem::mousePressEvent(QMouseEvent *event) |
372 | { |
373 | - if (m_consumesInput && m_surface && m_surface->live()) { |
374 | - if (type() == Mir::InputMethodType) { |
375 | - // FIXME: Hack to get the VKB use case working while we don't have the proper solution in place. |
376 | - if (isMouseInsideUbuntuKeyboard(event)) { |
377 | - m_surface->mousePressEvent(event); |
378 | - } else { |
379 | - event->ignore(); |
380 | - } |
381 | - } else { |
382 | - m_surface->mousePressEvent(event); |
383 | - } |
384 | + auto mousePos = event->localPos().toPoint(); |
385 | + if (m_consumesInput && m_surface && m_surface->live() && m_surface->inputAreaContains(mousePos)) { |
386 | + m_surface->mousePressEvent(event); |
387 | } else { |
388 | event->ignore(); |
389 | } |
390 | @@ -476,51 +463,26 @@ |
391 | return false; |
392 | } |
393 | |
394 | - bool accepted = true; |
395 | - if (type() == Mir::InputMethodType && eventType == QEvent::TouchBegin) { |
396 | - // FIXME: Hack to get the VKB use case working while we don't have the proper solution in place. |
397 | - if (hasTouchInsideUbuntuKeyboard(touchPoints)) { |
398 | - validateAndDeliverTouchEvent(eventType, timestamp, mods, touchPoints, touchPointStates); |
399 | - } else { |
400 | - accepted = false; |
401 | - } |
402 | - |
403 | - } else { |
404 | - // NB: If we are getting QEvent::TouchUpdate or QEvent::TouchEnd it's because we've |
405 | - // previously accepted the corresponding QEvent::TouchBegin |
406 | - validateAndDeliverTouchEvent(eventType, timestamp, mods, touchPoints, touchPointStates); |
407 | + if (eventType == QEvent::TouchBegin && !hasTouchInsideInputRegion(touchPoints)) { |
408 | + return false; |
409 | } |
410 | - return accepted; |
411 | + |
412 | + validateAndDeliverTouchEvent(eventType, timestamp, mods, touchPoints, touchPointStates); |
413 | + |
414 | + return true; |
415 | } |
416 | |
417 | -bool MirSurfaceItem::hasTouchInsideUbuntuKeyboard(const QList<QTouchEvent::TouchPoint> &touchPoints) |
418 | +bool MirSurfaceItem::hasTouchInsideInputRegion(const QList<QTouchEvent::TouchPoint> &touchPoints) |
419 | { |
420 | - UbuntuKeyboardInfo *ubuntuKeyboardInfo = UbuntuKeyboardInfo::instance(); |
421 | - |
422 | for (int i = 0; i < touchPoints.count(); ++i) { |
423 | QPoint pos = touchPoints.at(i).pos().toPoint(); |
424 | - if (pos.x() >= ubuntuKeyboardInfo->x() |
425 | - && pos.x() <= (ubuntuKeyboardInfo->x() + ubuntuKeyboardInfo->width()) |
426 | - && pos.y() >= ubuntuKeyboardInfo->y() |
427 | - && pos.y() <= (ubuntuKeyboardInfo->y() + ubuntuKeyboardInfo->height())) { |
428 | + if (m_surface->inputAreaContains(pos)) { |
429 | return true; |
430 | } |
431 | } |
432 | return false; |
433 | } |
434 | |
435 | -bool MirSurfaceItem::isMouseInsideUbuntuKeyboard(const QMouseEvent *event) |
436 | -{ |
437 | - UbuntuKeyboardInfo *ubuntuKeyboardInfo = UbuntuKeyboardInfo::instance(); |
438 | - |
439 | - const QPointF &pos = event->localPos(); |
440 | - |
441 | - return pos.x() >= ubuntuKeyboardInfo->x() |
442 | - && pos.x() <= (ubuntuKeyboardInfo->x() + ubuntuKeyboardInfo->width()) |
443 | - && pos.y() >= ubuntuKeyboardInfo->y() |
444 | - && pos.y() <= (ubuntuKeyboardInfo->y() + ubuntuKeyboardInfo->height()); |
445 | -} |
446 | - |
447 | Mir::State MirSurfaceItem::surfaceState() const |
448 | { |
449 | if (m_surface) { |
450 | |
451 | === modified file 'src/modules/Unity/Application/mirsurfaceitem.h' |
452 | --- src/modules/Unity/Application/mirsurfaceitem.h 2016-05-24 20:13:10 +0000 |
453 | +++ src/modules/Unity/Application/mirsurfaceitem.h 2016-07-15 15:13:44 +0000 |
454 | @@ -128,8 +128,7 @@ |
455 | private: |
456 | void ensureTextureProvider(); |
457 | |
458 | - bool hasTouchInsideUbuntuKeyboard(const QList<QTouchEvent::TouchPoint> &touchPoints); |
459 | - bool isMouseInsideUbuntuKeyboard(const QMouseEvent *event); |
460 | + bool hasTouchInsideInputRegion(const QList<QTouchEvent::TouchPoint> &touchPoints); |
461 | |
462 | QString appId() const; |
463 | void endCurrentTouchSequence(ulong timestamp); |
464 | |
465 | === modified file 'src/modules/Unity/Application/plugin.cpp' |
466 | --- src/modules/Unity/Application/plugin.cpp 2016-03-28 18:02:26 +0000 |
467 | +++ src/modules/Unity/Application/plugin.cpp 2016-07-15 15:13:44 +0000 |
468 | @@ -25,7 +25,6 @@ |
469 | #include "mirsurfaceinterface.h" |
470 | #include "mirsurfaceitem.h" |
471 | #include "mirsurfacelistmodel.h" |
472 | -#include "ubuntukeyboardinfo.h" |
473 | |
474 | // platforms/mirserver |
475 | #include <mirsingleton.h> |
476 | @@ -55,13 +54,6 @@ |
477 | return qtmir::MirSurfaceManager::singleton(); |
478 | } |
479 | |
480 | -QObject* ubuntuKeyboardInfoSingleton(QQmlEngine* /*engine*/, QJSEngine* /*scriptEngine*/) { |
481 | - if (!UbuntuKeyboardInfo::instance()) { |
482 | - new UbuntuKeyboardInfo; |
483 | - } |
484 | - return UbuntuKeyboardInfo::instance(); |
485 | -} |
486 | - |
487 | QObject* mirSingleton(QQmlEngine* /*engine*/, QJSEngine* /*scriptEngine*/) { |
488 | return qtmir::Mir::instance(); |
489 | } |
490 | @@ -101,8 +93,6 @@ |
491 | qmlRegisterUncreatableType<unity::shell::application::MirSurfaceInterface>( |
492 | uri, 0, 1, "MirSurface", "MirSurface can't be instantiated from QML"); |
493 | qmlRegisterType<qtmir::MirSurfaceItem>(uri, 0, 1, "MirSurfaceItem"); |
494 | - qmlRegisterSingletonType<qtmir::UbuntuKeyboardInfo>( |
495 | - uri, 0, 1, "UbuntuKeyboardInfo", ubuntuKeyboardInfoSingleton); |
496 | qmlRegisterSingletonType<qtmir::Mir>(uri, 0, 1, "Mir", mirSingleton); |
497 | } |
498 | |
499 | |
500 | === removed file 'src/modules/Unity/Application/ubuntukeyboardinfo.cpp' |
501 | --- src/modules/Unity/Application/ubuntukeyboardinfo.cpp 2016-05-27 07:45:26 +0000 |
502 | +++ src/modules/Unity/Application/ubuntukeyboardinfo.cpp 1970-01-01 00:00:00 +0000 |
503 | @@ -1,173 +0,0 @@ |
504 | -/* |
505 | - * Copyright (C) 2013-2015 Canonical, Ltd. |
506 | - * |
507 | - * This program is free software: you can redistribute it and/or modify it under |
508 | - * the terms of the GNU Lesser General Public License version 3, as published by |
509 | - * the Free Software Foundation. |
510 | - * |
511 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
512 | - * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, |
513 | - * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
514 | - * Lesser General Public License for more details. |
515 | - * |
516 | - * You should have received a copy of the GNU Lesser General Public License |
517 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
518 | - */ |
519 | - |
520 | -#include "ubuntukeyboardinfo.h" |
521 | - |
522 | -#include <QDir> |
523 | - |
524 | -namespace qtmir { |
525 | - |
526 | -namespace { |
527 | - const int gConnectionAttemptIntervalMs = 5000; |
528 | - const int gMaxConsecutiveAttempts = 10; |
529 | - const char gServerName[] = "ubuntu-keyboard-info"; |
530 | -} |
531 | - |
532 | -UbuntuKeyboardInfo* UbuntuKeyboardInfo::m_instance = nullptr; |
533 | - |
534 | -UbuntuKeyboardInfo* UbuntuKeyboardInfo::instance() |
535 | -{ |
536 | - return m_instance; |
537 | -} |
538 | - |
539 | -UbuntuKeyboardInfo::UbuntuKeyboardInfo(QObject *parent) |
540 | - : QObject(parent), |
541 | - m_consecutiveAttempts(0), |
542 | - m_lastX(0), |
543 | - m_lastY(0), |
544 | - m_lastWidth(0), |
545 | - m_lastHeight(0) |
546 | -{ |
547 | - if (m_instance) { |
548 | - qFatal("Cannot have more than one instance of UbuntuKeyboardInfo simultaneously."); |
549 | - } |
550 | - m_instance = this; |
551 | - |
552 | - connect(&m_socket, &QLocalSocket::stateChanged, this, &UbuntuKeyboardInfo::onSocketStateChanged); |
553 | - connect(&m_socket, &QIODevice::readyRead, |
554 | - this, &UbuntuKeyboardInfo::readAllBytesFromSocket); |
555 | - |
556 | - buildSocketFilePath(); |
557 | - |
558 | - typedef void (QLocalSocket::*MemberFunctionType)(QLocalSocket::LocalSocketError); |
559 | - MemberFunctionType funcPointer = &QLocalSocket::error; |
560 | - connect(&m_socket, funcPointer, |
561 | - this, &UbuntuKeyboardInfo::onSocketError); |
562 | - |
563 | - m_connectionRetryTimer.setInterval(gConnectionAttemptIntervalMs); |
564 | - m_connectionRetryTimer.setSingleShot(true); |
565 | - connect(&m_connectionRetryTimer, &QTimer::timeout, |
566 | - this, &UbuntuKeyboardInfo::tryConnectingToServer); |
567 | - tryConnectingToServer(); |
568 | -} |
569 | - |
570 | -UbuntuKeyboardInfo::~UbuntuKeyboardInfo() |
571 | -{ |
572 | - // Make sure we don't get onSocketStateChanged() called during |
573 | - // destruction. |
574 | - m_socket.disconnect(this); |
575 | - |
576 | - Q_ASSERT(m_instance); |
577 | - m_instance = nullptr; |
578 | -} |
579 | - |
580 | -void UbuntuKeyboardInfo::tryConnectingToServer() |
581 | -{ |
582 | - ++m_consecutiveAttempts; |
583 | - Q_ASSERT(!m_socketFilePath.isEmpty()); |
584 | - m_socket.connectToServer(m_socketFilePath, QIODevice::ReadOnly); |
585 | -} |
586 | - |
587 | -void UbuntuKeyboardInfo::onSocketStateChanged(QLocalSocket::LocalSocketState socketState) |
588 | -{ |
589 | - switch (socketState) { |
590 | - case QLocalSocket::UnconnectedState: |
591 | - retryConnection(); |
592 | - break; |
593 | - case QLocalSocket::ConnectedState: |
594 | - m_consecutiveAttempts = 0; |
595 | - break; |
596 | - default: |
597 | - break; |
598 | - } |
599 | -} |
600 | - |
601 | -void UbuntuKeyboardInfo::onSocketError(QLocalSocket::LocalSocketError socketError) |
602 | -{ |
603 | - Q_UNUSED(socketError); |
604 | - qWarning() << "UbuntuKeyboardInfo - socket error:" << m_socket.errorString(); |
605 | -} |
606 | - |
607 | -void UbuntuKeyboardInfo::retryConnection() |
608 | -{ |
609 | - // Polling every gConnectionAttemptIntervalMs. Not the best approach but could be worse. |
610 | - if (m_consecutiveAttempts < gMaxConsecutiveAttempts) { |
611 | - if (!m_connectionRetryTimer.isActive()) { |
612 | - m_connectionRetryTimer.start(); |
613 | - } |
614 | - } else { |
615 | - qCritical() << "Failed to connect to" << m_socketFilePath << "after" |
616 | - << m_consecutiveAttempts << "failed attempts"; |
617 | - |
618 | - // it shouldn't be running, but just to be sure. |
619 | - m_connectionRetryTimer.stop(); |
620 | - } |
621 | -} |
622 | - |
623 | -void UbuntuKeyboardInfo::readAllBytesFromSocket() |
624 | -{ |
625 | - while (m_socket.bytesAvailable() > 0) { |
626 | - readInfoFromSocket(); |
627 | - } |
628 | -} |
629 | - |
630 | -void UbuntuKeyboardInfo::readInfoFromSocket() |
631 | -{ |
632 | - const size_t sharedInfoSize = sizeof(struct SharedInfo); |
633 | - QByteArray bytes = m_socket.read(sharedInfoSize); |
634 | - if (bytes.size() != sharedInfoSize) { |
635 | - qWarning() << "UbuntuKeyboardInfo: expected to receive" << sharedInfoSize |
636 | - << "but got" << bytes.size(); |
637 | - return; |
638 | - } |
639 | - |
640 | - { |
641 | - struct SharedInfo *sharedInfo = reinterpret_cast<struct SharedInfo*>(bytes.data()); |
642 | - |
643 | - if (m_lastX != sharedInfo->keyboardX) { |
644 | - m_lastX = sharedInfo->keyboardX; |
645 | - Q_EMIT xChanged(m_lastX); |
646 | - } |
647 | - |
648 | - if (m_lastY != sharedInfo->keyboardY) { |
649 | - m_lastY = sharedInfo->keyboardY; |
650 | - Q_EMIT yChanged(m_lastY); |
651 | - } |
652 | - |
653 | - if (m_lastWidth != sharedInfo->keyboardWidth) { |
654 | - m_lastWidth = sharedInfo->keyboardWidth; |
655 | - Q_EMIT widthChanged(m_lastWidth); |
656 | - } |
657 | - |
658 | - if (m_lastHeight != sharedInfo->keyboardHeight) { |
659 | - m_lastHeight = sharedInfo->keyboardHeight; |
660 | - Q_EMIT heightChanged(m_lastHeight); |
661 | - } |
662 | - } |
663 | -} |
664 | - |
665 | -void UbuntuKeyboardInfo::buildSocketFilePath() |
666 | -{ |
667 | - char *xdgRuntimeDir = getenv("XDG_RUNTIME_DIR"); |
668 | - |
669 | - if (xdgRuntimeDir) { |
670 | - m_socketFilePath = QDir(xdgRuntimeDir).filePath(gServerName); |
671 | - } else { |
672 | - m_socketFilePath = QDir("/tmp").filePath(gServerName); |
673 | - } |
674 | -} |
675 | - |
676 | -} // namespace qtmir |
677 | |
678 | === removed file 'src/modules/Unity/Application/ubuntukeyboardinfo.h' |
679 | --- src/modules/Unity/Application/ubuntukeyboardinfo.h 2015-08-11 12:08:32 +0000 |
680 | +++ src/modules/Unity/Application/ubuntukeyboardinfo.h 1970-01-01 00:00:00 +0000 |
681 | @@ -1,87 +0,0 @@ |
682 | -/* |
683 | - * Copyright (C) 2013-2015 Canonical, Ltd. |
684 | - * |
685 | - * This program is free software: you can redistribute it and/or modify it under |
686 | - * the terms of the GNU Lesser General Public License version 3, as published by |
687 | - * the Free Software Foundation. |
688 | - * |
689 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
690 | - * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, |
691 | - * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
692 | - * Lesser General Public License for more details. |
693 | - * |
694 | - * You should have received a copy of the GNU Lesser General Public License |
695 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
696 | - */ |
697 | - |
698 | -#ifndef UBUNTU_KEYBOARD_INFO_H |
699 | -#define UBUNTU_KEYBOARD_INFO_H |
700 | - |
701 | -#include <QLocalSocket> |
702 | -#include <QTimer> |
703 | - |
704 | -namespace qtmir { |
705 | - |
706 | -// Temporary solution to get information about the onscreen keyboard |
707 | -// This shouldn't be needed once the OSK is a properly sized surface |
708 | -// instead of a fullscreen one. |
709 | -class UbuntuKeyboardInfo : public QObject { |
710 | - Q_OBJECT |
711 | - Q_PROPERTY(qreal x READ x NOTIFY xChanged) |
712 | - Q_PROPERTY(qreal y READ y NOTIFY yChanged) |
713 | - Q_PROPERTY(qreal width READ width NOTIFY widthChanged) |
714 | - Q_PROPERTY(qreal height READ height NOTIFY heightChanged) |
715 | -public: |
716 | - UbuntuKeyboardInfo(QObject *parent = 0); |
717 | - virtual ~UbuntuKeyboardInfo(); |
718 | - |
719 | - static UbuntuKeyboardInfo* instance(); |
720 | - |
721 | - qreal x() const { return m_lastX; } |
722 | - qreal y() const { return m_lastY; } |
723 | - qreal width() const { return m_lastWidth; } |
724 | - qreal height() const { return m_lastHeight; } |
725 | - |
726 | -Q_SIGNALS: |
727 | - void xChanged(qreal x); |
728 | - void yChanged(qreal y); |
729 | - void widthChanged(qreal width); |
730 | - void heightChanged(qreal height); |
731 | - |
732 | -private Q_SLOTS: |
733 | - void tryConnectingToServer(); |
734 | - void onSocketStateChanged(QLocalSocket::LocalSocketState socketState); |
735 | - void onSocketError(QLocalSocket::LocalSocketError socketError); |
736 | - void readAllBytesFromSocket(); |
737 | - |
738 | -private: |
739 | - // NB! Must match the definition in ubuntu-keyboard. Not worth creating a shared header |
740 | - // just for that. |
741 | - struct SharedInfo { |
742 | - qint32 keyboardX; |
743 | - qint32 keyboardY; |
744 | - qint32 keyboardWidth; |
745 | - qint32 keyboardHeight; |
746 | - }; |
747 | - void readInfoFromSocket(); |
748 | - void retryConnection(); |
749 | - void buildSocketFilePath(); |
750 | - |
751 | - int m_consecutiveAttempts; |
752 | - |
753 | - QLocalSocket m_socket; |
754 | - qint32 m_lastX; |
755 | - qint32 m_lastY; |
756 | - qint32 m_lastWidth; |
757 | - qint32 m_lastHeight; |
758 | - QTimer m_connectionRetryTimer; |
759 | - |
760 | - // Path to the socket file created by ubuntu-keyboard |
761 | - QString m_socketFilePath; |
762 | - |
763 | - static UbuntuKeyboardInfo* m_instance; |
764 | -}; |
765 | - |
766 | -} // namespace qtmir |
767 | - |
768 | -#endif // UBUNTU_KEYBOARD_INFO_H |
769 | |
770 | === modified file 'src/modules/Unity/Screens/CMakeLists.txt' |
771 | --- src/modules/Unity/Screens/CMakeLists.txt 2016-01-28 22:33:35 +0000 |
772 | +++ src/modules/Unity/Screens/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
773 | @@ -1,5 +1,9 @@ |
774 | include_directories( |
775 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
776 | +) |
777 | + |
778 | +include_directories( |
779 | + SYSTEM |
780 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
781 | ${Qt5Quick_INCLUDE_DIRS} |
782 | ${MIRSERVER_INCLUDE_DIRS} |
783 | |
784 | === modified file 'src/platforms/mirserver/CMakeLists.txt' |
785 | --- src/platforms/mirserver/CMakeLists.txt 2016-06-14 08:33:55 +0000 |
786 | +++ src/platforms/mirserver/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
787 | @@ -26,6 +26,10 @@ |
788 | include_directories( |
789 | ${CMAKE_SOURCE_DIR}/src/common |
790 | |
791 | +) |
792 | + |
793 | +include_directories( |
794 | + SYSTEM |
795 | ${MIRCOMMON_INCLUDE_DIRS} |
796 | ${MIRSERVER_INCLUDE_DIRS} |
797 | ${MIRRENDERERGLDEV_INCLUDE_DIRS} |
798 | |
799 | === modified file 'src/platforms/mirserver/mirwindowmanager.cpp' |
800 | --- src/platforms/mirserver/mirwindowmanager.cpp 2016-05-27 08:34:18 +0000 |
801 | +++ src/platforms/mirserver/mirwindowmanager.cpp 2016-07-15 15:13:44 +0000 |
802 | @@ -197,14 +197,19 @@ |
803 | const mir::shell::SurfaceSpecification& modifications) |
804 | { |
805 | QMutexLocker locker(&SurfaceObserver::mutex); |
806 | + |
807 | + if (modifications.name.is_set()) { |
808 | + surface->rename(modifications.name.value()); |
809 | + } |
810 | + |
811 | + if (modifications.input_shape.is_set()) { |
812 | + surface->set_input_region(modifications.input_shape.value()); |
813 | + } |
814 | + |
815 | SurfaceObserver *observer = SurfaceObserver::observerForSurface(surface.get()); |
816 | if (observer) { |
817 | observer->notifySurfaceModifications(modifications); |
818 | } |
819 | - |
820 | - if (modifications.name.is_set()) { |
821 | - surface->rename(modifications.name.value()); |
822 | - } |
823 | } |
824 | |
825 | std::shared_ptr<MirWindowManager> MirWindowManager::create( |
826 | |
827 | === modified file 'src/platforms/mirserver/surfaceobserver.cpp' |
828 | --- src/platforms/mirserver/surfaceobserver.cpp 2016-05-05 14:18:30 +0000 |
829 | +++ src/platforms/mirserver/surfaceobserver.cpp 2016-07-15 15:13:44 +0000 |
830 | @@ -28,6 +28,22 @@ |
831 | #include <mir/geometry/size.h> |
832 | #include <mir/shell/surface_specification.h> |
833 | |
834 | +namespace { |
835 | + |
836 | +QRect calculateBoundingRect(const std::vector<mir::geometry::Rectangle> &rectVector) |
837 | +{ |
838 | + QRect boundingRect; |
839 | + for (auto mirRect : rectVector) { |
840 | + boundingRect |= QRect(mirRect.top_left.x.as_int(), |
841 | + mirRect.top_left.y.as_int(), |
842 | + mirRect.size.width.as_int(), |
843 | + mirRect.size.height.as_int()); |
844 | + } |
845 | + return boundingRect; |
846 | +} |
847 | + |
848 | +} // anonymous namespace |
849 | + |
850 | QMap<const mir::scene::Surface*, SurfaceObserver*> SurfaceObserver::m_surfaceToObserverMap; |
851 | QMutex SurfaceObserver::mutex; |
852 | |
853 | @@ -154,6 +170,10 @@ |
854 | if (modifications.shell_chrome.is_set()) { |
855 | Q_EMIT shellChromeChanged(modifications.shell_chrome.value()); |
856 | } |
857 | + if (modifications.input_shape.is_set()) { |
858 | + QRect qRect = calculateBoundingRect(modifications.input_shape.value()); |
859 | + Q_EMIT inputBoundsChanged(qRect); |
860 | + } |
861 | } |
862 | |
863 | SurfaceObserver *SurfaceObserver::observerForSurface(const mir::scene::Surface *surface) |
864 | |
865 | === modified file 'src/platforms/mirserver/surfaceobserver.h' |
866 | --- src/platforms/mirserver/surfaceobserver.h 2016-05-05 14:17:14 +0000 |
867 | +++ src/platforms/mirserver/surfaceobserver.h 2016-07-15 15:13:44 +0000 |
868 | @@ -1,5 +1,5 @@ |
869 | /* |
870 | - * Copyright (C) 2014-2015 Canonical, Ltd. |
871 | + * Copyright (C) 2014-2016 Canonical, Ltd. |
872 | * |
873 | * This program is free software: you can redistribute it and/or modify it under |
874 | * the terms of the GNU Lesser General Public License version 3, as published by |
875 | @@ -22,6 +22,7 @@ |
876 | #include <QObject> |
877 | #include <QMap> |
878 | #include <QMutex> |
879 | +#include <QRect> |
880 | #include <QSize> |
881 | #include <mir/scene/surface_observer.h> |
882 | |
883 | @@ -84,6 +85,7 @@ |
884 | void widthIncrementChanged(int); |
885 | void heightIncrementChanged(int); |
886 | void shellChromeChanged(MirShellChrome); |
887 | + void inputBoundsChanged(const QRect &rect); |
888 | |
889 | private: |
890 | QCursor createQCursorFromMirCursorImage(const mir::graphics::CursorImage &cursorImage); |
891 | |
892 | === modified file 'tests/framework/CMakeLists.txt' |
893 | --- tests/framework/CMakeLists.txt 2016-05-24 20:13:10 +0000 |
894 | +++ tests/framework/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
895 | @@ -1,7 +1,11 @@ |
896 | include_directories( |
897 | - ${APPLICATION_API_INCLUDE_DIRS} |
898 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
899 | ${CMAKE_SOURCE_DIR}/src/modules |
900 | +) |
901 | + |
902 | +include_directories( |
903 | + SYSTEM |
904 | + ${APPLICATION_API_INCLUDE_DIRS} |
905 | ${MIRSERVER_INCLUDE_DIRS} |
906 | ${MIRRENDERERGLDEV_INCLUDE_DIRS} |
907 | |
908 | |
909 | === modified file 'tests/framework/fake_mirsurface.h' |
910 | --- tests/framework/fake_mirsurface.h 2016-06-23 19:58:48 +0000 |
911 | +++ tests/framework/fake_mirsurface.h 2016-07-15 15:13:44 +0000 |
912 | @@ -76,6 +76,7 @@ |
913 | Mir::ShellChrome shellChrome() const override { return Mir::NormalChrome; } |
914 | |
915 | bool focused() const override { return false; } |
916 | + QRect inputBounds() const override { return QRect(0,0,10,10); } |
917 | |
918 | void requestFocus() override { |
919 | Q_EMIT focusRequested(); |
920 | @@ -85,8 +86,6 @@ |
921 | Q_EMIT closeRequested(); |
922 | } |
923 | |
924 | - void setScreen(QScreen *) override {} |
925 | - |
926 | void raise() override {} |
927 | |
928 | //// |
929 | @@ -133,8 +132,12 @@ |
930 | |
931 | QCursor cursor() const override { return QCursor(); } |
932 | |
933 | + void setScreen(QScreen *) override {} |
934 | + |
935 | SessionInterface* session() override { return m_session; } |
936 | |
937 | + bool inputAreaContains(const QPoint &) const override { return true; } |
938 | + |
939 | public Q_SLOTS: |
940 | void onCompositorSwappedBuffers() override; |
941 | |
942 | |
943 | === modified file 'tests/mirserver/Clipboard/CMakeLists.txt' |
944 | --- tests/mirserver/Clipboard/CMakeLists.txt 2014-12-03 08:56:35 +0000 |
945 | +++ tests/mirserver/Clipboard/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
946 | @@ -6,6 +6,10 @@ |
947 | |
948 | include_directories( |
949 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
950 | +) |
951 | + |
952 | +include_directories( |
953 | + SYSTEM |
954 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
955 | ${MIRSERVER_INCLUDE_DIRS} |
956 | ) |
957 | |
958 | === modified file 'tests/mirserver/QtEventFeeder/CMakeLists.txt' |
959 | --- tests/mirserver/QtEventFeeder/CMakeLists.txt 2014-12-03 08:56:35 +0000 |
960 | +++ tests/mirserver/QtEventFeeder/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
961 | @@ -7,6 +7,10 @@ |
962 | include_directories( |
963 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
964 | ${CMAKE_SOURCE_DIR}/src/common |
965 | +) |
966 | + |
967 | +include_directories( |
968 | + SYSTEM |
969 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
970 | ${MIRSERVER_INCLUDE_DIRS} |
971 | ) |
972 | |
973 | === modified file 'tests/mirserver/Screen/CMakeLists.txt' |
974 | --- tests/mirserver/Screen/CMakeLists.txt 2015-11-11 10:43:36 +0000 |
975 | +++ tests/mirserver/Screen/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
976 | @@ -8,6 +8,10 @@ |
977 | ${CMAKE_SOURCE_DIR}/tests/framework |
978 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
979 | ${CMAKE_SOURCE_DIR}/src/common |
980 | +) |
981 | + |
982 | +include_directories( |
983 | + SYSTEM |
984 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
985 | ${MIRSERVER_INCLUDE_DIRS} |
986 | ) |
987 | |
988 | === modified file 'tests/mirserver/ScreensModel/CMakeLists.txt' |
989 | --- tests/mirserver/ScreensModel/CMakeLists.txt 2016-02-16 11:48:35 +0000 |
990 | +++ tests/mirserver/ScreensModel/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
991 | @@ -11,6 +11,10 @@ |
992 | ${CMAKE_SOURCE_DIR}/tests/framework |
993 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
994 | ${CMAKE_SOURCE_DIR}/src/common |
995 | +) |
996 | + |
997 | +include_directories( |
998 | + SYSTEM |
999 | ${Qt5Gui_PRIVATE_INCLUDE_DIRS} |
1000 | ${MIRSERVER_INCLUDE_DIRS} |
1001 | ${MIRRENDERERGLDEV_INCLUDE_DIRS} |
1002 | |
1003 | === modified file 'tests/mirserver/WindowManager/CMakeLists.txt' |
1004 | --- tests/mirserver/WindowManager/CMakeLists.txt 2016-03-10 11:55:28 +0000 |
1005 | +++ tests/mirserver/WindowManager/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
1006 | @@ -1,5 +1,9 @@ |
1007 | include_directories( |
1008 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
1009 | +) |
1010 | + |
1011 | +include_directories( |
1012 | + SYSTEM |
1013 | ${MIRSERVER_INCLUDE_DIRS} |
1014 | ) |
1015 | |
1016 | |
1017 | === modified file 'tests/modules/Application/CMakeLists.txt' |
1018 | --- tests/modules/Application/CMakeLists.txt 2015-12-15 10:03:32 +0000 |
1019 | +++ tests/modules/Application/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
1020 | @@ -7,8 +7,11 @@ |
1021 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
1022 | ${CMAKE_SOURCE_DIR}/src/modules |
1023 | ${CMAKE_SOURCE_DIR}/tests/framework |
1024 | +) |
1025 | + |
1026 | +include_directories( |
1027 | + SYSTEM |
1028 | ${MIRSERVER_INCLUDE_DIRS} |
1029 | - |
1030 | ${Qt5Core_INCLUDE_DIRS} |
1031 | ${Qt5GUI_INCLUDE_DIRS} |
1032 | ${Qt5Quick_INCLUDE_DIRS} |
1033 | |
1034 | === modified file 'tests/modules/ApplicationManager/CMakeLists.txt' |
1035 | --- tests/modules/ApplicationManager/CMakeLists.txt 2015-09-30 15:45:17 +0000 |
1036 | +++ tests/modules/ApplicationManager/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
1037 | @@ -5,10 +5,14 @@ |
1038 | ) |
1039 | |
1040 | include_directories( |
1041 | - ${APPLICATION_API_INCLUDE_DIRS} |
1042 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
1043 | ${CMAKE_SOURCE_DIR}/src/modules |
1044 | ${CMAKE_SOURCE_DIR}/tests/framework |
1045 | +) |
1046 | + |
1047 | +include_directories( |
1048 | + SYSTEM |
1049 | + ${APPLICATION_API_INCLUDE_DIRS} |
1050 | ${MIRSERVER_INCLUDE_DIRS} |
1051 | ) |
1052 | |
1053 | |
1054 | === modified file 'tests/modules/SessionManager/CMakeLists.txt' |
1055 | --- tests/modules/SessionManager/CMakeLists.txt 2015-09-30 15:45:17 +0000 |
1056 | +++ tests/modules/SessionManager/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
1057 | @@ -6,10 +6,14 @@ |
1058 | ) |
1059 | |
1060 | include_directories( |
1061 | - ${APPLICATION_API_INCLUDE_DIRS} |
1062 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
1063 | ${CMAKE_SOURCE_DIR}/src/modules |
1064 | ${CMAKE_SOURCE_DIR}/tests/framework |
1065 | +) |
1066 | + |
1067 | +include_directories( |
1068 | + SYSTEM |
1069 | + ${APPLICATION_API_INCLUDE_DIRS} |
1070 | ${MIRSERVER_INCLUDE_DIRS} |
1071 | ) |
1072 | |
1073 | |
1074 | === modified file 'tests/modules/SharedWakelock/CMakeLists.txt' |
1075 | --- tests/modules/SharedWakelock/CMakeLists.txt 2015-09-30 15:45:17 +0000 |
1076 | +++ tests/modules/SharedWakelock/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
1077 | @@ -5,6 +5,10 @@ |
1078 | |
1079 | include_directories( |
1080 | ${CMAKE_SOURCE_DIR}/src/modules |
1081 | +) |
1082 | + |
1083 | +include_directories( |
1084 | + SYSTEM |
1085 | ${QTDBUSTEST_INCLUDE_DIRS} |
1086 | ${QTDBUSMOCK_INCLUDE_DIRS} |
1087 | ) |
1088 | |
1089 | === modified file 'tests/modules/SurfaceManager/CMakeLists.txt' |
1090 | --- tests/modules/SurfaceManager/CMakeLists.txt 2016-05-24 20:13:10 +0000 |
1091 | +++ tests/modules/SurfaceManager/CMakeLists.txt 2016-07-15 15:13:44 +0000 |
1092 | @@ -9,6 +9,10 @@ |
1093 | ${CMAKE_SOURCE_DIR}/src/modules |
1094 | ${CMAKE_SOURCE_DIR}/src/platforms/mirserver |
1095 | ${CMAKE_SOURCE_DIR}/tests/framework |
1096 | +) |
1097 | + |
1098 | +include_directories( |
1099 | + SYSTEM |
1100 | ${MIRSERVER_INCLUDE_DIRS} |
1101 | ${Qt5Quick_PRIVATE_INCLUDE_DIRS} |
1102 | ) |
Cool, thanks!!