Replaced KDE's obsolete idle protocol with the standard ext-idle-notify-v1

This commit is contained in:
Keith Bowes 2022-12-06 13:24:30 -05:00
parent 00d8451178
commit 5122dbf35f
8 changed files with 11 additions and 55 deletions

View file

@ -67,7 +67,6 @@ static void get_action(xmlNode *new_node, struct wb_key_binding *key_bind) {
key_bind->cmd = (char *) xmlStrdup(cur_node->children->content);
}
}
}
static bool parse_key_bindings(struct wb_config *config, xmlXPathContextPtr ctxt) {

View file

@ -101,6 +101,8 @@ static void process_cursor_motion(struct wb_server *server, uint32_t time) {
* the last client to have the cursor over it. */
wlr_seat_pointer_clear_focus(seat);
}
wlr_idle_notifier_v1_notify_activity(server->idle_notifier, seat);
}
static void handle_cursor_motion(struct wl_listener *listener, void *data) {
@ -141,6 +143,8 @@ static void handle_cursor_button(struct wl_listener *listener, void *data) {
/* Focus that client if the button was _pressed_ */
focus_view(view, surface);
}
wlr_idle_notifier_v1_notify_activity(cursor->server->idle_notifier, cursor->server->seat->seat);
}
static void handle_cursor_axis(struct wl_listener *listener, void *data) {

View file

@ -193,6 +193,8 @@ static void keyboard_handle_key(
wlr_seat_keyboard_notify_key(seat, event->time_msec,
event->keycode, event->state);
}
wlr_idle_notifier_v1_notify_activity(server->idle_notifier, seat);
}
static void handle_new_keyboard(struct wb_server *server,

View file

@ -93,7 +93,7 @@ bool wb_start_server(struct wb_server* server) {
wlr_gamma_control_manager_v1_create(server->wl_display);
wlr_screencopy_manager_v1_create(server->wl_display);
wlr_idle_create(server->wl_display);
server->idle_notifier = wlr_idle_notifier_v1_create(server->wl_display);
wlr_data_device_manager_create(server->wl_display);
wl_list_init(&server->views);