mirror of
https://github.com/swaywm/sway
synced 2024-11-23 09:12:09 +01:00
config/output: drop enabling flag
This was useful when wlroots backends were updating the current mode on their own. This is no longer the case.
This commit is contained in:
parent
3ef5abd405
commit
23389ebd1f
@ -50,7 +50,7 @@ struct sway_output {
|
|||||||
enum wl_output_subpixel detected_subpixel;
|
enum wl_output_subpixel detected_subpixel;
|
||||||
enum scale_filter_mode scale_filter;
|
enum scale_filter_mode scale_filter;
|
||||||
|
|
||||||
bool enabling, enabled;
|
bool enabled;
|
||||||
list_t *workspaces;
|
list_t *workspaces;
|
||||||
|
|
||||||
struct sway_output_state current;
|
struct sway_output_state current;
|
||||||
|
@ -510,9 +510,6 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
|
|||||||
|
|
||||||
struct wlr_output *wlr_output = output->wlr_output;
|
struct wlr_output *wlr_output = output->wlr_output;
|
||||||
|
|
||||||
// Flag to prevent the output mode event handler from calling us
|
|
||||||
output->enabling = (!oc || oc->enabled);
|
|
||||||
|
|
||||||
struct wlr_output_state pending = {0};
|
struct wlr_output_state pending = {0};
|
||||||
queue_output_config(oc, output, &pending);
|
queue_output_config(oc, output, &pending);
|
||||||
|
|
||||||
@ -522,12 +519,9 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
|
|||||||
// Leave the output disabled for now and try again when the output gets
|
// Leave the output disabled for now and try again when the output gets
|
||||||
// the mode we asked for.
|
// the mode we asked for.
|
||||||
sway_log(SWAY_ERROR, "Failed to commit output %s", wlr_output->name);
|
sway_log(SWAY_ERROR, "Failed to commit output %s", wlr_output->name);
|
||||||
output->enabling = false;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
output->enabling = false;
|
|
||||||
|
|
||||||
if (oc && !oc->enabled) {
|
if (oc && !oc->enabled) {
|
||||||
sway_log(SWAY_DEBUG, "Disabling output %s", oc->name);
|
sway_log(SWAY_DEBUG, "Disabling output %s", oc->name);
|
||||||
if (output->enabled) {
|
if (output->enabled) {
|
||||||
|
Loading…
Reference in New Issue
Block a user