Merge lp:~thumper/unity/adjust-cmake-setup into lp:unity
- adjust-cmake-setup
- Merge into trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~thumper/unity/adjust-cmake-setup |
Merge into: | lp:unity |
Diff against target: |
992 lines (+319/-115) 21 files modified
CMakeLists.txt (+25/-14) Notes.txt (+80/-0) dash/ResultViewGrid.cpp (+2/-2) launcher/ApplicationLauncherIcon.cpp (+1/-1) launcher/CMakeLists.txt (+4/-4) launcher/Launcher.cpp (+20/-19) launcher/Launcher.h (+8/-3) launcher/LauncherController.cpp (+4/-4) launcher/LauncherControllerPrivate.h (+2/-2) launcher/LauncherOptions.h (+0/-1) launcher/TrashLauncherIcon.cpp (+1/-1) tests/CMakeLists.txt (+71/-52) tests/test_launcher_controller.cpp (+1/-1) unity-shared/ApplicationManager.cpp (+34/-0) unity-shared/ApplicationManager.h (+55/-0) unity-shared/CMakeLists.txt (+4/-2) unity-shared/DebugDBusInterface.cpp (+4/-5) unity-shared/KeyboardUtil.h (+0/-1) unity-shared/ResizingBaseWindow.h (+1/-1) unity-shared/UnityWindowView.cpp (+1/-1) unity-shared/WindowManager.h (+1/-1) |
To merge this branch: | bzr merge lp:~thumper/unity/adjust-cmake-setup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Unity Team | Pending | ||
Review via email: mp+124595@code.launchpad.net |
Commit message
Description of the change
- 2687. By Tim Penhey
-
Merge trunk.
- 2688. By Tim Penhey
-
Neither of these X11 includes are needed.
- 2689. By Tim Penhey
-
Merge in the nux api fixes.
- 2690. By Tim Penhey
-
Abstract out the keyboard methods.
- 2691. By Tim Penhey
-
Merge trunk.
- 2692. By Tim Penhey
-
Fix typos, variable name, and old using stamement.
- 2693. By Tim Penhey
-
More include tweaks, and confirm that the tests pass.
- 2694. By Tim Penhey
-
Type updates.
- 2695. By Tim Penhey
-
Refactoring the window manager code.
- 2696. By Tim Penhey
-
Finish implementing the standalone window manager, and hook up tests and standalone versions.
- 2697. By Tim Penhey
-
More includes, and make vector params const&
- 2698. By Tim Penhey
-
Finish off the member rename.
- 2699. By Tim Penhey
-
missing includes.
- 2700. By Tim Penhey
-
Parameter name changed.
- 2701. By Tim Penhey
-
Try the gesture tests with the standalone window manager.
- 2702. By Tim Penhey
-
Migrate the script to use window manager instead of plugin adapter.
- 2703. By Tim Penhey
-
Have the xless tests use the standalone window manager.
- 2704. By Tim Penhey
-
Be explicit in the type.
- 2705. By Tim Penhey
-
Attempt to get the gesture compiling.
- 2706. By Tim Penhey
-
More parameter renames and missing consts.
- 2707. By Tim Penhey
-
Be explicit in the type.
- 2708. By Tim Penhey
-
Missing header.
- 2709. By Tim Penhey
-
Missing include.
- 2710. By Tim Penhey
-
Fix up the expo test to use the more generic window manager.
- 2711. By Tim Penhey
-
Another attempt to get gesture tests working.
- 2712. By Tim Penhey
-
More changed params missed.
- 2713. By Tim Penhey
-
Use explicit types for std::max. I still think this whole idea of using long long is a bad one, but perhaps we'll get to it later.
- 2714. By Tim Penhey
-
Revert failed attempts at changing the test-gestures.
- 2715. By Tim Penhey
-
Handle the horrible const case.
- 2716. By Tim Penhey
-
Reference not pointer.
- 2717. By Tim Penhey
-
Reference not pointer again.
- 2718. By Tim Penhey
-
Standalone function instead of private static.
- 2719. By Tim Penhey
-
Remove the path from the include.
- 2720. By Tim Penhey
-
Missing include.
- 2721. By Tim Penhey
-
Make the standalone use the standalone unity-shared variant.
- 2722. By Tim Penhey
-
Oops, need both.
- 2723. By Tim Penhey
-
More missed bits.
- 2724. By Tim Penhey
-
Merge trunk and resolve conflicts.
- 2725. By Tim Penhey
-
Attempt to split it out.
- 2726. By Tim Penhey
-
Merge trunk and resolve conflicts.
- 2727. By Tim Penhey
-
Edited wrong file.
- 2728. By Tim Penhey
-
More uses of the window manager.
- 2729. By Tim Penhey
-
Also fix typo that I reintroduced.
- 2730. By Tim Penhey
-
Merge prev pipe.
- 2731. By Tim Penhey
-
Merged window-
manager- refactor into adjust-cmake-setup. - 2732. By Tim Penhey
-
Merge prev.
- 2733. By Tim Penhey
-
Merged no-barriers-
with-no- x into adjust-cmake-setup. - 2734. By Tim Penhey
-
Merged no-barriers-
with-no- x into adjust-cmake-setup. - 2735. By Tim Penhey
-
Merged no-barriers-
with-no- x into adjust-cmake-setup. - 2736. By Tim Penhey
-
No ASM shaders in ARM
- 2737. By Tim Penhey
-
Missing define.
- 2738. By Tim Penhey
-
Don't build docs or i18n for arm right now.
- 2739. By Tim Penhey
-
Conditionally compile the X stuff.
- 2740. By Tim Penhey
-
No input window without X
- 2741. By Tim Penhey
-
Don't try to compile the compiz plugin if no X.
- 2742. By Tim Penhey
-
No ASM shaders in gles.
- 2743. By Tim Penhey
-
Don't compile the panel or hud if no X.
- 2744. By Tim Penhey
-
Don't make the standalone unity for arm.
- 2745. By Tim Penhey
-
Comment out the DND support for arm.
- 2746. By Tim Penhey
-
Comment out the DND support for arm.
- 2747. By Tim Penhey
-
Don't compile the standalone switcher for arm.
- 2748. By Tim Penhey
-
Comment out the DND support for arm.
- 2749. By Tim Penhey
-
Remove unneeded headers.
- 2750. By Tim Penhey
-
Comment out the DND support for arm.
- 2751. By Tim Penhey
-
Fake keyboard util for arm.
- 2752. By Tim Penhey
-
Merge prev pipe.
- 2753. By Tim Penhey
-
Merged no-barriers-
with-no- x into adjust-cmake-setup. - 2754. By Tim Penhey
-
Merged no-barriers-
with-no- x into adjust-cmake-setup. - 2755. By Tim Penhey
-
Merged no-barriers-
with-no- x into adjust-cmake-setup. - 2756. By Tim Penhey
-
Merged application-manager into adjust-cmake-setup.
- 2757. By Tim Penhey
-
Revert unneeded makefile changes.
- 2758. By Tim Penhey
-
Merge prev and resolve conflicts.
- 2759. By Tim Penhey
-
Merged application-manager into adjust-cmake-setup.
Unmerged revisions
- 2759. By Tim Penhey
-
Merged application-manager into adjust-cmake-setup.
- 2758. By Tim Penhey
-
Merge prev and resolve conflicts.
- 2757. By Tim Penhey
-
Revert unneeded makefile changes.
- 2756. By Tim Penhey
-
Merged application-manager into adjust-cmake-setup.
- 2755. By Tim Penhey
-
Merged no-barriers-
with-no- x into adjust-cmake-setup. - 2754. By Tim Penhey
-
Merged no-barriers-
with-no- x into adjust-cmake-setup. - 2753. By Tim Penhey
-
Merged no-barriers-
with-no- x into adjust-cmake-setup. - 2752. By Tim Penhey
-
Merge prev pipe.
- 2751. By Tim Penhey
-
Fake keyboard util for arm.
- 2750. By Tim Penhey
-
Comment out the DND support for arm.
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2012-10-18 15:29:34 +0000 |
3 | +++ CMakeLists.txt 2012-10-24 08:23:34 +0000 |
4 | @@ -18,23 +18,32 @@ |
5 | set (CMAKE_CXX_FLAGS_RELEASE "") |
6 | |
7 | option( |
8 | - UNITY_ENABLE_X_ORG_SUPPORT |
9 | + ENABLE_X_SUPPORT |
10 | "Enable X.org support in unity" |
11 | ON |
12 | ) |
13 | |
14 | -if(UNITY_ENABLE_X_ORG_SUPPORT) |
15 | - add_definitions(-DUNITY_HAS_X_ORG_SUPPORT) |
16 | +# This is due to bug lp:668799 - qemu-arm segfaults executing msgmerge |
17 | +option( |
18 | + I18N_SUPPORT |
19 | + "Enable I18N, do the .po file thing." |
20 | + ON |
21 | +) |
22 | + |
23 | +if (ENABLE_X_SUPPORT) |
24 | + add_definitions(-DUSE_X11) |
25 | message("Unity is configured with support for X.org") |
26 | else () |
27 | message("Unity is configured with without X.org") |
28 | -endif() |
29 | + add_definitions(-DNO_X11) |
30 | +endif () |
31 | |
32 | if (BUILD_GLES) |
33 | - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNUX_OPENGLES_20 -DUSE_GLES") |
34 | - set (UNITY_STANDALONE_LADD "-lunity-core-${UNITY_API_VERSION} -lm -lpthread -ldl") |
35 | + add_definitions(-DNUX_OPENGLES_20) |
36 | + add_definitions(-DUSE_GLES) |
37 | + set (UNITY_STANDALONE_LADD "-lunity-core-${UNITY_API_VERSION} -lm -lpthread -ldl") |
38 | else () |
39 | - set (UNITY_STANDALONE_LADD "-lunity-core-${UNITY_API_VERSION} -lm -lpthread -ldl -lGL -lGLU") |
40 | + set (UNITY_STANDALONE_LADD "-lunity-core-${UNITY_API_VERSION} -lm -lpthread -ldl -lGL -lGLU") |
41 | endif () |
42 | |
43 | # |
44 | @@ -107,7 +116,6 @@ |
45 | # |
46 | # i18n |
47 | # |
48 | - |
49 | find_package (Gettext REQUIRED) |
50 | |
51 | set (COMPIZ_I18N_DIR ${CMAKE_SOURCE_DIR}/po) |
52 | @@ -117,16 +125,19 @@ |
53 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
54 | ) |
55 | |
56 | +if (I18N_SUPPORT) |
57 | if (${GETTEXT_FOUND} STREQUAL "TRUE") |
58 | set (HAVE_GETTEXT true) |
59 | file (GLOB _translations ${CMAKE_SOURCE_DIR}/po/*.po) |
60 | GETTEXT_CREATE_TRANSLATIONS (${CMAKE_SOURCE_DIR}/po/${PROJECT_NAME}.pot |
61 | ALL ${_translations}) |
62 | endif (${GETTEXT_FOUND} STREQUAL "TRUE") |
63 | +endif() |
64 | + |
65 | |
66 | # |
67 | # Enable or disable boot logging |
68 | -# |
69 | +# |
70 | option (BOOT_LOGGER "Enable startup performance logging" OFF) |
71 | if (BOOT_LOGGER) |
72 | SET (BOOT_LOGGER_FLAG "-DENABLE_LOGGER") |
73 | @@ -144,10 +155,10 @@ |
74 | # |
75 | # Compiz Plugins |
76 | # |
77 | -if(UNITY_ENABLE_X_ORG_SUPPORT) |
78 | +if (ENABLE_X_SUPPORT) |
79 | set (UNITY_PLUGIN_DEPS "compiz>=0.9.8.0;nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;gmodule-2.0;dbusmenu-glib-0.4;x11;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;atk-bridge-2.0;unity-misc>=0.4.0;dbus-glib-1;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;xfixes;unity-protocol-private>=5.95.1;libgeis;xrender>=0.9;zeitgeist-1.0>=0.3.18") |
80 | else () |
81 | - set (UNITY_PLUGIN_DEPS "nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;gmodule-2.0;dbusmenu-glib-0.4;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;atk-bridge-2.0;unity-misc>=0.4.0;dbus-glib-1;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;xfixes;unity-protocol-private>=5.95.1;libgeis;xrender>=0.9;zeitgeist-1.0>=0.3.18") |
82 | + set (UNITY_PLUGIN_DEPS "nux-3.0>=3.0.0;libbamf3;dee-1.0;gio-2.0;gio-unix-2.0;gmodule-2.0;dbusmenu-glib-0.4;libstartup-notification-1.0;gthread-2.0;indicator3-0.4>=0.4.90;atk;atk-bridge-2.0;unity-misc>=0.4.0;dbus-glib-1;gtk+-3.0>=3.1;sigc++-2.0;json-glib-1.0;libnotify;unity-protocol-private>=5.95.1;zeitgeist-1.0>=0.3.18") |
83 | endif () |
84 | |
85 | set (UNITY_PROTOCOL_PRIVATE_DEPS "unity-protocol-private>=5.95.1") |
86 | @@ -159,16 +170,16 @@ |
87 | add_subdirectory(unity-shared) |
88 | add_subdirectory(dash) |
89 | add_subdirectory(launcher) |
90 | -add_subdirectory(shortcuts) |
91 | -if(UNITY_ENABLE_X_ORG_SUPPORT) |
92 | +if (ENABLE_X_SUPPORT) |
93 | add_subdirectory(hud) |
94 | add_subdirectory(panel) |
95 | add_subdirectory(plugins/unityshell) |
96 | add_subdirectory(plugins/networkarearegion) |
97 | add_subdirectory(plugins/unitydialog) |
98 | add_subdirectory(plugins/unity-mt-grab-handles) |
99 | + add_subdirectory(shortcuts) |
100 | add_subdirectory(unity-standalone) |
101 | -endif() |
102 | +endif () |
103 | |
104 | # subdirs |
105 | add_subdirectory(doc) |
106 | |
107 | === added file 'Notes.txt' |
108 | --- Notes.txt 1970-01-01 00:00:00 +0000 |
109 | +++ Notes.txt 2012-10-24 08:23:34 +0000 |
110 | @@ -0,0 +1,80 @@ |
111 | +For no X, don't compile: |
112 | + * PointerBarrier.h |
113 | + * EdgeBarrierController |
114 | + * XKeyboardUtil.cpp |
115 | + |
116 | + * test_pointer_barrier |
117 | + * test_edge_barrier_controller |
118 | + * test_keyboard_util |
119 | + |
120 | +Need a WindowManager implementation... |
121 | + * How to handle the lack of options... |
122 | + * LauncherOptions has its own class |
123 | + |
124 | + |
125 | +X11 include locations: |
126 | + |
127 | +launcher/AbstractLauncherIcon.h:30:#include <X11/Xlib.h> |
128 | + * Window used for member in ActionArg |
129 | + * Window used in vector return types |
130 | + * Should check to see if we can have a simple typedef |
131 | + |
132 | +launcher/LayoutSystem.h:26:#include <X11/Xlib.h> |
133 | + * We won't need this for phone or tablet initially |
134 | + * Conditionally compile it, and #ifdef out the usage |
135 | + where it is used at the moment. |
136 | + * Used in SwitcherView |
137 | + * We are unlikely to use the same switcher for tablet/phone |
138 | + |
139 | + |
140 | +launcher/PointerBarrier.cpp:21:#include <X11/extensions/Xfixes.h> |
141 | +launcher/PointerBarrier.h:24:#include <X11/Xlib.h> |
142 | +launcher/PointerBarrier.h:25:#include <X11/extensions/Xfixes.h> |
143 | + |
144 | + * None of the pointer barrier work is needed on the phone/tablet |
145 | + |
146 | +panel/PanelTitlebarGrabAreaView.cpp:28:#include <X11/cursorfont.h> |
147 | + * Changes the cursor over the grab area |
148 | + * Don't have these in the phone, tablet, so should be able to |
149 | + #ifdef these out |
150 | + |
151 | +plugins/networkarearegion/src/networkarearegion.h:23:#include <X11/Xatom.h> |
152 | +plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.h:75: typedef boost::shared_ptr <X11Texture> Ptr; |
153 | +plugins/unitydialog/src/unitydialog.h:24:#include <X11/Xatom.h> |
154 | +plugins/unitydialog/src/unitydialog.h:25:#include <X11/Xproto.h> |
155 | +plugins/unityshell/src/UnityGestureBroker.cpp:27:#include <X11/cursorfont.h> |
156 | +plugins/unityshell/src/comptransientfor.h:25:#include <X11/Xlib.h> |
157 | +plugins/unityshell/src/comptransientfor.h:26:#include <X11/Xatom.h> |
158 | +plugins/unityshell/src/inputremover.cpp:23:#include <X11/Xregion.h> |
159 | +plugins/unityshell/src/inputremover.h:26:#include <X11/Xlib.h> |
160 | +plugins/unityshell/src/inputremover.h:27:#include <X11/Xatom.h> |
161 | +plugins/unityshell/src/inputremover.h:28:#include <X11/extensions/shape.h> |
162 | +plugins/unityshell/src/minimizedwindowhandler.h:25:#include <X11/Xlib.h> |
163 | +plugins/unityshell/src/minimizedwindowhandler.h:26:#include <X11/Xatom.h> |
164 | +plugins/unityshell/src/transientfor.h:25:#include <X11/Xlib.h> |
165 | +plugins/unityshell/src/transientfor.h:26:#include <X11/Xatom.h> |
166 | + |
167 | +We shouldn't care about any of the plugins as this is all compiz related, and |
168 | +we aren't dealing with compiz on the phone/tablet. |
169 | + |
170 | +services/panel-service.c:34:#include <X11/extensions/XInput2.h> |
171 | +services/panel-service.c:35:#include <X11/XKBlib.h> |
172 | + |
173 | +Panel service needed? Must check |
174 | + |
175 | +tests/test-gestures/X11_mock.cpp:21:#include <X11/Xlib.h> |
176 | +tests/test-gestures/X11_mock.h:24:#include <X11/Xlib.h> |
177 | +tests/test-gestures/compiz_mock/core/core.h:24:#include <X11_mock.h> |
178 | +tests/test-gestures/compiz_mock/core/screen.h:24:#include <X11/Xlib.h> |
179 | +tests/x11-window-read-transients.h:23:#include <X11/Xlib.h> |
180 | +tests/x11-window-read-transients.h:24:#include <X11/Xatom.h> |
181 | +tests/x11-window.h:22:#include <X11/Xlib.h> |
182 | +tests/x11-window.h:23:#include <X11/Xatom.h> |
183 | + |
184 | +We probably don't care about the tests |
185 | + |
186 | +unity-shared/KeyboardUtil.h:25:#include <X11/keysym.h> |
187 | +unity-shared/KeyboardUtil.h:26:#include <X11/XKBlib.h> |
188 | +unity-shared/KeyboardUtil.h:27:#include <X11/extensions/XKBgeom.h> |
189 | + |
190 | +Grep finished (matches found) at Fri Sep 14 14:37:53 |
191 | |
192 | === modified file 'dash/ResultViewGrid.cpp' |
193 | --- dash/ResultViewGrid.cpp 2012-10-17 22:26:46 +0000 |
194 | +++ dash/ResultViewGrid.cpp 2012-10-24 08:23:34 +0000 |
195 | @@ -780,7 +780,7 @@ |
196 | */ |
197 | bool ResultViewGrid::DndSourceDragBegin() |
198 | { |
199 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
200 | +#ifdef USE_X11 |
201 | unsigned num_results = GetNumResults(); |
202 | unsigned drag_index = GetIndexAtPosition(last_mouse_down_x_, last_mouse_down_y_); |
203 | |
204 | @@ -932,7 +932,7 @@ |
205 | |
206 | void ResultViewGrid::DndSourceDragFinished(nux::DndAction result) |
207 | { |
208 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
209 | +#ifdef USE_X11 |
210 | UnReference(); |
211 | last_mouse_down_x_ = -1; |
212 | last_mouse_down_y_ = -1; |
213 | |
214 | === modified file 'launcher/ApplicationLauncherIcon.cpp' |
215 | --- launcher/ApplicationLauncherIcon.cpp 2012-10-17 22:26:46 +0000 |
216 | +++ launcher/ApplicationLauncherIcon.cpp 2012-10-24 08:23:34 +0000 |
217 | @@ -1301,7 +1301,7 @@ |
218 | |
219 | nux::DndAction ApplicationLauncherIcon::OnQueryAcceptDrop(DndData const& dnd_data) |
220 | { |
221 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
222 | +#ifdef USE_X11 |
223 | return ValidateUrisForLaunch(dnd_data).empty() ? nux::DNDACTION_NONE : nux::DNDACTION_COPY; |
224 | #else |
225 | return nux::DNDACTION_NONE; |
226 | |
227 | === modified file 'launcher/CMakeLists.txt' |
228 | --- launcher/CMakeLists.txt 2012-10-18 10:44:07 +0000 |
229 | +++ launcher/CMakeLists.txt 2012-10-24 08:23:34 +0000 |
230 | @@ -75,13 +75,13 @@ |
231 | VolumeMonitorWrapper.cpp |
232 | ) |
233 | |
234 | -if(UNITY_ENABLE_X_ORG_SUPPORT) |
235 | +if (ENABLE_X_SUPPORT) |
236 | set (LAUNCHER_SOURCES |
237 | EdgeBarrierController.cpp |
238 | PointerBarrier.cpp |
239 | ${LAUNCHER_SOURCES} |
240 | ) |
241 | -endif() |
242 | +endif () |
243 | |
244 | add_library (launcher-lib STATIC ${LAUNCHER_SOURCES}) |
245 | add_dependencies (launcher-lib unity-core-${UNITY_API_VERSION} unity-shared) |
246 | @@ -104,8 +104,8 @@ |
247 | add_dependencies (launcher launcher-lib) |
248 | target_link_libraries (launcher launcher-lib unity-shared unity-shared-standalone) |
249 | |
250 | -if(UNITY_ENABLE_X_ORG_SUPPORT) |
251 | +if (ENABLE_X_SUPPORT) |
252 | add_executable (switcher StandaloneSwitcher.cpp) |
253 | add_dependencies (switcher switcher-lib launcher-lib) |
254 | target_link_libraries (switcher switcher-lib launcher-lib unity-shared unity-shared-standalone) |
255 | -endif() |
256 | +endif () |
257 | |
258 | === modified file 'launcher/Launcher.cpp' |
259 | --- launcher/Launcher.cpp 2012-10-18 00:27:52 +0000 |
260 | +++ launcher/Launcher.cpp 2012-10-24 08:23:34 +0000 |
261 | @@ -106,7 +106,7 @@ |
262 | nux::ObjectPtr<DNDCollectionWindow> const& collection_window, |
263 | NUX_FILE_LINE_DECL) |
264 | : View(NUX_FILE_LINE_PARAM) |
265 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
266 | +#ifdef USE_X11 |
267 | , display(nux::GetGraphicsDisplay()->GetX11Display()) |
268 | #else |
269 | , display(0) |
270 | @@ -191,7 +191,7 @@ |
271 | wm.terminate_expo.connect(sigc::mem_fun(this, &Launcher::OnPluginStateChanged)); |
272 | wm.screen_viewport_switch_ended.connect(sigc::mem_fun(this, &Launcher::EnsureAnimation)); |
273 | |
274 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
275 | +#ifdef USE_X11 |
276 | display.changed.connect(sigc::mem_fun(this, &Launcher::OnDisplayChanged)); |
277 | #endif |
278 | |
279 | @@ -235,8 +235,8 @@ |
280 | _collection_window->display = display; |
281 | } |
282 | |
283 | -void |
284 | -Launcher::OnDragStart(const nux::GestureEvent &event) |
285 | +#ifdef NUX_GESTURES_SUPPORT |
286 | +void Launcher::OnDragStart(const nux::GestureEvent &event) |
287 | { |
288 | _drag_gesture_ongoing = true; |
289 | if (_hidden) |
290 | @@ -250,16 +250,14 @@ |
291 | } |
292 | } |
293 | |
294 | -void |
295 | -Launcher::OnDragUpdate(const nux::GestureEvent &event) |
296 | +void Launcher::OnDragUpdate(const nux::GestureEvent &event) |
297 | { |
298 | _drag_out_delta_x = |
299 | CLAMP(_drag_out_delta_x + event.GetDelta().x, 0.0f, DRAG_OUT_PIXELS); |
300 | EnsureAnimation(); |
301 | } |
302 | |
303 | -void |
304 | -Launcher::OnDragFinish(const nux::GestureEvent &event) |
305 | +void Launcher::OnDragFinish(const nux::GestureEvent &event) |
306 | { |
307 | if (_drag_out_delta_x >= DRAG_OUT_PIXELS - 90.0f) |
308 | _hide_machine.SetQuirk(LauncherHideMachine::MT_DRAG_OUT, true); |
309 | @@ -269,6 +267,7 @@ |
310 | EnsureAnimation(); |
311 | _drag_gesture_ongoing = false; |
312 | } |
313 | +#endif |
314 | |
315 | void Launcher::AddProperties(GVariantBuilder* builder) |
316 | { |
317 | @@ -1357,7 +1356,7 @@ |
318 | |
319 | bool Launcher::OnUpdateDragManagerTimeout() |
320 | { |
321 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
322 | +#ifdef USE_X11 |
323 | if (display() == 0) |
324 | return false; |
325 | |
326 | @@ -1399,7 +1398,7 @@ |
327 | |
328 | void Launcher::DndTimeoutSetup() |
329 | { |
330 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
331 | +#ifdef USE_X11 |
332 | if (sources_.GetSource(DND_CHECK_TIMEOUT)) |
333 | return; |
334 | |
335 | @@ -2231,7 +2230,7 @@ |
336 | |
337 | if (GetActionState() == ACTION_NONE) |
338 | { |
339 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
340 | +#ifdef USE_X11 |
341 | if (nux::Abs(_dnd_delta_y) >= nux::Abs(_dnd_delta_x)) |
342 | { |
343 | _launcher_drag_delta += _dnd_delta_y; |
344 | @@ -2306,7 +2305,7 @@ |
345 | EnsureAnimation(); |
346 | } |
347 | |
348 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
349 | +#ifdef USE_X11 |
350 | |
351 | bool Launcher::HandleBarrierEvent(ui::PointerBarrierWrapper* owner, ui::BarrierEvent::Ptr event) |
352 | { |
353 | @@ -2523,6 +2522,7 @@ |
354 | RestoreSystemRenderTarget(); |
355 | } |
356 | |
357 | +#ifdef NUX_GESTURES_SUPPORT |
358 | nux::GestureDeliveryRequest Launcher::GestureEvent(const nux::GestureEvent &event) |
359 | { |
360 | switch(event.type) |
361 | @@ -2540,6 +2540,7 @@ |
362 | |
363 | return nux::GestureDeliveryRequest::NONE; |
364 | } |
365 | +#endif |
366 | |
367 | void |
368 | Launcher::SetOffscreenRenderTarget(nux::ObjectPtr<nux::IOpenGLBaseTexture> texture) |
369 | @@ -2572,7 +2573,7 @@ |
370 | |
371 | void Launcher::OnDNDDataCollected(const std::list<char*>& mimes) |
372 | { |
373 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
374 | +#ifdef USE_X11 |
375 | _dnd_data.Reset(); |
376 | |
377 | const std::string uri_list = "text/uri-list"; |
378 | @@ -2619,7 +2620,7 @@ |
379 | |
380 | void Launcher::ProcessDndEnter() |
381 | { |
382 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
383 | +#ifdef USE_X11 |
384 | SetStateMouseOverLauncher(true); |
385 | |
386 | _dnd_data.Reset(); |
387 | @@ -2633,7 +2634,7 @@ |
388 | |
389 | void Launcher::DndReset() |
390 | { |
391 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
392 | +#ifdef USE_X11 |
393 | _dnd_data.Reset(); |
394 | |
395 | bool is_overlay_open = IsOverlayOpen(); |
396 | @@ -2661,7 +2662,7 @@ |
397 | |
398 | void Launcher::DndHoveredIconReset() |
399 | { |
400 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
401 | +#ifdef USE_X11 |
402 | _drag_edge_touching = false; |
403 | SetActionState(ACTION_NONE); |
404 | |
405 | @@ -2681,7 +2682,7 @@ |
406 | |
407 | void Launcher::ProcessDndLeave() |
408 | { |
409 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
410 | +#ifdef USE_X11 |
411 | SetStateMouseOverLauncher(false); |
412 | |
413 | DndHoveredIconReset(); |
414 | @@ -2690,7 +2691,7 @@ |
415 | |
416 | void Launcher::ProcessDndMove(int x, int y, std::list<char*> mimes) |
417 | { |
418 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
419 | +#ifdef USE_X11 |
420 | if (!_data_checked) |
421 | { |
422 | const std::string uri_list = "text/uri-list"; |
423 | @@ -2822,7 +2823,7 @@ |
424 | |
425 | void Launcher::ProcessDndDrop(int x, int y) |
426 | { |
427 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
428 | +#ifdef USE_X11 |
429 | if (_steal_drag) |
430 | { |
431 | for (auto const& uri : _dnd_data.Uris()) |
432 | |
433 | === modified file 'launcher/Launcher.h' |
434 | --- launcher/Launcher.h 2012-10-17 22:21:51 +0000 |
435 | +++ launcher/Launcher.h 2012-10-24 08:23:34 +0000 |
436 | @@ -43,7 +43,7 @@ |
437 | #include "unity-shared/UBusWrapper.h" |
438 | #include "SoftwareCenterLauncherIcon.h" |
439 | |
440 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
441 | +#ifdef USE_X11 |
442 | # include "PointerBarrier.h" |
443 | # include "EdgeBarrierController.h" |
444 | #endif |
445 | @@ -57,7 +57,7 @@ |
446 | class AbstractLauncherIcon; |
447 | |
448 | class Launcher : public unity::debug::Introspectable, |
449 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
450 | +#ifdef USE_X11 |
451 | // TODO: abstract this into a more generic class. |
452 | public ui::EdgeBarrierSubscriber, |
453 | #endif |
454 | @@ -148,7 +148,10 @@ |
455 | |
456 | void RenderIconToTexture(nux::GraphicsEngine& GfxContext, AbstractLauncherIcon::Ptr const& icon, nux::ObjectPtr<nux::IOpenGLBaseTexture> texture); |
457 | |
458 | +#ifdef NUX_GESTURES_SUPPORT |
459 | virtual nux::GestureDeliveryRequest GestureEvent(const nux::GestureEvent &event); |
460 | +#endif |
461 | + |
462 | protected: |
463 | // Introspectable methods |
464 | std::string GetName() const; |
465 | @@ -193,11 +196,13 @@ |
466 | void OnOptionChanged(); |
467 | void UpdateOptions(Options::Ptr options); |
468 | |
469 | +#ifdef NUX_GESTURES_SUPPORT |
470 | void OnDragStart(const nux::GestureEvent &event); |
471 | void OnDragUpdate(const nux::GestureEvent &event); |
472 | void OnDragFinish(const nux::GestureEvent &event); |
473 | +#endif |
474 | |
475 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
476 | +#ifdef USE_X11 |
477 | bool HandleBarrierEvent(ui::PointerBarrierWrapper* owner, ui::BarrierEvent::Ptr event); |
478 | #endif |
479 | |
480 | |
481 | === modified file 'launcher/LauncherController.cpp' |
482 | --- launcher/LauncherController.cpp 2012-10-17 22:21:51 +0000 |
483 | +++ launcher/LauncherController.cpp 2012-10-24 08:23:34 +0000 |
484 | @@ -115,7 +115,7 @@ |
485 | , gdbus_connection_(nullptr) |
486 | , reg_id_(0) |
487 | { |
488 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
489 | +#ifdef USE_X11 |
490 | edge_barriers_.options = parent_->options(); |
491 | #endif |
492 | |
493 | @@ -201,7 +201,7 @@ |
494 | |
495 | int monitor = (num_launchers == 1) ? primary : i; |
496 | |
497 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
498 | +#ifdef USE_X11 |
499 | if (launchers[i]->monitor() != monitor) |
500 | { |
501 | edge_barriers_.Unsubscribe(launchers[i].GetPointer(), launchers[i]->monitor); |
502 | @@ -210,7 +210,7 @@ |
503 | |
504 | launchers[i]->monitor(monitor); |
505 | launchers[i]->Resize(); |
506 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
507 | +#ifdef USE_X11 |
508 | edge_barriers_.Subscribe(launchers[i].GetPointer(), launchers[i]->monitor); |
509 | #endif |
510 | } |
511 | @@ -222,7 +222,7 @@ |
512 | { |
513 | parent_->RemoveChild(launcher.GetPointer()); |
514 | launcher->GetParent()->UnReference(); |
515 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
516 | +#ifdef USE_X11 |
517 | edge_barriers_.Unsubscribe(launcher.GetPointer(), launcher->monitor); |
518 | #endif |
519 | } |
520 | |
521 | === modified file 'launcher/LauncherControllerPrivate.h' |
522 | --- launcher/LauncherControllerPrivate.h 2012-10-17 22:21:51 +0000 |
523 | +++ launcher/LauncherControllerPrivate.h 2012-10-24 08:23:34 +0000 |
524 | @@ -28,7 +28,7 @@ |
525 | #include "AbstractLauncherIcon.h" |
526 | #include "DeviceLauncherSection.h" |
527 | #include "DevicesSettingsImp.h" |
528 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
529 | +#ifdef USE_X11 |
530 | #include "EdgeBarrierController.h" |
531 | #endif |
532 | #include "LauncherController.h" |
533 | @@ -129,7 +129,7 @@ |
534 | AbstractLauncherIcon::Ptr expo_icon_; |
535 | AbstractLauncherIcon::Ptr desktop_icon_; |
536 | |
537 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
538 | +#ifdef USE_X11 |
539 | ui::EdgeBarrierController edge_barriers_; |
540 | #endif |
541 | |
542 | |
543 | === modified file 'launcher/LauncherOptions.h' |
544 | --- launcher/LauncherOptions.h 2012-08-07 10:53:16 +0000 |
545 | +++ launcher/LauncherOptions.h 2012-10-24 08:23:34 +0000 |
546 | @@ -24,7 +24,6 @@ |
547 | #include <memory> |
548 | #include <vector> |
549 | #include <sigc++/sigc++.h> |
550 | -#include <core/core.h> |
551 | |
552 | #include <Nux/Nux.h> |
553 | |
554 | |
555 | === modified file 'launcher/TrashLauncherIcon.cpp' |
556 | --- launcher/TrashLauncherIcon.cpp 2012-10-17 22:26:46 +0000 |
557 | +++ launcher/TrashLauncherIcon.cpp 2012-10-24 08:23:34 +0000 |
558 | @@ -139,7 +139,7 @@ |
559 | |
560 | nux::DndAction TrashLauncherIcon::OnQueryAcceptDrop(DndData const& dnd_data) |
561 | { |
562 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
563 | +#ifdef USE_X11 |
564 | return nux::DNDACTION_MOVE; |
565 | #else |
566 | return nux::DNDACTION_NONE; |
567 | |
568 | === modified file 'tests/CMakeLists.txt' |
569 | --- tests/CMakeLists.txt 2012-10-22 09:31:20 +0000 |
570 | +++ tests/CMakeLists.txt 2012-10-24 08:23:34 +0000 |
571 | @@ -112,51 +112,57 @@ |
572 | |
573 | |
574 | # The actual test executable (xless) - do not put anything that requires X in here |
575 | - add_executable(test-gtest-xless |
576 | - test_main_xless.cpp |
577 | - test_animator.cpp |
578 | - test_launcher_model.cpp |
579 | - test_glib_object.cpp |
580 | - test_glib_object_utils.cpp |
581 | - test_glib_object_utils.h |
582 | - test_glib_signals.cpp |
583 | - test_glib_signals_utils.cpp |
584 | - test_glib_signals_utils.h |
585 | - test_glib_source.cpp |
586 | - test_glib_variant.cpp |
587 | - test_grabhandle.cpp |
588 | - test_desktop_utilities.cpp |
589 | - test_hud_private.cpp |
590 | - test_indicator.cpp |
591 | - test_indicator_appmenu.cpp |
592 | - test_indicator_entry.cpp |
593 | - test_indicators.cpp |
594 | - test_introspection.cpp |
595 | - test_favorite_store.cpp |
596 | - test_favorite_store_gsettings.cpp |
597 | - test_favorite_store_private.cpp |
598 | - test_home_lens.cpp |
599 | - test_launcher_entry_remote.cpp |
600 | - test_model_iterator.cpp |
601 | - test_pointer_barrier.cpp |
602 | - test_previews.cpp |
603 | - test_shortcut_model.cpp |
604 | - test_shortcut_private.cpp |
605 | - test_showdesktop_handler.cpp |
606 | - test_ubus.cpp |
607 | - test_unityshell_private.cpp |
608 | - ${CMAKE_CURRENT_BINARY_DIR}/test_glib_signals_utils_marshal.cpp |
609 | - ${UNITY_SRC}/DebugDBusInterface.cpp |
610 | - ${UNITY_SRC}/XPathQueryPart.cpp |
611 | - ${UNITY_SRC}/UnityshellPrivate.cpp |
612 | - ${UNITY_SRC}/UnityShowdesktopHandler.cpp |
613 | - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle.cpp |
614 | - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-group.cpp |
615 | - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-impl-factory.cpp |
616 | - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp |
617 | - ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-texture.cpp |
618 | - ) |
619 | - target_link_libraries(test-gtest-xless gtest unity-shared ${GMOCK_LIB} ${GMOCK_MAIN_LIB} ${LIBS} launcher-lib shortcuts-lib hud-lib) |
620 | + set (GTEST_XLESS_SOURCES |
621 | + test_main_xless.cpp |
622 | + test_animator.cpp |
623 | + test_launcher_model.cpp |
624 | + test_glib_object.cpp |
625 | + test_glib_object_utils.cpp |
626 | + test_glib_object_utils.h |
627 | + test_glib_signals.cpp |
628 | + test_glib_signals_utils.cpp |
629 | + test_glib_signals_utils.h |
630 | + test_glib_source.cpp |
631 | + test_glib_variant.cpp |
632 | + test_grabhandle.cpp |
633 | + test_desktop_utilities.cpp |
634 | + test_indicator.cpp |
635 | + test_indicator_appmenu.cpp |
636 | + test_indicator_entry.cpp |
637 | + test_indicators.cpp |
638 | + test_introspection.cpp |
639 | + test_favorite_store.cpp |
640 | + test_favorite_store_gsettings.cpp |
641 | + test_favorite_store_private.cpp |
642 | + test_home_lens.cpp |
643 | + test_launcher_entry_remote.cpp |
644 | + test_model_iterator.cpp |
645 | + test_previews.cpp |
646 | + test_ubus.cpp |
647 | + test_unityshell_private.cpp |
648 | + ${CMAKE_CURRENT_BINARY_DIR}/test_glib_signals_utils_marshal.cpp |
649 | + ${UNITY_SRC}/UnityshellPrivate.cpp |
650 | + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle.cpp |
651 | + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-group.cpp |
652 | + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-impl-factory.cpp |
653 | + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp |
654 | + ${CMAKE_SOURCE_DIR}/plugins/unity-mt-grab-handles/src/unity-mt-texture.cpp |
655 | +) |
656 | + |
657 | +if (ENABLE_X_SUPPORT) |
658 | + set (GTEST_XLESS_SOURCES |
659 | + test_hud_private.cpp |
660 | + test_pointer_barrier.cpp |
661 | + test_shortcut_model.cpp |
662 | + test_shortcut_private.cpp |
663 | + ${LAUNCHER_SOURCES} |
664 | + ) |
665 | +endif () |
666 | + |
667 | + add_executable(test-gtest-xless ${GTEST_XLESS_SOURCES}) |
668 | + |
669 | + |
670 | + target_link_libraries(test-gtest-xless gtest unity-shared ${GMOCK_LIB} ${GMOCK_MAIN_LIB} ${LIBS} launcher-lib) |
671 | add_test(UnityGTestXless test-gtest-xless) |
672 | add_dependencies(test-gtest-xless unity-core-${UNITY_API_VERSION} gtest) |
673 | |
674 | @@ -179,6 +185,7 @@ |
675 | add_test(UnityGTestDBus test-gtest-dbus) |
676 | add_dependencies(test-gtest-dbus unity-core-${UNITY_API_VERSION} test-gtest-service gtest) |
677 | |
678 | +if (ENABLE_X_SUPPORT) |
679 | # Tests that require X |
680 | add_executable(test-gtest |
681 | test_main.cpp |
682 | @@ -213,6 +220,7 @@ |
683 | test_shortcut_controller.cpp |
684 | test_single_monitor_launcher_icon.cpp |
685 | test_expo_launcher_icon.cpp |
686 | + test_showdesktop_handler.cpp |
687 | test_switcher_controller.cpp |
688 | test_switcher_model.cpp |
689 | test_texture_cache.cpp |
690 | @@ -225,17 +233,20 @@ |
691 | bamf-mock-application.c |
692 | gmockmount.c |
693 | gmockvolume.c |
694 | + ${UNITY_SRC}/UnityShowdesktopHandler.cpp |
695 | ${CMAKE_SOURCE_DIR}/plugins/unityshell/src/WindowMinimizeSpeedController.cpp |
696 | ) |
697 | target_link_libraries(test-gtest gtest gmock unity-shared ${LIBS} launcher-lib unity-shared-standalone shortcuts-lib previews-lib hud-lib switcher-lib dash-lib panel-lib) |
698 | add_test(UnityGTest test-gtest) |
699 | add_dependencies(test-gtest unity-core-${UNITY_API_VERSION} gtest gmock) |
700 | - |
701 | +endif (ENABLE_X_SUPPORT) |
702 | endif (GTEST_SRC_DIR AND |
703 | GMOCK_LIB AND |
704 | GMOCK_MAIN_LIB) |
705 | |
706 | -add_subdirectory (test-gestures) |
707 | +if(ENABLE_X_SUPPORT) |
708 | + add_subdirectory (test-gestures) |
709 | +endif() |
710 | |
711 | # |
712 | # check target |
713 | @@ -243,10 +254,12 @@ |
714 | set (TEST_RESULT_DIR ${CMAKE_BINARY_DIR}/tests) |
715 | set (TEST_RESULT_XML ${TEST_RESULT_DIR}/test-results.xml) |
716 | set (TEST_RESULT_HTML ${TEST_RESULT_DIR}/test-results.html) |
717 | -set (GTEST_TEST_COMMAND ./test-gtest) |
718 | +if (ENABLE_X_SUPPORT) |
719 | + set (GTEST_TEST_COMMAND ./test-gtest) |
720 | + set (GTEST_TEST_COMMAND_GESTURES ./test-gestures/test-gestures) |
721 | +endif (ENABLE_X_SUPPORT) |
722 | set (GTEST_TEST_COMMAND_XLESS ./test-gtest-xless) |
723 | set (GTEST_TEST_COMMAND_DBUS dbus-test-runner --task ./test-gtest-service --task ./test-gtest-dbus) |
724 | -set (GTEST_TEST_COMMAND_GESTURES ./test-gestures/test-gestures) |
725 | |
726 | set (TEST_COMMAND |
727 | gtester --verbose -k --g-fatal-warnings -o=${TEST_RESULT_XML} ./test-unit |
728 | @@ -263,10 +276,16 @@ |
729 | && echo "Warning, DBus test cases are disabled!!") |
730 | |
731 | if (GTEST_SRC_DIR) |
732 | - add_custom_target (check COMMAND ${TEST_COMMAND} DEPENDS test-unit test-gtest test-gtest-xless test-gtest-dbus test-gestures) |
733 | - add_custom_target (check-headless COMMAND ${TEST_COMMAND_HEADLESS} DEPENDS test-gtest-xless test-gtest-dbus test-gestures) |
734 | + if (ENABLE_X_SUPPORT) |
735 | + add_custom_target (check COMMAND ${TEST_COMMAND} DEPENDS test-unit test-gtest test-gtest-xless test-gtest-dbus test-gestures) |
736 | + add_custom_target (check-headless COMMAND ${TEST_COMMAND_HEADLESS} DEPENDS test-gtest-xless test-gtest-dbus test-gestures) |
737 | + add_custom_target (gcheck COMMAND ${DBUS_TEST_COMMAND} DEPENDS test-gtest test-gtest-xless) |
738 | + else () |
739 | + add_custom_target (check COMMAND ${TEST_COMMAND} DEPENDS test-unit test-gtest-xless test-gtest-dbus) |
740 | + add_custom_target (check-headless COMMAND ${TEST_COMMAND_HEADLESS} DEPENDS test-gtest-xless test-gtest-dbus) |
741 | + add_custom_target (gcheck COMMAND ${DBUS_TEST_COMMAND} DEPENDS test-gtest-xless) |
742 | + endif () |
743 | add_custom_target (check-report COMMAND ${TEST_UNIT_COMMAND} && gtester-report ${TEST_RESULT_XML} > ${TEST_RESULT_HTML}) |
744 | - add_custom_target (gcheck COMMAND ${DBUS_TEST_COMMAND} DEPENDS test-gtest test-gtest-xless) |
745 | else (GTEST_SRC_DIR) |
746 | add_custom_target (check COMMAND ${TEST_COMMAND} DEPENDS test-unit) |
747 | endif (GTEST_SRC_DIR) |
748 | |
749 | === modified file 'tests/test_launcher_controller.cpp' |
750 | --- tests/test_launcher_controller.cpp 2012-10-17 22:21:51 +0000 |
751 | +++ tests/test_launcher_controller.cpp 2012-10-24 08:23:34 +0000 |
752 | @@ -380,7 +380,7 @@ |
753 | EXPECT_EQ(lc.launchers().size(), max_num_monitors); |
754 | } |
755 | |
756 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
757 | +#ifdef USE_X11 |
758 | |
759 | TEST_F(TestLauncherController, MultiMonitorEdgeBarrierSubscriptions) |
760 | { |
761 | |
762 | === added file 'unity-shared/ApplicationManager.cpp' |
763 | --- unity-shared/ApplicationManager.cpp 1970-01-01 00:00:00 +0000 |
764 | +++ unity-shared/ApplicationManager.cpp 2012-10-24 08:23:34 +0000 |
765 | @@ -0,0 +1,34 @@ |
766 | +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- |
767 | +/* |
768 | + * Copyright (C) 2012 Canonical Ltd |
769 | + * |
770 | + * This program is free software: you can redistribute it and/or modify |
771 | + * it under the terms of the GNU General Public License version 3 as |
772 | + * published by the Free Software Foundation. |
773 | + * |
774 | + * This program is distributed in the hope that it will be useful, |
775 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
776 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
777 | + * GNU General Public License for more details. |
778 | + * |
779 | + * You should have received a copy of the GNU General Public License |
780 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
781 | + * |
782 | + * Authored by: Tim Penhey <tim.penhey@canonical.com> |
783 | + */ |
784 | + |
785 | +#include "unity-shared/ApplicationManager.h" |
786 | + |
787 | +namespace unity |
788 | +{ |
789 | +// This function is used by the static Default method on the ApplicationManager |
790 | +// class, and uses link time to make sure there is a function available. |
791 | +ApplicationManagerPtr create_application_manager(); |
792 | + |
793 | +ApplicationManager& ApplicationManager::Default() |
794 | +{ |
795 | + static ApplicationManagerPtr instance(create_application_manager()); |
796 | + return *instance; |
797 | +} |
798 | + |
799 | +} // namespace unity |
800 | |
801 | === added file 'unity-shared/ApplicationManager.h' |
802 | --- unity-shared/ApplicationManager.h 1970-01-01 00:00:00 +0000 |
803 | +++ unity-shared/ApplicationManager.h 2012-10-24 08:23:34 +0000 |
804 | @@ -0,0 +1,55 @@ |
805 | +// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- |
806 | +/* |
807 | + * Copyright (C) 2012 Canonical Ltd |
808 | + * |
809 | + * This program is free software: you can redistribute it and/or modify |
810 | + * it under the terms of the GNU General Public License version 3 as |
811 | + * published by the Free Software Foundation. |
812 | + * |
813 | + * This program is distributed in the hope that it will be useful, |
814 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
815 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
816 | + * GNU General Public License for more details. |
817 | + * |
818 | + * You should have received a copy of the GNU General Public License |
819 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
820 | + * |
821 | + * Authored by: Tim Penhey <tim.penhey@canonical.com> |
822 | + */ |
823 | + |
824 | +#ifndef UNITYSHARED_APPLICATION_MANAGER_H |
825 | +#define UNITYSHARED_APPLICATION_MANAGER_H |
826 | + |
827 | +#include <memory> |
828 | + |
829 | +namespace unity |
830 | +{ |
831 | + |
832 | +class Application; |
833 | +class ApplicationManager; |
834 | +typedef std::shared_ptr<Application> ApplicationPtr; |
835 | +typedef std::shared_ptr<ApplicationManager> ApplicationManagerPtr; |
836 | + |
837 | +class Application |
838 | +{ |
839 | +public: |
840 | + virtual ~Application() {} |
841 | + |
842 | + virtual std::string icon() const = 0; |
843 | + virtual std::string title() const = 0; |
844 | + |
845 | +}; |
846 | + |
847 | +class ApplicationManager |
848 | +{ |
849 | +public: |
850 | + virtual ~ApplicationManager() {} |
851 | + |
852 | + static ApplicationManager& Default(); |
853 | + |
854 | + virtual ApplicationPtr active_application() const = 0; |
855 | +}; |
856 | + |
857 | +} |
858 | + |
859 | +#endif // UNITYSHARED_APPLICATION_MANAGER_H |
860 | |
861 | === modified file 'unity-shared/CMakeLists.txt' |
862 | --- unity-shared/CMakeLists.txt 2012-10-18 10:44:07 +0000 |
863 | +++ unity-shared/CMakeLists.txt 2012-10-24 08:23:34 +0000 |
864 | @@ -32,6 +32,7 @@ |
865 | CoverArt.cpp |
866 | BackgroundEffectHelper.cpp |
867 | DashStyle.cpp |
868 | + DebugDBusInterface.cpp |
869 | DefaultThumbnailProvider.cpp |
870 | FontSettings.cpp |
871 | IMTextEntry.cpp |
872 | @@ -64,9 +65,10 @@ |
873 | UnityWindowView.cpp |
874 | UserThumbnailProvider.cpp |
875 | WindowManager.cpp |
876 | + XPathQueryPart.cpp |
877 | ) |
878 | |
879 | -if(UNITY_ENABLE_X_ORG_SUPPORT) |
880 | +if(ENABLE_X_SUPPORT) |
881 | set (UNITY_SHARED_SOURCES |
882 | XKeyboardUtil.cpp |
883 | XWindowManager.cpp |
884 | @@ -87,7 +89,7 @@ |
885 | # We also need to build compiz specific parts and standalone variants of those parts |
886 | # |
887 | |
888 | -if(UNITY_ENABLE_X_ORG_SUPPORT) |
889 | +if (ENABLE_X_SUPPORT) |
890 | # compiz |
891 | set (UNITY_SHARED_COMPIZ_SOURCES |
892 | PluginAdapter.cpp |
893 | |
894 | === renamed file 'plugins/unityshell/src/DebugDBusInterface.cpp' => 'unity-shared/DebugDBusInterface.cpp' |
895 | --- plugins/unityshell/src/DebugDBusInterface.cpp 2012-06-29 04:17:55 +0000 |
896 | +++ unity-shared/DebugDBusInterface.cpp 2012-10-24 08:23:34 +0000 |
897 | @@ -24,7 +24,6 @@ |
898 | #include <boost/algorithm/string/split.hpp> |
899 | #include <boost/algorithm/string/classification.hpp> |
900 | #include <boost/bind.hpp> |
901 | -#include <core/core.h> |
902 | #include <NuxCore/Logger.h> |
903 | #include <NuxCore/LoggingWriter.h> |
904 | |
905 | @@ -303,7 +302,7 @@ |
906 | query_strings.end(), |
907 | boost::bind( &std::string::empty, _1 ) ), |
908 | query_strings.end()); |
909 | - foreach(std::string part, query_strings) |
910 | + for (auto part : query_strings) |
911 | { |
912 | query_parts.push_back(XPathQueryPart(part)); |
913 | } |
914 | @@ -343,7 +342,7 @@ |
915 | start_points.push_back(node); |
916 | } |
917 | // Add all children of current node to queue. |
918 | - foreach(Introspectable* child, node->GetIntrospectableChildren()) |
919 | + for (Introspectable* child : node->GetIntrospectableChildren()) |
920 | { |
921 | queue.push(child); |
922 | } |
923 | @@ -355,7 +354,7 @@ |
924 | typedef std::pair<Introspectable*, std::list<XPathQueryPart>::iterator> node_match_pair; |
925 | |
926 | std::queue<node_match_pair> traverse_queue; |
927 | - foreach(Introspectable *node, start_points) |
928 | + for (Introspectable *node : start_points) |
929 | { |
930 | traverse_queue.push(node_match_pair(node, query_parts.begin())); |
931 | } |
932 | @@ -377,7 +376,7 @@ |
933 | else |
934 | { |
935 | // push all children of current node to start of queue, advance search iterator, and loop again. |
936 | - foreach (Introspectable *child, node->GetIntrospectableChildren()) |
937 | + for (Introspectable* child : node->GetIntrospectableChildren()) |
938 | { |
939 | if (query_it->Matches(child)) |
940 | { |
941 | |
942 | === renamed file 'plugins/unityshell/src/DebugDBusInterface.h' => 'unity-shared/DebugDBusInterface.h' |
943 | === modified file 'unity-shared/KeyboardUtil.h' |
944 | --- unity-shared/KeyboardUtil.h 2012-10-04 07:42:43 +0000 |
945 | +++ unity-shared/KeyboardUtil.h 2012-10-24 08:23:34 +0000 |
946 | @@ -32,4 +32,3 @@ |
947 | } |
948 | |
949 | #endif // UNITYSHARED_KEYBOARDUTIL_H |
950 | - |
951 | |
952 | === modified file 'unity-shared/ResizingBaseWindow.h' |
953 | --- unity-shared/ResizingBaseWindow.h 2012-10-18 00:27:52 +0000 |
954 | +++ unity-shared/ResizingBaseWindow.h 2012-10-24 08:23:34 +0000 |
955 | @@ -35,7 +35,7 @@ |
956 | |
957 | void UpdateInputWindowGeometry() |
958 | { |
959 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
960 | +#ifdef USE_X11 |
961 | if (m_input_window && m_input_window_enabled) |
962 | m_input_window->SetGeometry(geo_func_(GetGeometry())); |
963 | #endif |
964 | |
965 | === modified file 'unity-shared/UnityWindowView.cpp' |
966 | --- unity-shared/UnityWindowView.cpp 2012-10-11 01:44:15 +0000 |
967 | +++ unity-shared/UnityWindowView.cpp 2012-10-24 08:23:34 +0000 |
968 | @@ -136,7 +136,7 @@ |
969 | gPainter.PaintShapeCornerROP(GfxContext, |
970 | internal_clip, |
971 | nux::color::White, |
972 | - nux::eSHAPE_CORNER_ROUND5, |
973 | + nux::eSHAPE_CORNER_ROUND4, |
974 | nux::eCornerTopLeft | nux::eCornerTopRight | |
975 | nux::eCornerBottomLeft | nux::eCornerBottomRight, |
976 | true, |
977 | |
978 | === modified file 'unity-shared/WindowManager.h' |
979 | --- unity-shared/WindowManager.h 2012-10-04 23:10:23 +0000 |
980 | +++ unity-shared/WindowManager.h 2012-10-24 08:23:34 +0000 |
981 | @@ -28,7 +28,7 @@ |
982 | #include <NuxCore/Rect.h> |
983 | #include <Nux/Utils.h> |
984 | |
985 | -#ifdef UNITY_HAS_X_ORG_SUPPORT |
986 | +#ifdef USE_X11 |
987 | #include <X11/Xlib.h> |
988 | #else |
989 | typedef unsigned long Window; |
990 | |
991 | === renamed file 'plugins/unityshell/src/XPathQueryPart.cpp' => 'unity-shared/XPathQueryPart.cpp' |
992 | === renamed file 'plugins/unityshell/src/XPathQueryPart.h' => 'unity-shared/XPathQueryPart.h' |