mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Update Smithay (apply state in post commit)
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user