Update libcosmic/iced
This commit is contained in:
parent
c939486ce6
commit
e020bf6607
2 changed files with 665 additions and 79 deletions
734
Cargo.lock
generated
734
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
src/main.rs
10
src/main.rs
|
|
@ -180,7 +180,6 @@ impl Default for Conf {
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
struct App {
|
struct App {
|
||||||
max_surface_id: u128,
|
|
||||||
layer_surfaces: HashMap<SurfaceId, LayerSurface>,
|
layer_surfaces: HashMap<SurfaceId, LayerSurface>,
|
||||||
outputs: Vec<Output>,
|
outputs: Vec<Output>,
|
||||||
workspaces: Vec<Workspace>,
|
workspaces: Vec<Workspace>,
|
||||||
|
|
@ -201,11 +200,6 @@ struct App {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl App {
|
impl App {
|
||||||
fn next_surface_id(&mut self) -> SurfaceId {
|
|
||||||
self.max_surface_id += 1;
|
|
||||||
SurfaceId(self.max_surface_id)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn workspace_for_handle(
|
fn workspace_for_handle(
|
||||||
&self,
|
&self,
|
||||||
handle: &zcosmic_workspace_handle_v1::ZcosmicWorkspaceHandleV1,
|
handle: &zcosmic_workspace_handle_v1::ZcosmicWorkspaceHandleV1,
|
||||||
|
|
@ -231,7 +225,7 @@ impl App {
|
||||||
&mut self,
|
&mut self,
|
||||||
output: wl_output::WlOutput,
|
output: wl_output::WlOutput,
|
||||||
) -> Command<cosmic::app::Message<Msg>> {
|
) -> Command<cosmic::app::Message<Msg>> {
|
||||||
let id = self.next_surface_id();
|
let id = SurfaceId::unique();
|
||||||
self.layer_surfaces.insert(
|
self.layer_surfaces.insert(
|
||||||
id,
|
id,
|
||||||
LayerSurface {
|
LayerSurface {
|
||||||
|
|
@ -507,7 +501,7 @@ impl Application for App {
|
||||||
(handle.clone().id(), output, &*TOPLEVEL_MIME)
|
(handle.clone().id(), output, &*TOPLEVEL_MIME)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let id = self.next_surface_id();
|
let id = SurfaceId::unique();
|
||||||
if let Some((parent_id, _)) = self
|
if let Some((parent_id, _)) = self
|
||||||
.layer_surfaces
|
.layer_surfaces
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue