Update Smithay (apply state in post commit)

This commit is contained in:
Ivan Molodetskikh
2024-08-20 11:43:32 +03:00
parent a40e7b4470
commit 618fa08aa5
8 changed files with 32 additions and 29 deletions
+5
View File
@@ -13,6 +13,7 @@ use knuffel::Decode as _;
use miette::{miette, Context, IntoDiagnostic, NarratableReportHandler};
use niri_ipc::{ConfiguredMode, LayoutSwitchTarget, SizeChange, Transform, WorkspaceReferenceArg};
use regex::Regex;
use smithay::backend::renderer::Color32F;
use smithay::input::keyboard::keysyms::KEY_NoSymbol;
use smithay::input::keyboard::xkb::{keysym_from_name, KEYSYM_CASE_INSENSITIVE};
use smithay::input::keyboard::{Keysym, XkbConfig};
@@ -580,6 +581,10 @@ impl Color {
Self { r, g, b, a }
}
pub fn from_color32f(color: Color32F) -> Self {
Self::from_array_premul(color.components())
}
pub fn to_array_unpremul(self) -> [f32; 4] {
[self.r, self.g, self.b, self.a]
}