mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
output: move a few calls from new_output_notify()
... to more specific/logical locations, to make it possible in future to *not* immediately auto-configure new outputs when connected. In particular: - Move regions_reconfigure_output() and session_lock_output_create() into add_output_to_layout(), which would be called also if the output is enabled later. - Move seat_output_layout_changed() to do_output_layout_change() so it is called for any layout change, not just adding new outputs.
This commit is contained in:
parent
f052eaea6f
commit
c38cb5f59c
1 changed files with 9 additions and 8 deletions
17
src/output.c
17
src/output.c
|
|
@ -277,6 +277,14 @@ add_output_to_layout(struct server *server, struct output *output)
|
|||
|
||||
lab_cosmic_workspace_group_output_enter(
|
||||
server->workspaces.cosmic_group, output->wlr_output);
|
||||
|
||||
/* (Re-)create regions from config */
|
||||
regions_reconfigure_output(output);
|
||||
|
||||
/* Create lock surface if needed */
|
||||
if (server->session_lock_manager->locked) {
|
||||
session_lock_output_create(server->session_lock_manager, output);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -451,16 +459,8 @@ new_output_notify(struct wl_listener *listener, void *data)
|
|||
|
||||
add_output_to_layout(server, output);
|
||||
|
||||
/* Create regions from config */
|
||||
regions_reconfigure_output(output);
|
||||
|
||||
if (server->session_lock_manager->locked) {
|
||||
session_lock_output_create(server->session_lock_manager, output);
|
||||
}
|
||||
|
||||
server->pending_output_layout_change--;
|
||||
do_output_layout_change(server);
|
||||
seat_output_layout_changed(&output->server->seat);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -765,6 +765,7 @@ do_output_layout_change(struct server *server)
|
|||
"wlr_output_manager_v1_set_configuration()");
|
||||
}
|
||||
output_update_for_layout_change(server);
|
||||
seat_output_layout_changed(&server->seat);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue