mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
add cursor configuration
This commit is contained in:
parent
b3a43e2261
commit
699d489f93
4 changed files with 29 additions and 0 deletions
|
|
@ -70,6 +70,11 @@ static void handle_output_add(struct output_state *ostate) {
|
|||
sample->layout = configure_layout(sample->config, &ostate->compositor->outputs);
|
||||
wlr_cursor_attach_output_layout(sample->cursor, sample->layout);
|
||||
|
||||
char *mapped_output = sample->config->cursor.mapped_output;
|
||||
if (mapped_output && strcmp(mapped_output, wlr_output->name) == 0) {
|
||||
wlr_cursor_map_to_output(sample->cursor, wlr_output);
|
||||
}
|
||||
|
||||
/*
|
||||
// TODO configuration
|
||||
if (strcmp("DP-1", ostate->output->name) == 0) {
|
||||
|
|
@ -95,6 +100,10 @@ static void handle_output_remove(struct output_state *ostate) {
|
|||
wlr_output_layout_destroy(sample->layout);
|
||||
sample->layout = configure_layout(sample->config, &ostate->compositor->outputs);
|
||||
wlr_cursor_attach_output_layout(sample->cursor, sample->layout);
|
||||
|
||||
if (strcmp(sample->config->cursor.mapped_output, ostate->output->name) == 0) {
|
||||
wlr_cursor_map_to_output(sample->cursor, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_output_resolution(struct compositor_state *state,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue