mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-22 05:24:22 +02:00
Add IPC event for cursor switching output
This commit is contained in:
parent
bc9c7a7555
commit
5305eead4c
2 changed files with 7 additions and 0 deletions
6
seat.c
6
seat.c
|
|
@ -652,6 +652,12 @@ handle_cursor_motion(struct wl_listener *listener, void *data) {
|
|||
event->delta_y);
|
||||
process_cursor_motion(seat, event->time_msec);
|
||||
wlr_idle_notify_activity(seat->server->idle, seat->seat);
|
||||
struct wlr_output *c_outp = wlr_output_layout_output_at(seat->server->output_layout,seat->cursor->x,seat->cursor->y);
|
||||
if(seat->cursor_output != NULL && seat->cursor_output != c_outp) {
|
||||
ipc_send_event(seat->server, "{\"event_name\":\"cursor_switch_output\",\"old_output\":\"%s\",\"new_output\":\"%s\"}",
|
||||
seat->cursor_output->name, c_outp->name);
|
||||
}
|
||||
seat->cursor_output=c_outp;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
1
seat.h
1
seat.h
|
|
@ -28,6 +28,7 @@ struct cg_seat {
|
|||
uint16_t num_touch;
|
||||
|
||||
struct wlr_cursor *cursor;
|
||||
struct wlr_output *cursor_output;
|
||||
struct wlr_xcursor_manager *xcursor_manager;
|
||||
struct wl_listener cursor_motion;
|
||||
struct wl_listener cursor_motion_absolute;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue