waycrate / exwlshelleventloop Goto Github PK
View Code? Open in Web Editor NEWwinit like binding for layershell and sessionlock
License: MIT License
winit like binding for layershell and sessionlock
License: MIT License
Hi, the following program :
use iced::{executor, widget::text, Command, Theme};
use iced_layershell::{
Application,
settings::{Settings, LayerShellSettings},
};
struct BarExample;
impl Application for BarExample {
type Executor = executor::Default;
type Message = ();
type Theme = Theme;
type Flags = ();
fn new(_flags: Self::Flags) -> (Self, iced::Command<Self::Message>) {
(Self, Command::none())
}
fn namespace(&self) -> String {
"BarExample".into()
}
fn update(&mut self, _message: Self::Message) -> iced::Command<Self::Message> {
Command::none()
}
fn view(&self) -> iced::Element<'_, Self::Message, Self::Theme, iced::Renderer> {
text("hi").into()
}
}
fn main() -> Result<(), iced_layershell::Error> {
BarExample::run(Settings {
layer_settings: LayerShellSettings {
size: Some((1356, 30)),
..Default::default()
},
..Default::default()
})
}
results in a 15% cpu usage on Hyprland. It also makes Hyprland use ~75x more cpu time than usual.
I created a flamegraph :
and it looks like most of the time is spent in the function wayland_client::event_queue::EventQueue<State>::roundtrip
.
I'm using iced
version 0.12.1, and iced_layershell
version 0.2.2, and Hyprland version 0.39.1
When running the counter example on Sway window manager clicking the left or right buttons leads to a panic.
Two errors seem to be reported depending on if the panic is immediate or not.
If the panic isn't immediate the window seems to be dismissed with the following error spamming the logs:
Protocol error 1 on object zwlr_layer_surface_v1@16:
If the panic is immediate it displays the errors:
zwlr_layer_surface_v1@16: error 1: width 0 requested without setting left and right anchors
khronos-egl-6.0.0/src/lib.rs:1173:42:
called `Option::unwrap()` on a `None` value
this make it can be used with iced
still need to be done
other things
finally
etc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.