feat: add support to two new wayland protocols
- Idle notify - Idle inhibit
This commit is contained in:
5
cursor.c
5
cursor.c
@@ -5,6 +5,7 @@
|
||||
#include "view.h"
|
||||
#include "seat.h"
|
||||
#include "node.h"
|
||||
#include "idle.h"
|
||||
|
||||
void diyac_cursor_focus(struct diyac_server *server)
|
||||
{
|
||||
@@ -216,6 +217,7 @@ static void server_cursor_motion(struct wl_listener *listener, void *data)
|
||||
struct diyac_seat *seat =
|
||||
wl_container_of(listener, seat, cursor_motion);
|
||||
struct wlr_pointer_motion_event *event = data;
|
||||
diya_idle_manager_notify_activity(seat->wlr_seat);
|
||||
/* The cursor doesn't move unless we tell it to. The cursor automatically
|
||||
* handles constraining the motion to the output layout, as well as any
|
||||
* special configuration applied for the specific input device which
|
||||
@@ -237,6 +239,7 @@ static void server_cursor_motion_absolute(
|
||||
* emits these events. */
|
||||
struct diyac_seat *seat =
|
||||
wl_container_of(listener, seat, cursor_motion_absolute);
|
||||
diya_idle_manager_notify_activity(seat->wlr_seat);
|
||||
struct wlr_pointer_motion_absolute_event *event = data;
|
||||
wlr_cursor_warp_absolute(seat->cursor, &event->pointer->base, event->x,
|
||||
event->y);
|
||||
@@ -250,6 +253,7 @@ static void server_cursor_button(struct wl_listener *listener, void *data)
|
||||
struct diyac_seat *seat =
|
||||
wl_container_of(listener, seat, cursor_button);
|
||||
struct wlr_pointer_button_event *event = data;
|
||||
diya_idle_manager_notify_activity(seat->wlr_seat);
|
||||
/* Notify the client with pointer focus that a button press has occurred */
|
||||
wlr_seat_pointer_notify_button(seat->wlr_seat,
|
||||
event->time_msec, event->button, event->state);
|
||||
@@ -271,6 +275,7 @@ static void server_cursor_axis(struct wl_listener *listener, void *data)
|
||||
* for example when you move the scroll wheel. */
|
||||
struct diyac_seat *seat =
|
||||
wl_container_of(listener, seat, cursor_axis);
|
||||
diya_idle_manager_notify_activity(seat->wlr_seat);
|
||||
struct wlr_pointer_axis_event *event = data;
|
||||
/* Notify the client with pointer focus of the axis event. */
|
||||
wlr_seat_pointer_notify_axis(seat->wlr_seat,
|
||||
|
Reference in New Issue
Block a user