Send wl_surface.{enter,leave} to cursor surfaces

This commit is contained in:
emersion 2017-12-08 14:23:33 +01:00
parent 703df2a671
commit c5fa415a03
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 59 additions and 24 deletions

View file

@ -3,7 +3,7 @@
#include <stdint.h>
#define ROOTS_XCURSOR_SIZE 16
#define ROOTS_XCURSOR_SIZE 24
#define ROOTS_XCURSOR_DEFAULT "left_ptr"
#define ROOTS_XCURSOR_MOVE "grabbing"

View file

@ -16,6 +16,7 @@ struct wlr_output_cursor {
struct wlr_output *output;
double x, y;
bool enabled;
bool visible;
uint32_t width, height;
int32_t hotspot_x, hotspot_y;
struct wl_list link;
@ -98,6 +99,9 @@ void wlr_output_set_fullscreen_surface(struct wlr_output *output,
struct wlr_surface *surface);
struct wlr_output_cursor *wlr_output_cursor_create(struct wlr_output *output);
/**
* Sets the cursor image. The image must be already scaled for the output.
*/
bool wlr_output_cursor_set_image(struct wlr_output_cursor *cursor,
const uint8_t *pixels, int32_t stride, uint32_t width, uint32_t height,
int32_t hotspot_x, int32_t hotspot_y);