mirror of
https://github.com/swaywm/sway.git
synced 2026-05-03 06:46:26 -04:00
Add hide_cursor command
Which hides the cursor if you don't use it for a while.
This commit is contained in:
parent
4e6cb2b4b2
commit
ea6ff6790c
11 changed files with 110 additions and 16 deletions
|
|
@ -111,6 +111,7 @@ sway_cmd cmd_for_window;
|
|||
sway_cmd cmd_force_focus_wrapping;
|
||||
sway_cmd cmd_fullscreen;
|
||||
sway_cmd cmd_gaps;
|
||||
sway_cmd cmd_hide_cursor;
|
||||
sway_cmd cmd_hide_edge_borders;
|
||||
sway_cmd cmd_include;
|
||||
sway_cmd cmd_input;
|
||||
|
|
|
|||
|
|
@ -341,6 +341,8 @@ struct sway_config {
|
|||
int floating_border_thickness;
|
||||
enum edge_border_types hide_edge_borders;
|
||||
|
||||
int hide_cursor_timeout;
|
||||
|
||||
// border colors
|
||||
struct {
|
||||
struct border_colors focused;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _SWAY_INPUT_CURSOR_H
|
||||
#define _SWAY_INPUT_CURSOR_H
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <wlr/types/wlr_surface.h>
|
||||
#include "sway/input/seat.h"
|
||||
|
||||
struct sway_cursor {
|
||||
|
|
@ -9,6 +11,8 @@ struct sway_cursor {
|
|||
struct wlr_xcursor_manager *xcursor_manager;
|
||||
|
||||
struct wl_client *image_client;
|
||||
struct wlr_surface *image_surface;
|
||||
int hotspot_x, hotspot_y;
|
||||
|
||||
struct wl_listener motion;
|
||||
struct wl_listener motion_absolute;
|
||||
|
|
@ -25,6 +29,9 @@ struct sway_cursor {
|
|||
uint32_t tool_buttons;
|
||||
|
||||
struct wl_listener request_set_cursor;
|
||||
|
||||
struct wl_event_source *hide_source;
|
||||
bool hidden;
|
||||
};
|
||||
|
||||
void sway_cursor_destroy(struct sway_cursor *cursor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue