mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-05 05:05:57 +01:00
relative-pointer-v1: remove unnecessary comments
We don't do this in other implementations, so it feels out of place.
This commit is contained in:
parent
98c5f58a38
commit
17fbf60bd1
1 changed files with 0 additions and 28 deletions
|
@ -14,29 +14,18 @@
|
|||
static const struct zwp_relative_pointer_manager_v1_interface relative_pointer_manager_v1_impl;
|
||||
static const struct zwp_relative_pointer_v1_interface relative_pointer_v1_impl;
|
||||
|
||||
|
||||
/**
|
||||
* helper functions
|
||||
*/
|
||||
|
||||
struct wlr_relative_pointer_v1 *wlr_relative_pointer_v1_from_resource(struct wl_resource *resource) {
|
||||
assert(wl_resource_instance_of(resource, &zwp_relative_pointer_v1_interface,
|
||||
&relative_pointer_v1_impl));
|
||||
return wl_resource_get_user_data(resource);
|
||||
}
|
||||
|
||||
|
||||
static struct wlr_relative_pointer_manager_v1 *relative_pointer_manager_from_resource(struct wl_resource *resource) {
|
||||
assert(wl_resource_instance_of(resource, &zwp_relative_pointer_manager_v1_interface,
|
||||
&relative_pointer_manager_v1_impl));
|
||||
return wl_resource_get_user_data(resource);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* relative_pointer handler functions
|
||||
*/
|
||||
|
||||
static void relative_pointer_destroy(struct wlr_relative_pointer_v1 *relative_pointer) {
|
||||
wlr_signal_emit_safe(&relative_pointer->events.destroy, relative_pointer);
|
||||
|
||||
|
@ -57,7 +46,6 @@ static void relative_pointer_v1_handle_resource_destroy(struct wl_resource *reso
|
|||
relative_pointer_destroy(relative_pointer);
|
||||
}
|
||||
|
||||
|
||||
static void relative_pointer_v1_handle_destroy(struct wl_client *client,
|
||||
struct wl_resource *resource) {
|
||||
struct wlr_relative_pointer_v1 *relative_pointer =
|
||||
|
@ -84,10 +72,6 @@ static void relative_pointer_handle_pointer_destroy(struct wl_listener *listener
|
|||
relative_pointer_destroy(relative_pointer);
|
||||
}
|
||||
|
||||
/**
|
||||
* relative_pointer_manager handler functions
|
||||
*/
|
||||
|
||||
static void relative_pointer_manager_v1_handle_destroy(struct wl_client *client,
|
||||
struct wl_resource *resource) {
|
||||
wl_resource_destroy(resource);
|
||||
|
@ -150,7 +134,6 @@ static void relative_pointer_manager_v1_handle_get_relative_pointer(struct wl_cl
|
|||
relative_pointer, client);
|
||||
}
|
||||
|
||||
|
||||
static void relative_pointer_manager_v1_bind(struct wl_client *wl_client, void *data,
|
||||
uint32_t version, uint32_t id) {
|
||||
struct wlr_relative_pointer_manager_v1 *manager = data;
|
||||
|
@ -175,26 +158,15 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
free(manager);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementations
|
||||
*/
|
||||
|
||||
static const struct zwp_relative_pointer_manager_v1_interface relative_pointer_manager_v1_impl = {
|
||||
.destroy = relative_pointer_manager_v1_handle_destroy,
|
||||
.get_relative_pointer = relative_pointer_manager_v1_handle_get_relative_pointer,
|
||||
};
|
||||
|
||||
|
||||
static const struct zwp_relative_pointer_v1_interface relative_pointer_v1_impl = {
|
||||
.destroy = relative_pointer_v1_handle_destroy,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Public functions
|
||||
*/
|
||||
|
||||
struct wlr_relative_pointer_manager_v1 *wlr_relative_pointer_manager_v1_create(struct wl_display *display) {
|
||||
struct wlr_relative_pointer_manager_v1 *manager =
|
||||
calloc(1, sizeof(struct wlr_relative_pointer_manager_v1));
|
||||
|
|
Loading…
Reference in a new issue