mirror of
https://github.com/swaywm/sway.git
synced 2025-11-18 06:59:48 -05:00
Implement hide_cursor <timeout> command
Allows the cursor to be hidden after a specified timeout in milliseconds
This commit is contained in:
parent
a223030b70
commit
5fca74a1f1
9 changed files with 91 additions and 7 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _SWAY_INPUT_CURSOR_H
|
||||
#define _SWAY_INPUT_CURSOR_H
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <wlr/types/wlr_surface.h>
|
||||
#include "sway/input/seat.h"
|
||||
|
||||
#define SWAY_CURSOR_PRESSED_BUTTONS_CAP 32
|
||||
|
|
@ -21,6 +23,8 @@ struct sway_cursor {
|
|||
|
||||
const char *image;
|
||||
struct wl_client *image_client;
|
||||
struct wlr_surface *image_surface;
|
||||
int hotspot_x, hotspot_y;
|
||||
|
||||
struct wl_listener motion;
|
||||
struct wl_listener motion_absolute;
|
||||
|
|
@ -38,6 +42,9 @@ struct sway_cursor {
|
|||
|
||||
struct wl_listener request_set_cursor;
|
||||
|
||||
struct wl_event_source *hide_source;
|
||||
bool hidden;
|
||||
|
||||
// Mouse binding state
|
||||
uint32_t pressed_buttons[SWAY_CURSOR_PRESSED_BUTTONS_CAP];
|
||||
size_t pressed_button_count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue