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