toplevel-info/mgmt: Update to v2/v3
This commit is contained in:
parent
bbda6fb13d
commit
9c7c41c508
11 changed files with 270 additions and 119 deletions
|
|
@ -44,7 +44,6 @@ use smithay::{
|
|||
utils::{IsAlive, Logical, Point, Rectangle, Serial, Size},
|
||||
wayland::{
|
||||
compositor::with_states,
|
||||
foreign_toplevel_list::ForeignToplevelListState,
|
||||
seat::WaylandFocus,
|
||||
session_lock::LockSurface,
|
||||
shell::wlr_layer::{KeyboardInteractivity, Layer, LayerSurfaceCachedState},
|
||||
|
|
@ -61,11 +60,7 @@ use crate::{
|
|||
utils::{prelude::*, quirks::WORKSPACE_OVERVIEW_NAMESPACE},
|
||||
wayland::{
|
||||
handlers::{
|
||||
foreign_toplevel_list::{
|
||||
new_foreign_toplevel, refresh_foreign_toplevels, remove_foreign_toplevel,
|
||||
},
|
||||
toplevel_management::minimize_rectangle,
|
||||
xdg_activation::ActivationContext,
|
||||
toplevel_management::minimize_rectangle, xdg_activation::ActivationContext,
|
||||
xdg_shell::popup::get_popup_toplevel,
|
||||
},
|
||||
protocols::{
|
||||
|
|
@ -1194,7 +1189,6 @@ impl Common {
|
|||
);
|
||||
self.popups.cleanup();
|
||||
self.toplevel_info_state.refresh(&self.workspace_state);
|
||||
refresh_foreign_toplevels(&self.shell.read().unwrap());
|
||||
self.refresh_idle_inhibit();
|
||||
}
|
||||
|
||||
|
|
@ -2083,7 +2077,6 @@ impl Shell {
|
|||
&mut self,
|
||||
window: &CosmicSurface,
|
||||
toplevel_info: &mut ToplevelInfoState<State, CosmicSurface>,
|
||||
foreign_toplevel_list: &mut ForeignToplevelListState,
|
||||
workspace_state: &mut WorkspaceState<State>,
|
||||
evlh: &LoopHandle<'static, State>,
|
||||
) -> Option<KeyboardFocusTarget> {
|
||||
|
|
@ -2166,7 +2159,6 @@ impl Shell {
|
|||
toplevel_info.new_toplevel(&window, workspace_state);
|
||||
toplevel_enter_output(&window, &output);
|
||||
toplevel_enter_workspace(&window, &workspace.handle);
|
||||
new_foreign_toplevel(&window, foreign_toplevel_list);
|
||||
|
||||
let mut workspace_state = workspace_state.update();
|
||||
|
||||
|
|
@ -2298,7 +2290,6 @@ impl Shell {
|
|||
surface: &S,
|
||||
seat: &Seat<State>,
|
||||
toplevel_info: &mut ToplevelInfoState<State, CosmicSurface>,
|
||||
foreign_toplevel_list: &mut ForeignToplevelListState,
|
||||
) where
|
||||
CosmicSurface: PartialEq<S>,
|
||||
{
|
||||
|
|
@ -2348,7 +2339,6 @@ impl Shell {
|
|||
|
||||
if let Some(surface) = surface {
|
||||
toplevel_info.remove_toplevel(&surface);
|
||||
remove_foreign_toplevel(&surface, foreign_toplevel_list);
|
||||
self.pending_windows.push((surface, seat.clone(), None));
|
||||
return;
|
||||
}
|
||||
|
|
@ -3619,6 +3609,7 @@ impl Shell {
|
|||
let handle = workspace.handle;
|
||||
|
||||
for (window, _) in mapped.windows() {
|
||||
window.set_sticky(true);
|
||||
toplevel_leave_workspace(&window, &handle);
|
||||
}
|
||||
|
||||
|
|
@ -3640,6 +3631,7 @@ impl Shell {
|
|||
let workspace = &mut set.workspaces[set.active];
|
||||
for (window, _) in mapped.windows() {
|
||||
toplevel_enter_workspace(&window, &workspace.handle);
|
||||
window.set_sticky(false);
|
||||
}
|
||||
|
||||
match mapped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue