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
1=== modified file 'examples/cursors_demo_client.c'
2--- examples/cursors_demo_client.c 2014-07-07 23:50:43 +0000
3+++ examples/cursors_demo_client.c 2015-07-28 02:45:17 +0000
4@@ -38,7 +38,8 @@
5 mir_diagonal_resize_top_to_bottom_cursor_name,
6 mir_omnidirectional_resize_cursor_name,
7 mir_vsplit_resize_cursor_name,
8- mir_hsplit_resize_cursor_name
9+ mir_hsplit_resize_cursor_name,
10+ mir_crosshair_cursor_name
11 };
12
13 size_t num_cursors = sizeof(cursors)/sizeof(*cursors);
14
15=== modified file 'include/client/mir_toolkit/cursors.h'
16--- include/client/mir_toolkit/cursors.h 2015-04-28 07:54:10 +0000
17+++ include/client/mir_toolkit/cursors.h 2015-07-28 02:45:17 +0000
18@@ -113,6 +113,12 @@
19 */
20 extern char const* const mir_hsplit_resize_cursor_name;
21
22+/**
23+ * The cursor used for crosshair, which may be used for picking colors or
24+ * finer precision.
25+ */
26+extern char const* const mir_crosshair_cursor_name;
27+
28 #ifdef __cplusplus
29 }
30 #endif
31
32=== modified file 'src/client/mir_cursor_api.cpp'
33--- src/client/mir_cursor_api.cpp 2015-06-17 05:20:42 +0000
34+++ src/client/mir_cursor_api.cpp 2015-07-28 02:45:17 +0000
35@@ -42,6 +42,7 @@
36 extern "C" char const* const mir_omnidirectional_resize_cursor_name = "omnidirectional-resize";
37 extern "C" char const* const mir_vsplit_resize_cursor_name = "vsplit-resize";
38 extern "C" char const* const mir_hsplit_resize_cursor_name = "hsplit-resize";
39+extern "C" char const* const mir_crosshair_cursor_name = "crosshair";
40
41 MirCursorConfiguration::MirCursorConfiguration(char const* name) :
42 name{name ? name : std::string()},
43
44=== modified file 'src/client/symbols.map'
45--- src/client/symbols.map 2015-07-25 08:10:48 +0000
46+++ src/client/symbols.map 2015-07-28 02:45:17 +0000
47@@ -164,6 +164,7 @@
48 global:
49 mir_connection_pong;
50 mir_connection_set_ping_event_callback;
51+ mir_crosshair_cursor_name;
52 mir_keyboard_event_input_event;
53 mir_persistent_id_as_string;
54 mir_persistent_id_from_string;
55
56=== modified file 'src/server/input/xcursor_loader.cpp'
57--- src/server/input/xcursor_loader.cpp 2015-06-25 19:29:44 +0000
58+++ src/server/input/xcursor_loader.cpp 2015-07-28 02:45:17 +0000
59@@ -137,6 +137,10 @@
60 {
61 return "h_double_arrow";
62 }
63+ else if (mir_cursor_name == mir_crosshair_cursor_name)
64+ {
65+ return "crosshair";
66+ }
67 else
68 {
69 return mir_cursor_name;

Subscribers

People subscribed via source and target branches