Code Monkey home page Code Monkey logo

exwlshelleventloop's People

Contributors

decodetalkers avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

exwlshelleventloop's Issues

Performance issue on Hyprland

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 :
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

support popup: a basic idea

Support popup in multiwindow

  • give popup an unique id in layershellev, every time request a popup , finally pass this request to layershelllev, and generate a popup
  • draw window in iced_layershell, and save a hashmap about the relation between uniqueid and iced::window::id, (lazy static)
  • users can get if the id in view request is a popup, and who request it , draw the view of the popup
  • handle the event of keyboard leave. when keyboard leave the surface, destroy the popup

iced_examples/counter panics when clicking left or right on Sway

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

for iced_layershell binding to be published and be usable

this make it can be used with iced

still need to be done

  • hover event
  • keyboard event
  • fractal scale (need help)
  • ime (Wait for new iced being released)
  • virtual keyboard
  • support keyboard repeat
  • support touch event(need to be tested)

other things

  • example, like set anchor, set size, move it in eight corners. such kind example

finally

  • use this crate make a layershell launcher with iced

etc

  • bind ext-session-shell with the same way

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.