update smithay, iced; reworked window for xwayland
This commit is contained in:
parent
47dfc85314
commit
7992ad67f6
27 changed files with 2285 additions and 1106 deletions
|
|
@ -1,19 +1,54 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
use smithay::utils::user_data::UserDataMap;
|
||||
|
||||
use crate::{
|
||||
shell::CosmicSurface,
|
||||
state::State,
|
||||
wayland::protocols::toplevel_info::{
|
||||
delegate_toplevel_info, ToplevelInfoHandler, ToplevelInfoState,
|
||||
delegate_toplevel_info, ToplevelInfoHandler, ToplevelInfoState, Window,
|
||||
},
|
||||
};
|
||||
|
||||
impl ToplevelInfoHandler for State {
|
||||
fn toplevel_info_state(&self) -> &ToplevelInfoState<State> {
|
||||
type Window = CosmicSurface;
|
||||
|
||||
fn toplevel_info_state(&self) -> &ToplevelInfoState<State, Self::Window> {
|
||||
&self.common.shell.toplevel_info_state
|
||||
}
|
||||
fn toplevel_info_state_mut(&mut self) -> &mut ToplevelInfoState<State> {
|
||||
fn toplevel_info_state_mut(&mut self) -> &mut ToplevelInfoState<State, Self::Window> {
|
||||
&mut self.common.shell.toplevel_info_state
|
||||
}
|
||||
}
|
||||
|
||||
delegate_toplevel_info!(State);
|
||||
impl Window for CosmicSurface {
|
||||
fn title(&self) -> String {
|
||||
CosmicSurface::title(self)
|
||||
}
|
||||
|
||||
fn app_id(&self) -> String {
|
||||
CosmicSurface::app_id(self)
|
||||
}
|
||||
|
||||
fn is_activated(&self) -> bool {
|
||||
CosmicSurface::is_activated(self)
|
||||
}
|
||||
|
||||
fn is_maximized(&self) -> bool {
|
||||
CosmicSurface::is_maximized(self)
|
||||
}
|
||||
|
||||
fn is_fullscreen(&self) -> bool {
|
||||
CosmicSurface::is_fullscreen(self)
|
||||
}
|
||||
|
||||
fn is_minimized(&self) -> bool {
|
||||
false // TODO
|
||||
}
|
||||
|
||||
fn user_data(&self) -> &UserDataMap {
|
||||
CosmicSurface::user_data(self)
|
||||
}
|
||||
}
|
||||
|
||||
delegate_toplevel_info!(State, CosmicSurface);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue