diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/commands.h | 1 | ||||
-rw-r--r-- | include/container.h | 2 | ||||
-rw-r--r-- | include/handlers.h | 4 | ||||
-rw-r--r-- | include/input_state.h | 8 |
4 files changed, 6 insertions, 9 deletions
diff --git a/include/commands.h b/include/commands.h index 8e53c74d..f6777930 100644 --- a/include/commands.h +++ b/include/commands.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _SWAY_COMMANDS_H | 2 | #define _SWAY_COMMANDS_H |
3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
4 | #include <json-c/json.h> | 4 | #include <json-c/json.h> |
5 | #include <wlc/wlc.h> | ||
5 | #include "config.h" | 6 | #include "config.h" |
6 | 7 | ||
7 | 8 | ||
diff --git a/include/container.h b/include/container.h index ae9a9fc5..d5eb27c1 100644 --- a/include/container.h +++ b/include/container.h | |||
@@ -98,6 +98,8 @@ swayc_t *swayc_by_name(const char *name); | |||
98 | swayc_t *swayc_active_output(void); | 98 | swayc_t *swayc_active_output(void); |
99 | swayc_t *swayc_active_workspace(void); | 99 | swayc_t *swayc_active_workspace(void); |
100 | swayc_t *swayc_active_workspace_for(swayc_t *view); | 100 | swayc_t *swayc_active_workspace_for(swayc_t *view); |
101 | // set focus to current pointer location and return focused container | ||
102 | swayc_t *container_under_pointer(void); | ||
101 | 103 | ||
102 | // Container information | 104 | // Container information |
103 | 105 | ||
diff --git a/include/handlers.h b/include/handlers.h index 4c71f953..d7f6ffdd 100644 --- a/include/handlers.h +++ b/include/handlers.h | |||
@@ -5,10 +5,6 @@ | |||
5 | #include <wlc/wlc.h> | 5 | #include <wlc/wlc.h> |
6 | 6 | ||
7 | extern struct wlc_interface interface; | 7 | extern struct wlc_interface interface; |
8 | extern struct wlc_origin mouse_origin; | ||
9 | extern uint32_t keys_pressed[32]; | 8 | extern uint32_t keys_pressed[32]; |
10 | 9 | ||
11 | // set focus to current pointer location and return focused container | ||
12 | swayc_t *container_under_pointer(void); | ||
13 | |||
14 | #endif | 10 | #endif |
diff --git a/include/input_state.h b/include/input_state.h index d87ae18c..a1f238e1 100644 --- a/include/input_state.h +++ b/include/input_state.h | |||
@@ -48,11 +48,6 @@ extern struct pointer_state { | |||
48 | struct pointer_button_state right; | 48 | struct pointer_button_state right; |
49 | struct pointer_button_state scroll; | 49 | struct pointer_button_state scroll; |
50 | 50 | ||
51 | // pointer position | ||
52 | struct mouse_origin{ | ||
53 | int x, y; | ||
54 | } origin; | ||
55 | |||
56 | // change in pointer position | 51 | // change in pointer position |
57 | struct { | 52 | struct { |
58 | int x, y; | 53 | int x, y; |
@@ -65,6 +60,9 @@ extern struct pointer_state { | |||
65 | int mode; | 60 | int mode; |
66 | } pointer_state; | 61 | } pointer_state; |
67 | 62 | ||
63 | void pointer_position_set(struct wlc_origin *new_origin, bool force_focus); | ||
64 | void center_pointer_on(swayc_t *view); | ||
65 | |||
68 | // on button release unset mode depending on the button. | 66 | // on button release unset mode depending on the button. |
69 | // on button press set mode conditionally depending on the button | 67 | // on button press set mode conditionally depending on the button |
70 | void pointer_mode_set(uint32_t button, bool condition); | 68 | void pointer_mode_set(uint32_t button, bool condition); |