shell: handle fullscreen windows on a dedicated layer
I hoped to split this up into multiple commits, but the api
changes to `shell/workspace.rs` were to invasive to feasibly do this.
Here is a rough list of changes:
- Fullscreen windows aren't mapped to other layers anymore
- This they need their own logic for:
- Sending frames
- Dmabuf Feedback
- Primary outputs
- On commit handlers
- cursor tests
- They get their own unmap/remap logic
- They get a new restore state similar to minimized windows
- Refactored the minimized window state to reuse as much as possible
here
- They need to be part of focus stacks, which means adjusting them
to a new type `FocusTarget` as they previously only handled
`CosmicMapped`.
- Various shell handlers (minimize, move, menu) now have dedicated
logic for fullscreen surfaces
- This was partially necessary due to relying on CosmicSurface now,
partially because they should've had their own logic from the
start. E.g. the context menu is now reflecting the fullscreen
state
- Fullscreen windows may be rendered behind other windows now, when they
loose focus.
- This needed changes to input handling / rendering
This commit is contained in:
parent
8ef6c161a0
commit
adedb705e7
23 changed files with 2554 additions and 1796 deletions
|
|
@ -455,7 +455,10 @@ impl CosmicStack {
|
|||
.with_program(|p| p.group_focused.load(Ordering::SeqCst))
|
||||
}
|
||||
|
||||
pub fn set_active(&self, window: &CosmicSurface) {
|
||||
pub fn set_active<S>(&self, window: &S)
|
||||
where
|
||||
CosmicSurface: PartialEq<S>,
|
||||
{
|
||||
self.0.with_program(|p| {
|
||||
if let Some(val) = p.windows.lock().unwrap().iter().position(|w| w == window) {
|
||||
let old = p.active.swap(val, Ordering::SeqCst);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue