mirror of
https://github.com/swaywm/sway.git
synced 2025-11-17 06:59:48 -05:00
Address emersions comments on output re-enabling
This commit is contained in:
parent
a1b5b93d29
commit
a0bbe67076
3 changed files with 4 additions and 12 deletions
|
|
@ -1221,6 +1221,8 @@ void handle_new_output(struct wl_listener *listener, void *data) {
|
|||
output->server = server;
|
||||
list_add(root_container.sway_root->outputs, output);
|
||||
|
||||
output->damage = wlr_output_damage_create(wlr_output);
|
||||
|
||||
if (!wl_list_empty(&wlr_output->modes)) {
|
||||
struct wlr_output_mode *mode =
|
||||
wl_container_of(wlr_output->modes.prev, mode, link);
|
||||
|
|
@ -1233,14 +1235,6 @@ void handle_new_output(struct wl_listener *listener, void *data) {
|
|||
void output_enable(struct sway_output *output) {
|
||||
struct wlr_output *wlr_output = output->wlr_output;
|
||||
|
||||
if (!wlr_output->data) {
|
||||
wlr_output->data = output;
|
||||
}
|
||||
|
||||
if (!output->damage) {
|
||||
output->damage = wlr_output_damage_create(wlr_output);
|
||||
}
|
||||
|
||||
output->swayc = output_create(output);
|
||||
if (!output->swayc) {
|
||||
// Output is disabled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue