mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
output: early return on wlopm if requested state is already set
This prevents a unnecessary output commit without buffer, showing up as black flash when repeatedly calling wlopm --on.
This commit is contained in:
parent
c0526d856d
commit
bf02598098
1 changed files with 6 additions and 0 deletions
|
|
@ -1068,10 +1068,16 @@ handle_output_power_manager_set_mode(struct wl_listener *listener, void *data)
|
|||
|
||||
switch (event->mode) {
|
||||
case ZWLR_OUTPUT_POWER_V1_MODE_OFF:
|
||||
if (!event->output->enabled) {
|
||||
return;
|
||||
}
|
||||
wlr_output_state_set_enabled(&output->pending, false);
|
||||
output_state_commit(output);
|
||||
break;
|
||||
case ZWLR_OUTPUT_POWER_V1_MODE_ON:
|
||||
if (event->output->enabled) {
|
||||
return;
|
||||
}
|
||||
wlr_output_state_set_enabled(&output->pending, true);
|
||||
if (!event->output->current_mode) {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue