Merge lp:~sergiusens/frame/update into lp:frame/phablet
- update
- Merge into phablet
Proposed by
Sergio Schvezov
Status: | Merged |
---|---|
Approved by: | Daniel d'Andrada |
Approved revision: | 112 |
Merged at revision: | 111 |
Proposed branch: | lp:~sergiusens/frame/update |
Merge into: | lp:frame/phablet |
Diff against target: |
835 lines (+288/-104) 33 files modified
configure.ac (+1/-1) debian/changelog (+45/-0) debian/copyright (+3/-4) debian/libframe6.symbols (+3/-0) include/oif/frame.h.in (+39/-2) include/oif/frame_backend.h (+3/-0) include/oif/frame_x11.h (+4/-2) m4/gtest.m4 (+12/-4) m4/xorg-gtest.m4 (+2/-31) src/Makefile.am (+3/-2) src/device.cpp (+28/-0) src/device.h (+3/-0) src/libframe.ver (+6/-0) src/x11/device_x11.cpp (+12/-10) src/x11/device_x11.h (+2/-2) test/integration/events.cpp (+2/-3) test/integration/events.h (+2/-3) test/integration/x11/device.cpp (+2/-3) test/integration/x11/dynamic_type_checking.cpp (+2/-3) test/integration/x11/fixture.cpp (+2/-3) test/integration/x11/fixture.h (+2/-3) test/integration/x11/ids.cpp (+2/-3) test/integration/x11/recording.cpp (+2/-3) test/regular/Makefile.am (+2/-0) test/regular/x11-accept-touch.cpp (+86/-0) tools/Makefile.am (+4/-1) tools/common/device.c (+2/-3) tools/common/device.h (+2/-3) tools/common/frame.c (+2/-3) tools/common/frame.h (+2/-3) tools/common/touch.c (+2/-3) tools/common/touch.h (+2/-3) tools/frame-test-x11.c (+2/-3) |
To merge this branch: | bzr merge lp:~sergiusens/frame/update |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel d'Andrada (community) | Approve | ||
Review via email: mp+155024@code.launchpad.net |
This proposal supersedes a proposal from 2013-03-22.
Commit message
Merging in trunk and bumping version
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'configure.ac' | |||
2 | --- configure.ac 2012-11-29 15:30:50 +0000 | |||
3 | +++ configure.ac 2013-03-22 17:36:22 +0000 | |||
4 | @@ -1,7 +1,7 @@ | |||
5 | 1 | # Initialize Autoconf | 1 | # Initialize Autoconf |
6 | 2 | AC_PREREQ([2.60]) | 2 | AC_PREREQ([2.60]) |
7 | 3 | AC_INIT([Touch Frame Library], | 3 | AC_INIT([Touch Frame Library], |
9 | 4 | [2.4.4], | 4 | [2.5.0], |
10 | 5 | [], | 5 | [], |
11 | 6 | [frame]) | 6 | [frame]) |
12 | 7 | AC_CONFIG_SRCDIR([Makefile.am]) | 7 | AC_CONFIG_SRCDIR([Makefile.am]) |
13 | 8 | 8 | ||
14 | === modified file 'debian/changelog' | |||
15 | --- debian/changelog 2012-11-29 21:16:47 +0000 | |||
16 | +++ debian/changelog 2013-03-22 17:36:22 +0000 | |||
17 | @@ -1,3 +1,36 @@ | |||
18 | 1 | frame (2.5.0daily13.03.12-0ubuntu1phablet1) quantal; urgency=low | ||
19 | 2 | |||
20 | 3 | * Merging current branch into phablet series. | ||
21 | 4 | |||
22 | 5 | -- Sergio Schvezov <sergio.schvezov@canonical.com> Fri, 22 Mar 2013 13:25:22 -0300 | ||
23 | 6 | |||
24 | 7 | frame (2.5.0daily13.03.12-0ubuntu1) raring; urgency=low | ||
25 | 8 | |||
26 | 9 | [ Stephen M. Webb ] | ||
27 | 10 | * frame FTBFS out of source tree (LP: #1152741) | ||
28 | 11 | |||
29 | 12 | [ Ubuntu daily release ] | ||
30 | 13 | * Automatic snapshot from revision 119 | ||
31 | 14 | |||
32 | 15 | -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 12 Mar 2013 06:52:59 +0000 | ||
33 | 16 | |||
34 | 17 | frame (2.5.0daily12.12.13-0ubuntu1) raring; urgency=low | ||
35 | 18 | |||
36 | 19 | * Automatic snapshot from revision 117 | ||
37 | 20 | |||
38 | 21 | -- Automatic PS uploader <ps-jenkins@lists.canonical.com> Thu, 13 Dec 2012 02:01:19 +0000 | ||
39 | 22 | |||
40 | 23 | frame (2.5.0daily12.12.07.1-0ubuntu1) raring; urgency=low | ||
41 | 24 | |||
42 | 25 | [ Daniel d'Andrada ] | ||
43 | 26 | * Relicense under (L)GPL version 3 *only* (no +) | ||
44 | 27 | * new: frame_accept_touch() and frame_reject_touch() | ||
45 | 28 | |||
46 | 29 | [ Automatic PS uploader ] | ||
47 | 30 | * Automatic snapshot from revision 115 | ||
48 | 31 | |||
49 | 32 | -- Automatic PS uploader <ps-jenkins@lists.canonical.com> Fri, 07 Dec 2012 06:37:44 +0000 | ||
50 | 33 | |||
51 | 1 | frame (2.4.4phablet2) quantal; urgency=low | 34 | frame (2.4.4phablet2) quantal; urgency=low |
52 | 2 | 35 | ||
53 | 3 | * Bump for auto CI/land | 36 | * Bump for auto CI/land |
54 | @@ -10,6 +43,18 @@ | |||
55 | 10 | 43 | ||
56 | 11 | -- Daniel d'Andrada <daniel.dandrada@canonical.com> Thu, 29 Nov 2012 13:56:37 -0200 | 44 | -- Daniel d'Andrada <daniel.dandrada@canonical.com> Thu, 29 Nov 2012 13:56:37 -0200 |
57 | 12 | 45 | ||
58 | 46 | frame (2.4.4daily12.12.04-0ubuntu1) raring; urgency=low | ||
59 | 47 | |||
60 | 48 | * Automatic snapshot from revision 110 | ||
61 | 49 | |||
62 | 50 | -- Automatic PS uploader <ps-jenkins@lists.canonical.com> Tue, 04 Dec 2012 02:00:43 +0000 | ||
63 | 51 | |||
64 | 52 | frame (2.4.4daily12.12.03-0ubuntu1) raring; urgency=low | ||
65 | 53 | |||
66 | 54 | * Automatic snapshot from revision 108 | ||
67 | 55 | |||
68 | 56 | -- Automatic PS uploader <ps-jenkins@lists.canonical.com> Mon, 03 Dec 2012 02:01:32 +0000 | ||
69 | 57 | |||
70 | 13 | frame (2.4.4daily12.11.29.1-0ubuntu1) raring; urgency=low | 58 | frame (2.4.4daily12.11.29.1-0ubuntu1) raring; urgency=low |
71 | 14 | 59 | ||
72 | 15 | [ Robert Bruce Park ] | 60 | [ Robert Bruce Park ] |
73 | 16 | 61 | ||
74 | === modified file 'debian/copyright' | |||
75 | --- debian/copyright 2012-11-22 22:16:27 +0000 | |||
76 | +++ debian/copyright 2013-03-22 17:36:22 +0000 | |||
77 | @@ -23,11 +23,10 @@ | |||
78 | 23 | Files: test/* tools/* | 23 | Files: test/* tools/* |
79 | 24 | Copyright: 2010-2012, Canonical Ltd. | 24 | Copyright: 2010-2012, Canonical Ltd. |
80 | 25 | 2010, Henrik Rydberg <rydberg@euromail.se> | 25 | 2010, Henrik Rydberg <rydberg@euromail.se> |
82 | 26 | License: GPL-3+ | 26 | License: GPL-3 |
83 | 27 | This program is free software: you can redistribute it and/or modify | 27 | This program is free software: you can redistribute it and/or modify |
87 | 28 | it under the terms of the GNU General Public License as published by | 28 | it under the terms of the GNU General Public License version 3 as |
88 | 29 | the Free Software Foundation, either version 3 of the License, or | 29 | published by the Free Software Foundation. |
86 | 30 | (at your option) any later version. | ||
89 | 31 | . | 30 | . |
90 | 32 | This program is distributed in the hope that it will be useful, | 31 | This program is distributed in the hope that it will be useful, |
91 | 33 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 32 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
92 | 34 | 33 | ||
93 | === modified file 'debian/libframe6.symbols' | |||
94 | --- debian/libframe6.symbols 2012-11-29 16:05:53 +0000 | |||
95 | +++ debian/libframe6.symbols 2013-03-22 17:36:22 +0000 | |||
96 | @@ -1,6 +1,9 @@ | |||
97 | 1 | libframe.so.6 libframe6 #MINVER# | 1 | libframe.so.6 libframe6 #MINVER# |
98 | 2 | FRAME_2.2@FRAME_2.2 2.2.0 | 2 | FRAME_2.2@FRAME_2.2 2.2.0 |
99 | 3 | FRAME_2.4@FRAME_2.4 2.4.3 | 3 | FRAME_2.4@FRAME_2.4 2.4.3 |
100 | 4 | FRAME_2.5@FRAME_2.5 2.5.0 | ||
101 | 5 | frame_accept_touch@FRAME_2.5 2.5.0 | ||
102 | 6 | frame_reject_touch@FRAME_2.5 2.5.0 | ||
103 | 4 | frame_axis_get_maximum@FRAME_2.2 2.2.4 | 7 | frame_axis_get_maximum@FRAME_2.2 2.2.4 |
104 | 5 | frame_axis_get_minimum@FRAME_2.2 2.2.4 | 8 | frame_axis_get_minimum@FRAME_2.2 2.2.4 |
105 | 6 | frame_axis_get_resolution@FRAME_2.2 2.2.4 | 9 | frame_axis_get_resolution@FRAME_2.2 2.2.4 |
106 | 7 | 10 | ||
107 | === modified file 'include/oif/frame.h.in' | |||
108 | --- include/oif/frame.h.in 2012-11-20 14:13:20 +0000 | |||
109 | +++ include/oif/frame.h.in 2013-03-22 17:36:22 +0000 | |||
110 | @@ -2,7 +2,7 @@ | |||
111 | 2 | * | 2 | * |
112 | 3 | * frame - Touch Frame Library | 3 | * frame - Touch Frame Library |
113 | 4 | * | 4 | * |
115 | 5 | * Copyright (C) 2010-2012 Canonical Ltd. | 5 | * Copyright (C) 2010-2013 Canonical Ltd. |
116 | 6 | * | 6 | * |
117 | 7 | * This library is free software: you can redistribute it and/or modify it | 7 | * This library is free software: you can redistribute it and/or modify it |
118 | 8 | * under the terms of the GNU Lesser General Public License version 3 | 8 | * under the terms of the GNU Lesser General Public License version 3 |
119 | @@ -741,9 +741,46 @@ | |||
120 | 741 | FRAME_PUBLIC | 741 | FRAME_PUBLIC |
121 | 742 | uint64_t frame_touch_get_start_time(UFTouch touch); | 742 | uint64_t frame_touch_get_start_time(UFTouch touch); |
122 | 743 | 743 | ||
123 | 744 | /** | ||
124 | 745 | * Accept ownership of a touch | ||
125 | 746 | * | ||
126 | 747 | * All touches received should be eventally accepted or rejected. | ||
127 | 748 | * This decision can come even after they have already ended but | ||
128 | 749 | * should be done as soon as possible. | ||
129 | 750 | * | ||
130 | 751 | * You should accept a touch when you're going to use it and | ||
131 | 752 | * reject it if you're not interested in it. | ||
132 | 753 | * | ||
133 | 754 | * Not all window servers have this concept. Those that do use | ||
134 | 755 | * this information to pass rejected touches forward to other | ||
135 | 756 | * clients that might want it. | ||
136 | 757 | * | ||
137 | 758 | * @param [in] device The device object for the touch (const) | ||
138 | 759 | * @param [in] window The window to accept the touch for | ||
139 | 760 | * @param [in] touch_id The touch ID object for the touch | ||
140 | 761 | * @return UFStatusSuccess, UFStatusErrorInvalidTouch | ||
141 | 762 | * @see frame_reject_touch | ||
142 | 763 | */ | ||
143 | 764 | FRAME_PUBLIC | ||
144 | 765 | UFStatus frame_accept_touch(UFDevice device, UFWindowId window, | ||
145 | 766 | UFTouchId touch_id); | ||
146 | 767 | |||
147 | 768 | /** | ||
148 | 769 | * Reject ownership of a touch | ||
149 | 770 | * | ||
150 | 771 | * @param [in] device The device object for the touch (const) | ||
151 | 772 | * @param [in] window The window to reject the touch for | ||
152 | 773 | * @param [in] touch_id The touch ID object for the touch | ||
153 | 774 | * @return UFStatusSuccess, UFStatusErrorInvalidTouch | ||
154 | 775 | * @see frame_accept_touch | ||
155 | 776 | */ | ||
156 | 777 | FRAME_PUBLIC | ||
157 | 778 | UFStatus frame_reject_touch(UFDevice device, UFWindowId window, | ||
158 | 779 | UFTouchId touch_id); | ||
159 | 780 | |||
160 | 744 | /** @} */ | 781 | /** @} */ |
161 | 745 | 782 | ||
163 | 746 | #include "frame_internal.h" | 783 | #include "oif/frame_internal.h" |
164 | 747 | 784 | ||
165 | 748 | #ifdef __cplusplus | 785 | #ifdef __cplusplus |
166 | 749 | } | 786 | } |
167 | 750 | 787 | ||
168 | === modified file 'include/oif/frame_backend.h' | |||
169 | --- include/oif/frame_backend.h 2012-11-09 13:07:06 +0000 | |||
170 | +++ include/oif/frame_backend.h 2013-03-22 17:36:22 +0000 | |||
171 | @@ -151,6 +151,9 @@ | |||
172 | 151 | * | 151 | * |
173 | 152 | * Touches that had a "end" state on the given frame won't be present | 152 | * Touches that had a "end" state on the given frame won't be present |
174 | 153 | * on the new frame. | 153 | * on the new frame. |
175 | 154 | * | ||
176 | 155 | * The "ActiveTouches" property is automatically set to match the number | ||
177 | 156 | * of UFTouches present or remaining. | ||
178 | 154 | */ | 157 | */ |
179 | 155 | FRAME_PUBLIC | 158 | FRAME_PUBLIC |
180 | 156 | UFBackendFrame frame_backend_frame_create_next(UFBackendFrame frame); | 159 | UFBackendFrame frame_backend_frame_create_next(UFBackendFrame frame); |
181 | 157 | 160 | ||
182 | === modified file 'include/oif/frame_x11.h' | |||
183 | --- include/oif/frame_x11.h 2012-07-24 21:36:05 +0000 | |||
184 | +++ include/oif/frame_x11.h 2013-03-22 17:36:22 +0000 | |||
185 | @@ -2,7 +2,7 @@ | |||
186 | 2 | * | 2 | * |
187 | 3 | * frame - Touch Frame Library | 3 | * frame - Touch Frame Library |
188 | 4 | * | 4 | * |
190 | 5 | * Copyright (C) 2010-2012 Canonical Ltd. | 5 | * Copyright (C) 2010-2013 Canonical Ltd. |
191 | 6 | * | 6 | * |
192 | 7 | * This library is free software: you can redistribute it and/or modify it | 7 | * This library is free software: you can redistribute it and/or modify it |
193 | 8 | * under the terms of the GNU Lesser General Public License version 3 | 8 | * under the terms of the GNU Lesser General Public License version 3 |
194 | @@ -21,7 +21,7 @@ | |||
195 | 21 | #ifndef FRAME_OIF_FRAME_X11_H_ | 21 | #ifndef FRAME_OIF_FRAME_X11_H_ |
196 | 22 | #define FRAME_OIF_FRAME_X11_H_ | 22 | #define FRAME_OIF_FRAME_X11_H_ |
197 | 23 | 23 | ||
199 | 24 | #include "frame.h" | 24 | #include "oif/frame.h" |
200 | 25 | #include <X11/Xlib.h> | 25 | #include <X11/Xlib.h> |
201 | 26 | 26 | ||
202 | 27 | #ifdef __cplusplus | 27 | #ifdef __cplusplus |
203 | @@ -71,6 +71,7 @@ | |||
204 | 71 | /** | 71 | /** |
205 | 72 | * Accept ownership of a touch | 72 | * Accept ownership of a touch |
206 | 73 | * | 73 | * |
207 | 74 | * @deprecated Use frame_accept_touch instead. | ||
208 | 74 | * @param [in] device The device object for the touch (const) | 75 | * @param [in] device The device object for the touch (const) |
209 | 75 | * @param [in] window The window to accept the touch for | 76 | * @param [in] window The window to accept the touch for |
210 | 76 | * @param [in] touch_id The touch ID object for the touch | 77 | * @param [in] touch_id The touch ID object for the touch |
211 | @@ -83,6 +84,7 @@ | |||
212 | 83 | /** | 84 | /** |
213 | 84 | * Reject ownership of a touch | 85 | * Reject ownership of a touch |
214 | 85 | * | 86 | * |
215 | 87 | * @deprecated Use frame_reject_touch instead. | ||
216 | 86 | * @param [in] device The device object for the touch (const) | 88 | * @param [in] device The device object for the touch (const) |
217 | 87 | * @param [in] window The window to reject the touch for | 89 | * @param [in] window The window to reject the touch for |
218 | 88 | * @param [in] touch_id The touch ID object for the touch | 90 | * @param [in] touch_id The touch ID object for the touch |
219 | 89 | 91 | ||
220 | === modified file 'm4/gtest.m4' | |||
221 | --- m4/gtest.m4 2012-07-18 12:28:56 +0000 | |||
222 | +++ m4/gtest.m4 2013-03-22 17:36:22 +0000 | |||
223 | @@ -38,10 +38,18 @@ | |||
224 | 38 | 38 | ||
225 | 39 | GTEST_CPPFLAGS="$GTEST_CPPFLAGS -I$GTEST_SOURCE" | 39 | GTEST_CPPFLAGS="$GTEST_CPPFLAGS -I$GTEST_SOURCE" |
226 | 40 | 40 | ||
231 | 41 | AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc] | 41 | AC_LANG_PUSH(C++) |
232 | 42 | [$GTEST_SOURCE/src/gtest_main.cc], | 42 | gtest_save_CPPFLAGS=$CPPFLAGS |
233 | 43 | [have_gtest=yes], | 43 | CPPFLAGS="$CPPFLAGS $GTEST_CPPFLAGS" |
234 | 44 | [have_gtest=no]) | 44 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "src/gtest-all.cc"]])], |
235 | 45 | [have_gtest=yes], | ||
236 | 46 | [have_gtest=no]) | ||
237 | 47 | AS_IF([test "x$have_gtest" = xyes], | ||
238 | 48 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include "src/gtest_main.cc"]])], | ||
239 | 49 | [], | ||
240 | 50 | [have_gtest=no])]) | ||
241 | 51 | CPPFLAGS=$gtest_save_CPPFLAGS | ||
242 | 52 | AC_LANG_POP(C++) | ||
243 | 45 | 53 | ||
244 | 46 | AS_IF([test "x$have_gtest" = xyes], | 54 | AS_IF([test "x$have_gtest" = xyes], |
245 | 47 | [GTEST_LIBS=-lpthread | 55 | [GTEST_LIBS=-lpthread |
246 | 48 | 56 | ||
247 | === modified file 'm4/xorg-gtest.m4' | |||
248 | --- m4/xorg-gtest.m4 2012-06-21 19:41:40 +0000 | |||
249 | +++ m4/xorg-gtest.m4 2013-03-22 17:36:22 +0000 | |||
250 | @@ -1,4 +1,4 @@ | |||
252 | 1 | # serial 2 | 1 | # serial 3 |
253 | 2 | 2 | ||
254 | 3 | # Copyright (C) 2012 Canonical, Ltd. | 3 | # Copyright (C) 2012 Canonical, Ltd. |
255 | 4 | # | 4 | # |
256 | @@ -21,35 +21,6 @@ | |||
257 | 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
258 | 22 | # SOFTWARE. | 22 | # SOFTWARE. |
259 | 23 | 23 | ||
260 | 24 | # Checks whether the gtest source is available on the system. Allows for | ||
261 | 25 | # adjusting the include and source path. Sets have_gtest=yes if the source is | ||
262 | 26 | # present. Sets GTEST_CPPFLAGS and GTEST_SOURCE to the preprocessor flags and | ||
263 | 27 | # source location respectively. | ||
264 | 28 | AC_DEFUN([_CHECK_GTEST], | ||
265 | 29 | [ | ||
266 | 30 | AC_ARG_WITH([gtest-source-path], | ||
267 | 31 | [AS_HELP_STRING([--with-gtest-source-path], | ||
268 | 32 | [location of the Google test sources, defaults to /usr/src/gtest])], | ||
269 | 33 | [GTEST_SOURCE="$withval"; GTEST_CPPFLAGS="-I$withval/include"], | ||
270 | 34 | [GTEST_SOURCE="/usr/src/gtest"]) | ||
271 | 35 | |||
272 | 36 | AC_ARG_WITH([gtest-include-path], | ||
273 | 37 | [AS_HELP_STRING([--with-gtest-include-path], | ||
274 | 38 | [location of the Google test headers])], | ||
275 | 39 | [GTEST_CPPFLAGS="-I$withval"]) | ||
276 | 40 | |||
277 | 41 | GTEST_CPPFLAGS="$GTEST_CPPFLAGS -I$GTEST_SOURCE" | ||
278 | 42 | |||
279 | 43 | AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc] | ||
280 | 44 | [$GTEST_SOURCE/src/gtest_main.cc], | ||
281 | 45 | [have_gtest=yes], | ||
282 | 46 | [have_gtest=no]) | ||
283 | 47 | |||
284 | 48 | AS_IF([test "x$have_gtest_source" = xyes], | ||
285 | 49 | [AC_SUBST(GTEST_CPPFLAGS)] | ||
286 | 50 | [AC_SUBST(GTEST_SOURCE)]) | ||
287 | 51 | ]) # _CHECK_GTEST | ||
288 | 52 | |||
289 | 53 | # CHECK_XORG_GTEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | 24 | # CHECK_XORG_GTEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
290 | 54 | # | 25 | # |
291 | 55 | # Checks whether the xorg-gtest source is available on the system. Allows for | 26 | # Checks whether the xorg-gtest source is available on the system. Allows for |
292 | @@ -61,7 +32,7 @@ | |||
293 | 61 | # Both default actions are no-ops. | 32 | # Both default actions are no-ops. |
294 | 62 | AC_DEFUN([CHECK_XORG_GTEST], | 33 | AC_DEFUN([CHECK_XORG_GTEST], |
295 | 63 | [ | 34 | [ |
297 | 64 | AC_REQUIRE([_CHECK_GTEST]) | 35 | AC_REQUIRE([CHECK_GTEST]) |
298 | 65 | 36 | ||
299 | 66 | PKG_CHECK_EXISTS([xorg-gtest], | 37 | PKG_CHECK_EXISTS([xorg-gtest], |
300 | 67 | [have_xorg_gtest=yes], | 38 | [have_xorg_gtest=yes], |
301 | 68 | 39 | ||
302 | === modified file 'src/Makefile.am' | |||
303 | --- src/Makefile.am 2012-11-20 14:13:20 +0000 | |||
304 | +++ src/Makefile.am 2013-03-22 17:36:22 +0000 | |||
305 | @@ -14,6 +14,7 @@ | |||
306 | 14 | $(CXX_LIBS) | 14 | $(CXX_LIBS) |
307 | 15 | 15 | ||
308 | 16 | AM_CPPFLAGS = \ | 16 | AM_CPPFLAGS = \ |
309 | 17 | -I$(top_builddir)/include \ | ||
310 | 17 | -I$(top_srcdir)/include/ \ | 18 | -I$(top_srcdir)/include/ \ |
311 | 18 | -I$(top_srcdir)/src \ | 19 | -I$(top_srcdir)/src \ |
312 | 19 | $(WARNING_CPPFLAGS) \ | 20 | $(WARNING_CPPFLAGS) \ |
313 | @@ -29,7 +30,7 @@ | |||
314 | 29 | 30 | ||
315 | 30 | libframeincludedir = $(includedir)/oif | 31 | libframeincludedir = $(includedir)/oif |
316 | 31 | libframeinclude_HEADERS = \ | 32 | libframeinclude_HEADERS = \ |
318 | 32 | $(top_srcdir)/include/oif/frame.h \ | 33 | $(top_builddir)/include/oif/frame.h \ |
319 | 33 | $(top_srcdir)/include/oif/frame_backend.h \ | 34 | $(top_srcdir)/include/oif/frame_backend.h \ |
320 | 34 | $(top_srcdir)/include/oif/frame_internal.h | 35 | $(top_srcdir)/include/oif/frame_internal.h |
321 | 35 | 36 | ||
322 | @@ -69,4 +70,4 @@ | |||
323 | 69 | x11/window_x11.cpp | 70 | x11/window_x11.cpp |
324 | 70 | endif | 71 | endif |
325 | 71 | 72 | ||
327 | 72 | EXTRA_DIST = $(version_script) | 73 | EXTRA_DIST = $(version_script) |
328 | 73 | 74 | ||
329 | === modified file 'src/device.cpp' | |||
330 | --- src/device.cpp 2012-08-29 18:53:37 +0000 | |||
331 | +++ src/device.cpp 2013-03-22 17:36:22 +0000 | |||
332 | @@ -51,6 +51,20 @@ | |||
333 | 51 | return UFStatusSuccess; | 51 | return UFStatusSuccess; |
334 | 52 | } | 52 | } |
335 | 53 | 53 | ||
336 | 54 | UFStatus UFDevice::AcceptTouch(UFWindowId window_id, UFTouchId touch_id) | ||
337 | 55 | { | ||
338 | 56 | (void)window_id; | ||
339 | 57 | (void)touch_id; | ||
340 | 58 | return UFStatusSuccess; | ||
341 | 59 | } | ||
342 | 60 | |||
343 | 61 | UFStatus UFDevice::RejectTouch(UFWindowId window_id, UFTouchId touch_id) | ||
344 | 62 | { | ||
345 | 63 | (void)window_id; | ||
346 | 64 | (void)touch_id; | ||
347 | 65 | return UFStatusSuccess; | ||
348 | 66 | } | ||
349 | 67 | |||
350 | 54 | } // namespace frame | 68 | } // namespace frame |
351 | 55 | } // namespace oif | 69 | } // namespace oif |
352 | 56 | 70 | ||
353 | @@ -143,6 +157,20 @@ | |||
354 | 143 | return resolution; | 157 | return resolution; |
355 | 144 | } | 158 | } |
356 | 145 | 159 | ||
357 | 160 | UFStatus frame_accept_touch(UFDevice device, UFWindowId window_id, | ||
358 | 161 | UFTouchId touch_id) | ||
359 | 162 | { | ||
360 | 163 | return static_cast<oif::frame::UFDevice*>(device)-> | ||
361 | 164 | AcceptTouch(window_id, touch_id); | ||
362 | 165 | } | ||
363 | 166 | |||
364 | 167 | UFStatus frame_reject_touch(UFDevice device, UFWindowId window_id, | ||
365 | 168 | UFTouchId touch_id) | ||
366 | 169 | { | ||
367 | 170 | return static_cast<oif::frame::UFDevice*>(device)-> | ||
368 | 171 | RejectTouch(window_id, touch_id); | ||
369 | 172 | } | ||
370 | 173 | |||
371 | 146 | UFBackendDevice frame_backend_device_new() | 174 | UFBackendDevice frame_backend_device_new() |
372 | 147 | { | 175 | { |
373 | 148 | return new UFBackendDevice_(new oif::frame::UFDevice); | 176 | return new UFBackendDevice_(new oif::frame::UFDevice); |
374 | 149 | 177 | ||
375 | === modified file 'src/device.h' | |||
376 | --- src/device.h 2012-08-28 18:20:51 +0000 | |||
377 | +++ src/device.h 2013-03-22 17:36:22 +0000 | |||
378 | @@ -55,6 +55,9 @@ | |||
379 | 55 | typedef std::unique_ptr<UFAxis> UniqueUFAxis; | 55 | typedef std::unique_ptr<UFAxis> UniqueUFAxis; |
380 | 56 | 56 | ||
381 | 57 | std::map<UFAxisType, UniqueUFAxis> axes_; | 57 | std::map<UFAxisType, UniqueUFAxis> axes_; |
382 | 58 | |||
383 | 59 | virtual UFStatus AcceptTouch(UFWindowId window_id, UFTouchId touch_id); | ||
384 | 60 | virtual UFStatus RejectTouch(UFWindowId window_id, UFTouchId touch_id); | ||
385 | 58 | }; | 61 | }; |
386 | 59 | 62 | ||
387 | 60 | } // namespace frame | 63 | } // namespace frame |
388 | 61 | 64 | ||
389 | === modified file 'src/libframe.ver' | |||
390 | --- src/libframe.ver 2012-11-26 19:55:29 +0000 | |||
391 | +++ src/libframe.ver 2013-03-22 17:36:22 +0000 | |||
392 | @@ -103,3 +103,9 @@ | |||
393 | 103 | frame_event_set_frame; | 103 | frame_event_set_frame; |
394 | 104 | frame_event_set_time; | 104 | frame_event_set_time; |
395 | 105 | } FRAME_2.2; | 105 | } FRAME_2.2; |
396 | 106 | |||
397 | 107 | FRAME_2.5 { | ||
398 | 108 | global: | ||
399 | 109 | frame_accept_touch; | ||
400 | 110 | frame_reject_touch; | ||
401 | 111 | } FRAME_2.4; | ||
402 | 106 | 112 | ||
403 | === modified file 'src/x11/device_x11.cpp' | |||
404 | --- src/x11/device_x11.cpp 2012-08-28 19:25:07 +0000 | |||
405 | +++ src/x11/device_x11.cpp 2013-03-22 17:36:22 +0000 | |||
406 | @@ -179,9 +179,10 @@ | |||
407 | 179 | return false; | 179 | return false; |
408 | 180 | } | 180 | } |
409 | 181 | 181 | ||
413 | 182 | UFStatus UFDeviceX11::AcceptTouch(::Window window_id, | 182 | UFStatus UFDeviceX11::AcceptTouch(UFWindowId window_id, |
414 | 183 | UFTouchId touch_id) const { | 183 | UFTouchId touch_id) { |
415 | 184 | auto it = windows_.find(window_id); | 184 | ::Window x11_window_id = frame_x11_get_window_id(window_id); |
416 | 185 | auto it = windows_.find(x11_window_id); | ||
417 | 185 | if (it != windows_.end()) { | 186 | if (it != windows_.end()) { |
418 | 186 | WindowX11* window = static_cast<WindowX11*>(it->second.get()); | 187 | WindowX11* window = static_cast<WindowX11*>(it->second.get()); |
419 | 187 | return window->AcceptTouch(touch_id); | 188 | return window->AcceptTouch(touch_id); |
420 | @@ -190,9 +191,10 @@ | |||
421 | 190 | return UFStatusErrorInvalidTouch; | 191 | return UFStatusErrorInvalidTouch; |
422 | 191 | } | 192 | } |
423 | 192 | 193 | ||
427 | 193 | UFStatus UFDeviceX11::RejectTouch(::Window window_id, | 194 | UFStatus UFDeviceX11::RejectTouch(UFWindowId window_id, |
428 | 194 | UFTouchId touch_id) const { | 195 | UFTouchId touch_id) { |
429 | 195 | auto it = windows_.find(window_id); | 196 | ::Window x11_window_id = frame_x11_get_window_id(window_id); |
430 | 197 | auto it = windows_.find(x11_window_id); | ||
431 | 196 | if (it != windows_.end()) { | 198 | if (it != windows_.end()) { |
432 | 197 | WindowX11* window = static_cast<WindowX11*>(it->second.get()); | 199 | WindowX11* window = static_cast<WindowX11*>(it->second.get()); |
433 | 198 | return window->RejectTouch(touch_id); | 200 | return window->RejectTouch(touch_id); |
434 | @@ -212,18 +214,18 @@ | |||
435 | 212 | 214 | ||
436 | 213 | extern "C" { | 215 | extern "C" { |
437 | 214 | 216 | ||
439 | 215 | UFStatus frame_x11_accept_touch(UFDevice device, UFWindowId window, | 217 | UFStatus frame_x11_accept_touch(UFDevice device, UFWindowId window_id, |
440 | 216 | UFTouchId touch_id) { | 218 | UFTouchId touch_id) { |
441 | 217 | oif::frame::UFDeviceX11* device_x11 = | 219 | oif::frame::UFDeviceX11* device_x11 = |
442 | 218 | static_cast<oif::frame::UFDeviceX11*>(device); | 220 | static_cast<oif::frame::UFDeviceX11*>(device); |
444 | 219 | return device_x11->AcceptTouch(frame_x11_get_window_id(window), touch_id); | 221 | return device_x11->AcceptTouch(window_id, touch_id); |
445 | 220 | } | 222 | } |
446 | 221 | 223 | ||
448 | 222 | UFStatus frame_x11_reject_touch(UFDevice device, UFWindowId window, | 224 | UFStatus frame_x11_reject_touch(UFDevice device, UFWindowId window_id, |
449 | 223 | UFTouchId touch_id) { | 225 | UFTouchId touch_id) { |
450 | 224 | oif::frame::UFDeviceX11* device_x11 = | 226 | oif::frame::UFDeviceX11* device_x11 = |
451 | 225 | static_cast<oif::frame::UFDeviceX11*>(device); | 227 | static_cast<oif::frame::UFDeviceX11*>(device); |
453 | 226 | return device_x11->RejectTouch(frame_x11_get_window_id(window), touch_id); | 228 | return device_x11->RejectTouch(window_id, touch_id); |
454 | 227 | } | 229 | } |
455 | 228 | 230 | ||
456 | 229 | } // extern "C" | 231 | } // extern "C" |
457 | 230 | 232 | ||
458 | === modified file 'src/x11/device_x11.h' | |||
459 | --- src/x11/device_x11.h 2012-06-21 19:41:40 +0000 | |||
460 | +++ src/x11/device_x11.h 2013-03-22 17:36:22 +0000 | |||
461 | @@ -45,8 +45,8 @@ | |||
462 | 45 | bool HandleDeviceEvent(const XIDeviceEvent* event, SharedUFFrame* frame); | 45 | bool HandleDeviceEvent(const XIDeviceEvent* event, SharedUFFrame* frame); |
463 | 46 | bool HandleOwnershipEvent(const XITouchOwnershipEvent* event, | 46 | bool HandleOwnershipEvent(const XITouchOwnershipEvent* event, |
464 | 47 | SharedUFFrame* frame); | 47 | SharedUFFrame* frame); |
467 | 48 | UFStatus AcceptTouch(::Window window_id, UFTouchId touch_id) const; | 48 | virtual UFStatus AcceptTouch(UFWindowId window_id, UFTouchId touch_id); |
468 | 49 | UFStatus RejectTouch(::Window window_id, UFTouchId touch_id) const; | 49 | virtual UFStatus RejectTouch(UFWindowId window_id, UFTouchId touch_id); |
469 | 50 | void ReleaseFrames(); | 50 | void ReleaseFrames(); |
470 | 51 | 51 | ||
471 | 52 | UFDeviceX11(const UFDeviceX11&) = delete; | 52 | UFDeviceX11(const UFDeviceX11&) = delete; |
472 | 53 | 53 | ||
473 | === modified file 'test/integration/events.cpp' | |||
474 | --- test/integration/events.cpp 2012-07-24 20:47:15 +0000 | |||
475 | +++ test/integration/events.cpp 2013-03-22 17:36:22 +0000 | |||
476 | @@ -5,9 +5,8 @@ | |||
477 | 5 | * Copyright (C) 2011 Canonical Ltd. | 5 | * Copyright (C) 2011 Canonical Ltd. |
478 | 6 | * | 6 | * |
479 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
483 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
484 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
482 | 10 | * option) any later version. | ||
485 | 11 | * | 10 | * |
486 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
487 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
488 | 14 | 13 | ||
489 | === modified file 'test/integration/events.h' | |||
490 | --- test/integration/events.h 2012-07-24 20:47:15 +0000 | |||
491 | +++ test/integration/events.h 2013-03-22 17:36:22 +0000 | |||
492 | @@ -5,9 +5,8 @@ | |||
493 | 5 | * Copyright (C) 2011 Canonical Ltd. | 5 | * Copyright (C) 2011 Canonical Ltd. |
494 | 6 | * | 6 | * |
495 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
499 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
500 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
498 | 10 | * option) any later version. | ||
501 | 11 | * | 10 | * |
502 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
503 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
504 | 14 | 13 | ||
505 | === modified file 'test/integration/x11/device.cpp' | |||
506 | --- test/integration/x11/device.cpp 2012-06-21 19:41:40 +0000 | |||
507 | +++ test/integration/x11/device.cpp 2013-03-22 17:36:22 +0000 | |||
508 | @@ -5,9 +5,8 @@ | |||
509 | 5 | * Copyright (C) 2011 Canonical Ltd. | 5 | * Copyright (C) 2011 Canonical Ltd. |
510 | 6 | * | 6 | * |
511 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
515 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
516 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
514 | 10 | * option) any later version. | ||
517 | 11 | * | 10 | * |
518 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
519 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
520 | 14 | 13 | ||
521 | === modified file 'test/integration/x11/dynamic_type_checking.cpp' | |||
522 | --- test/integration/x11/dynamic_type_checking.cpp 2012-06-21 19:41:40 +0000 | |||
523 | +++ test/integration/x11/dynamic_type_checking.cpp 2013-03-22 17:36:22 +0000 | |||
524 | @@ -5,9 +5,8 @@ | |||
525 | 5 | * Copyright (C) 2011 Canonical Ltd. | 5 | * Copyright (C) 2011 Canonical Ltd. |
526 | 6 | * | 6 | * |
527 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
531 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
532 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
530 | 10 | * option) any later version. | ||
533 | 11 | * | 10 | * |
534 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
535 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
536 | 14 | 13 | ||
537 | === modified file 'test/integration/x11/fixture.cpp' | |||
538 | --- test/integration/x11/fixture.cpp 2012-06-21 19:41:40 +0000 | |||
539 | +++ test/integration/x11/fixture.cpp 2013-03-22 17:36:22 +0000 | |||
540 | @@ -5,9 +5,8 @@ | |||
541 | 5 | * Copyright (C) 2011 Canonical Ltd. | 5 | * Copyright (C) 2011 Canonical Ltd. |
542 | 6 | * | 6 | * |
543 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
547 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
548 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
546 | 10 | * option) any later version. | ||
549 | 11 | * | 10 | * |
550 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
551 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
552 | 14 | 13 | ||
553 | === modified file 'test/integration/x11/fixture.h' | |||
554 | --- test/integration/x11/fixture.h 2012-06-21 19:41:40 +0000 | |||
555 | +++ test/integration/x11/fixture.h 2013-03-22 17:36:22 +0000 | |||
556 | @@ -5,9 +5,8 @@ | |||
557 | 5 | * Copyright (C) 2011 Canonical Ltd. | 5 | * Copyright (C) 2011 Canonical Ltd. |
558 | 6 | * | 6 | * |
559 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
563 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
564 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
562 | 10 | * option) any later version. | ||
565 | 11 | * | 10 | * |
566 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
567 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
568 | 14 | 13 | ||
569 | === modified file 'test/integration/x11/ids.cpp' | |||
570 | --- test/integration/x11/ids.cpp 2012-06-21 19:41:40 +0000 | |||
571 | +++ test/integration/x11/ids.cpp 2013-03-22 17:36:22 +0000 | |||
572 | @@ -5,9 +5,8 @@ | |||
573 | 5 | * Copyright (C) 2011 Canonical Ltd. | 5 | * Copyright (C) 2011 Canonical Ltd. |
574 | 6 | * | 6 | * |
575 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
579 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
580 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
578 | 10 | * option) any later version. | ||
581 | 11 | * | 10 | * |
582 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
583 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
584 | 14 | 13 | ||
585 | === modified file 'test/integration/x11/recording.cpp' | |||
586 | --- test/integration/x11/recording.cpp 2012-06-21 19:41:40 +0000 | |||
587 | +++ test/integration/x11/recording.cpp 2013-03-22 17:36:22 +0000 | |||
588 | @@ -5,9 +5,8 @@ | |||
589 | 5 | * Copyright (C) 2011 Canonical Ltd. | 5 | * Copyright (C) 2011 Canonical Ltd. |
590 | 6 | * | 6 | * |
591 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
595 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
596 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
594 | 10 | * option) any later version. | ||
597 | 11 | * | 10 | * |
598 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
599 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
600 | 14 | 13 | ||
601 | === modified file 'test/regular/Makefile.am' | |||
602 | --- test/regular/Makefile.am 2012-11-20 14:13:20 +0000 | |||
603 | +++ test/regular/Makefile.am 2013-03-22 17:36:22 +0000 | |||
604 | @@ -15,6 +15,7 @@ | |||
605 | 15 | $(COVERAGE_CFLAGS) | 15 | $(COVERAGE_CFLAGS) |
606 | 16 | 16 | ||
607 | 17 | AM_CPPFLAGS = \ | 17 | AM_CPPFLAGS = \ |
608 | 18 | -I$(top_builddir)/include \ | ||
609 | 18 | -I$(top_srcdir)/include \ | 19 | -I$(top_srcdir)/include \ |
610 | 19 | -iquote$(srcdir) | 20 | -iquote$(srcdir) |
611 | 20 | 21 | ||
612 | @@ -46,6 +47,7 @@ | |||
613 | 46 | if HAVE_XINPUT | 47 | if HAVE_XINPUT |
614 | 47 | check_regular_SOURCES += \ | 48 | check_regular_SOURCES += \ |
615 | 48 | accept-ended-touch.cpp \ | 49 | accept-ended-touch.cpp \ |
616 | 50 | x11-accept-touch.cpp \ | ||
617 | 49 | frame-x11-fixture.cpp \ | 51 | frame-x11-fixture.cpp \ |
618 | 50 | frame-x11-fixture.h | 52 | frame-x11-fixture.h |
619 | 51 | endif | 53 | endif |
620 | 52 | 54 | ||
621 | === added file 'test/regular/x11-accept-touch.cpp' | |||
622 | --- test/regular/x11-accept-touch.cpp 1970-01-01 00:00:00 +0000 | |||
623 | +++ test/regular/x11-accept-touch.cpp 2013-03-22 17:36:22 +0000 | |||
624 | @@ -0,0 +1,86 @@ | |||
625 | 1 | #include "frame-x11-fixture.h" | ||
626 | 2 | #include "x11_mocks.h" | ||
627 | 3 | |||
628 | 4 | class X11TouchAcceptance : public FrameX11Fixture | ||
629 | 5 | { | ||
630 | 6 | }; | ||
631 | 7 | |||
632 | 8 | /* | ||
633 | 9 | Calls frame_accept_touch and check if the corresponding X11 call is made | ||
634 | 10 | */ | ||
635 | 11 | TEST_F(X11TouchAcceptance, Accept) | ||
636 | 12 | { | ||
637 | 13 | UFStatus status; | ||
638 | 14 | UFDevice device; | ||
639 | 15 | |||
640 | 16 | xmock_server_time = 1234; | ||
641 | 17 | |||
642 | 18 | CreateXMockTouchScreenDevice(); | ||
643 | 19 | |||
644 | 20 | Display *display = XOpenDisplay(NULL); | ||
645 | 21 | |||
646 | 22 | status = frame_x11_new(display, &frame_handle); | ||
647 | 23 | ASSERT_EQ(UFStatusSuccess, status); | ||
648 | 24 | |||
649 | 25 | FetchDeviceAddedEvent(&device); | ||
650 | 26 | AssertNoMoreEvents(); | ||
651 | 27 | |||
652 | 28 | SendTouchEvent(XI_TouchBegin, 1, 10.0f, 10.0f); | ||
653 | 29 | SendTouchOwnershipEvent(1); | ||
654 | 30 | |||
655 | 31 | UFWindowId frame_window_id = frame_x11_create_window_id(DefaultRootWindow(display)); | ||
656 | 32 | status = frame_accept_touch(device, frame_window_id, 1); | ||
657 | 33 | ASSERT_EQ(UFStatusSuccess, status); | ||
658 | 34 | |||
659 | 35 | ASSERT_EQ(XIAcceptTouch, | ||
660 | 36 | xmock_get_touch_acceptance(xmock_devices[0].attachment /* device id */, | ||
661 | 37 | 1 /* touch id */, | ||
662 | 38 | DefaultRootWindow(display))); | ||
663 | 39 | |||
664 | 40 | frame_x11_delete(frame_handle); | ||
665 | 41 | frame_handle = nullptr; | ||
666 | 42 | |||
667 | 43 | XCloseDisplay(display); | ||
668 | 44 | |||
669 | 45 | DestroyXMockDevices(); | ||
670 | 46 | } | ||
671 | 47 | |||
672 | 48 | /* | ||
673 | 49 | Calls frame_reject_touch and check if the corresponding X11 call is made | ||
674 | 50 | */ | ||
675 | 51 | TEST_F(X11TouchAcceptance, Reject) | ||
676 | 52 | { | ||
677 | 53 | UFStatus status; | ||
678 | 54 | UFDevice device; | ||
679 | 55 | |||
680 | 56 | xmock_server_time = 1234; | ||
681 | 57 | |||
682 | 58 | CreateXMockTouchScreenDevice(); | ||
683 | 59 | |||
684 | 60 | Display *display = XOpenDisplay(NULL); | ||
685 | 61 | |||
686 | 62 | status = frame_x11_new(display, &frame_handle); | ||
687 | 63 | ASSERT_EQ(UFStatusSuccess, status); | ||
688 | 64 | |||
689 | 65 | FetchDeviceAddedEvent(&device); | ||
690 | 66 | AssertNoMoreEvents(); | ||
691 | 67 | |||
692 | 68 | SendTouchEvent(XI_TouchBegin, 1, 10.0f, 10.0f); | ||
693 | 69 | SendTouchOwnershipEvent(1); | ||
694 | 70 | |||
695 | 71 | UFWindowId frame_window_id = frame_x11_create_window_id(DefaultRootWindow(display)); | ||
696 | 72 | status = frame_reject_touch(device, frame_window_id, 1); | ||
697 | 73 | ASSERT_EQ(UFStatusSuccess, status); | ||
698 | 74 | |||
699 | 75 | ASSERT_EQ(XIRejectTouch, | ||
700 | 76 | xmock_get_touch_acceptance(xmock_devices[0].attachment /* device id */, | ||
701 | 77 | 1 /* touch id */, | ||
702 | 78 | DefaultRootWindow(display))); | ||
703 | 79 | |||
704 | 80 | frame_x11_delete(frame_handle); | ||
705 | 81 | frame_handle = nullptr; | ||
706 | 82 | |||
707 | 83 | XCloseDisplay(display); | ||
708 | 84 | |||
709 | 85 | DestroyXMockDevices(); | ||
710 | 86 | } | ||
711 | 0 | 87 | ||
712 | === modified file 'tools/Makefile.am' | |||
713 | --- tools/Makefile.am 2012-06-21 19:41:40 +0000 | |||
714 | +++ tools/Makefile.am 2013-03-22 17:36:22 +0000 | |||
715 | @@ -1,4 +1,7 @@ | |||
717 | 1 | AM_CPPFLAGS = -I$(top_srcdir)/include/ $(WARNING_CPPFLAGS) | 1 | AM_CPPFLAGS = \ |
718 | 2 | -I$(top_builddir)/include \ | ||
719 | 3 | -I$(top_srcdir)/include \ | ||
720 | 4 | $(WARNING_CPPFLAGS) | ||
721 | 2 | 5 | ||
722 | 3 | AM_CFLAGS = $(C11_CFLAGS) $(COVERAGE_CFLAGS) | 6 | AM_CFLAGS = $(C11_CFLAGS) $(COVERAGE_CFLAGS) |
723 | 4 | 7 | ||
724 | 5 | 8 | ||
725 | === modified file 'tools/common/device.c' | |||
726 | --- tools/common/device.c 2012-06-21 19:41:40 +0000 | |||
727 | +++ tools/common/device.c 2013-03-22 17:36:22 +0000 | |||
728 | @@ -5,9 +5,8 @@ | |||
729 | 5 | * Copyright (C) 2010-2011 Canonical Ltd. | 5 | * Copyright (C) 2010-2011 Canonical Ltd. |
730 | 6 | * | 6 | * |
731 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
735 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
736 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
734 | 10 | * option) any later version. | ||
737 | 11 | * | 10 | * |
738 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
739 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
740 | 14 | 13 | ||
741 | === modified file 'tools/common/device.h' | |||
742 | --- tools/common/device.h 2012-06-21 19:41:40 +0000 | |||
743 | +++ tools/common/device.h 2013-03-22 17:36:22 +0000 | |||
744 | @@ -5,9 +5,8 @@ | |||
745 | 5 | * Copyright (C) 2010-2011 Canonical Ltd. | 5 | * Copyright (C) 2010-2011 Canonical Ltd. |
746 | 6 | * | 6 | * |
747 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
751 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
752 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
750 | 10 | * option) any later version. | ||
753 | 11 | * | 10 | * |
754 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
755 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
756 | 14 | 13 | ||
757 | === modified file 'tools/common/frame.c' | |||
758 | --- tools/common/frame.c 2012-06-21 19:41:40 +0000 | |||
759 | +++ tools/common/frame.c 2013-03-22 17:36:22 +0000 | |||
760 | @@ -5,9 +5,8 @@ | |||
761 | 5 | * Copyright (C) 2010-2011 Canonical Ltd. | 5 | * Copyright (C) 2010-2011 Canonical Ltd. |
762 | 6 | * | 6 | * |
763 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
767 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
768 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
766 | 10 | * option) any later version. | ||
769 | 11 | * | 10 | * |
770 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
771 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
772 | 14 | 13 | ||
773 | === modified file 'tools/common/frame.h' | |||
774 | --- tools/common/frame.h 2012-06-21 19:41:40 +0000 | |||
775 | +++ tools/common/frame.h 2013-03-22 17:36:22 +0000 | |||
776 | @@ -5,9 +5,8 @@ | |||
777 | 5 | * Copyright (C) 2010-2011 Canonical Ltd. | 5 | * Copyright (C) 2010-2011 Canonical Ltd. |
778 | 6 | * | 6 | * |
779 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
783 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
784 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
782 | 10 | * option) any later version. | ||
785 | 11 | * | 10 | * |
786 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
787 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
788 | 14 | 13 | ||
789 | === modified file 'tools/common/touch.c' | |||
790 | --- tools/common/touch.c 2012-06-21 19:41:40 +0000 | |||
791 | +++ tools/common/touch.c 2013-03-22 17:36:22 +0000 | |||
792 | @@ -5,9 +5,8 @@ | |||
793 | 5 | * Copyright (C) 2010-2011 Canonical Ltd. | 5 | * Copyright (C) 2010-2011 Canonical Ltd. |
794 | 6 | * | 6 | * |
795 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
799 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
800 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
798 | 10 | * option) any later version. | ||
801 | 11 | * | 10 | * |
802 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
803 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
804 | 14 | 13 | ||
805 | === modified file 'tools/common/touch.h' | |||
806 | --- tools/common/touch.h 2012-06-21 19:41:40 +0000 | |||
807 | +++ tools/common/touch.h 2013-03-22 17:36:22 +0000 | |||
808 | @@ -5,9 +5,8 @@ | |||
809 | 5 | * Copyright (C) 2010-2011 Canonical Ltd. | 5 | * Copyright (C) 2010-2011 Canonical Ltd. |
810 | 6 | * | 6 | * |
811 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
815 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published |
816 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * by the Free Software Foundation. |
814 | 10 | * option) any later version. | ||
817 | 11 | * | 10 | * |
818 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
819 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
820 | 14 | 13 | ||
821 | === modified file 'tools/frame-test-x11.c' | |||
822 | --- tools/frame-test-x11.c 2012-06-21 19:41:40 +0000 | |||
823 | +++ tools/frame-test-x11.c 2013-03-22 17:36:22 +0000 | |||
824 | @@ -5,9 +5,8 @@ | |||
825 | 5 | * Copyright (C) 2010-2011 Canonical Ltd. | 5 | * Copyright (C) 2010-2011 Canonical Ltd. |
826 | 6 | * | 6 | * |
827 | 7 | * This program is free software: you can redistribute it and/or modify it | 7 | * This program is free software: you can redistribute it and/or modify it |
831 | 8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License version 3 as published by |
832 | 9 | * Free Software Foundation, either version 3 of the License, or (at your | 9 | * the Free Software Foundation. |
830 | 10 | * option) any later version. | ||
833 | 11 | * | 10 | * |
834 | 12 | * This program is distributed in the hope that it will be useful, but | 11 | * This program is distributed in the hope that it will be useful, but |
835 | 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
Looks fine.