Skip to content

Commit

Permalink
store new output color even if ramp_size is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVerevkin committed Mar 18, 2024
1 parent 861afd9 commit a27fe89
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/wayland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use anyhow::Result;
use wayrs_client::cstr;
use wayrs_client::global::*;
use wayrs_client::protocol::*;
use wayrs_client::proxy::Proxy;
use wayrs_client::{Connection, EventCtx, IoMode};
use wayrs_protocols::wlr_gamma_control_unstable_v1::*;

Expand Down Expand Up @@ -112,12 +111,10 @@ impl Output {
}

pub fn set_color(&mut self, color: Color) {
if self.ramp_size == 0 || color == self.color {
return;
if color != self.color {
self.color = color;
self.color_changed = true;
}

self.color = color;
self.color_changed = true;
}

pub fn object_path(&self) -> Option<String> {
Expand Down

0 comments on commit a27fe89

Please sign in to comment.