swc

(Pinephone) swc with touch and other mobile stuff
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit cf175c03c92b648f221e9a3fcdef7394b23c1206
parent 0a3e6590c3d40986becce48f0e35decb9d76ba07
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Thu,  1 Jul 2021 15:58:31 -0500

pointer: add support for showing and hiding pointer to compositor

Diffstat:
Mlibswc/pointer.c | 14++++++++++++++
Mlibswc/swc.h | 5+++++
2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/libswc/pointer.c b/libswc/pointer.c @@ -27,8 +27,10 @@ #include "internal.h" #include "plane.h" #include "screen.h" +#include "seat.h" #include "shm.h" #include "surface.h" +#include "swc.h" #include "util.h" #include "cursor/cursor_data.h" @@ -172,6 +174,18 @@ pointer_set_cursor(struct pointer *pointer, uint32_t id) view_attach(&pointer->cursor.view, buffer); } +EXPORT void +swc_cursor_hide() +{ + view_attach(&swc.seat->pointer->cursor.view, NULL); +} + +EXPORT void +swc_cursor_show() +{ + view_attach(&swc.seat->pointer->cursor.view, swc.seat->pointer->cursor.internal_buffer); +} + static bool client_handle_button(struct pointer_handler *handler, uint32_t time, struct button *button, uint32_t state) { diff --git a/libswc/swc.h b/libswc/swc.h @@ -35,6 +35,11 @@ struct libinput_device; struct wl_display; struct wl_event_loop; +/* Cursor {{{ */ +void swc_cursor_hide(); +void swc_cursor_show(); +/* }}} */ + /* Rectangles {{{ */ struct swc_rectangle {