Mir

Merge lp:~brandontschaefer/mir/add-support-crosshair-cursor into lp:mir

Proposed by Brandon Schaefer
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 2788
Proposed branch: lp:~brandontschaefer/mir/add-support-crosshair-cursor
Merge into: lp:mir
Diff against target: 69 lines (+14/-1)
5 files modified
examples/cursors_demo_client.c (+2/-1)
include/client/mir_toolkit/cursors.h (+6/-0)
src/client/mir_cursor_api.cpp (+1/-0)
src/client/symbols.map (+1/-0)
src/server/input/xcursor_loader.cpp (+4/-0)
To merge this branch: bzr merge lp:~brandontschaefer/mir/add-support-crosshair-cursor
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Cemil Azizoglu (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+266040@code.launchpad.net

Commit message

Adds support for the system cursor XC_crosshair.

Description of the change

Adds support for the system cursor XC_crosshair.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

ok

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

(1) src/client/symbols.map: New symbols need to go in the bottom (9.1) stanza.

Otherwise, good.

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

In here, I mean:

MIR_CLIENT_9.1 { # New functions in Mir 0.15

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Opps didnt finish reading that file! Pushed

Revision history for this message
Daniel van Vugt (vanvugt) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'examples/cursors_demo_client.c'
--- examples/cursors_demo_client.c 2014-07-07 23:50:43 +0000
+++ examples/cursors_demo_client.c 2015-07-28 02:45:17 +0000
@@ -38,7 +38,8 @@
38 mir_diagonal_resize_top_to_bottom_cursor_name,38 mir_diagonal_resize_top_to_bottom_cursor_name,
39 mir_omnidirectional_resize_cursor_name,39 mir_omnidirectional_resize_cursor_name,
40 mir_vsplit_resize_cursor_name,40 mir_vsplit_resize_cursor_name,
41 mir_hsplit_resize_cursor_name41 mir_hsplit_resize_cursor_name,
42 mir_crosshair_cursor_name
42 };43 };
4344
44 size_t num_cursors = sizeof(cursors)/sizeof(*cursors);45 size_t num_cursors = sizeof(cursors)/sizeof(*cursors);
4546
=== modified file 'include/client/mir_toolkit/cursors.h'
--- include/client/mir_toolkit/cursors.h 2015-04-28 07:54:10 +0000
+++ include/client/mir_toolkit/cursors.h 2015-07-28 02:45:17 +0000
@@ -113,6 +113,12 @@
113 */113 */
114extern char const* const mir_hsplit_resize_cursor_name;114extern char const* const mir_hsplit_resize_cursor_name;
115115
116/**
117 * The cursor used for crosshair, which may be used for picking colors or
118 * finer precision.
119 */
120extern char const* const mir_crosshair_cursor_name;
121
116#ifdef __cplusplus122#ifdef __cplusplus
117}123}
118#endif124#endif
119125
=== modified file 'src/client/mir_cursor_api.cpp'
--- src/client/mir_cursor_api.cpp 2015-06-17 05:20:42 +0000
+++ src/client/mir_cursor_api.cpp 2015-07-28 02:45:17 +0000
@@ -42,6 +42,7 @@
42extern "C" char const* const mir_omnidirectional_resize_cursor_name = "omnidirectional-resize";42extern "C" char const* const mir_omnidirectional_resize_cursor_name = "omnidirectional-resize";
43extern "C" char const* const mir_vsplit_resize_cursor_name = "vsplit-resize";43extern "C" char const* const mir_vsplit_resize_cursor_name = "vsplit-resize";
44extern "C" char const* const mir_hsplit_resize_cursor_name = "hsplit-resize";44extern "C" char const* const mir_hsplit_resize_cursor_name = "hsplit-resize";
45extern "C" char const* const mir_crosshair_cursor_name = "crosshair";
4546
46MirCursorConfiguration::MirCursorConfiguration(char const* name) :47MirCursorConfiguration::MirCursorConfiguration(char const* name) :
47 name{name ? name : std::string()},48 name{name ? name : std::string()},
4849
=== modified file 'src/client/symbols.map'
--- src/client/symbols.map 2015-07-25 08:10:48 +0000
+++ src/client/symbols.map 2015-07-28 02:45:17 +0000
@@ -164,6 +164,7 @@
164 global:164 global:
165 mir_connection_pong;165 mir_connection_pong;
166 mir_connection_set_ping_event_callback;166 mir_connection_set_ping_event_callback;
167 mir_crosshair_cursor_name;
167 mir_keyboard_event_input_event;168 mir_keyboard_event_input_event;
168 mir_persistent_id_as_string;169 mir_persistent_id_as_string;
169 mir_persistent_id_from_string;170 mir_persistent_id_from_string;
170171
=== modified file 'src/server/input/xcursor_loader.cpp'
--- src/server/input/xcursor_loader.cpp 2015-06-25 19:29:44 +0000
+++ src/server/input/xcursor_loader.cpp 2015-07-28 02:45:17 +0000
@@ -137,6 +137,10 @@
137 {137 {
138 return "h_double_arrow";138 return "h_double_arrow";
139 }139 }
140 else if (mir_cursor_name == mir_crosshair_cursor_name)
141 {
142 return "crosshair";
143 }
140 else144 else
141 {145 {
142 return mir_cursor_name;146 return mir_cursor_name;

Subscribers

People subscribed via source and target branches