simplier .clang-format and fix swap focus

This commit is contained in:
2026-05-14 18:16:40 +07:00
parent 5c7dbfbe03
commit 090659d582
21 changed files with 1614 additions and 2052 deletions
+15 -23
View File
@@ -3,37 +3,29 @@
#include "types.h"
void
request_cursor(struct wl_listener *listener, void *data)
void request_cursor(struct wl_listener *listener, void *data)
{
absn_server *server = wl_container_of(listener, server, request_cursor);
struct wlr_seat_pointer_request_set_cursor_event *event = data;
struct wlr_seat_client *client =
server->seat->pointer_state.focused_client;
absn_server *server = wl_container_of(listener, server, request_cursor);
struct wlr_seat_pointer_request_set_cursor_event *event = data;
struct wlr_seat_client *client = server->seat->pointer_state.focused_client;
if (client == event->seat_client)
wlr_cursor_set_surface(server->cursor, event->surface,
event->hotspot_x, event->hotspot_y);
if (client == event->seat_client)
wlr_cursor_set_surface(server->cursor, event->surface, event->hotspot_x, event->hotspot_y);
}
void
pointer_focus_change(struct wl_listener *listener, void *data)
void pointer_focus_change(struct wl_listener *listener, void *data)
{
absn_server *server = wl_container_of(listener, server,
pointer_focus_change);
struct wlr_seat_pointer_focus_change_event *event = data;
absn_server *server = wl_container_of(listener, server, pointer_focus_change);
struct wlr_seat_pointer_focus_change_event *event = data;
if (!event->new_surface)
wlr_cursor_set_xcursor(server->cursor, server->cursor_mgr,
"default");
if (!event->new_surface)
wlr_cursor_set_xcursor(server->cursor, server->cursor_mgr, "default");
}
void
request_set_selection(struct wl_listener *listener, void *data)
void request_set_selection(struct wl_listener *listener, void *data)
{
absn_server *server = wl_container_of(listener, server,
request_set_selection);
struct wlr_seat_request_set_selection_event *event = data;
absn_server *server = wl_container_of(listener, server, request_set_selection);
struct wlr_seat_request_set_selection_event *event = data;
wlr_seat_set_selection(server->seat, event->source, event->serial);
wlr_seat_set_selection(server->seat, event->source, event->serial);
}