mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-29 20:34:46 +01:00
Check for fullscreen in xdg_toplevel state
This commit is contained in:
parent
806e739ec2
commit
e4bf56026e
1 changed files with 19 additions and 2 deletions
|
@ -16,7 +16,10 @@ use smithay::{
|
|||
},
|
||||
input::pointer::{CursorImageAttributes, CursorImageStatus},
|
||||
output::Output,
|
||||
reexports::wayland_server::protocol::wl_surface::WlSurface,
|
||||
reexports::{
|
||||
wayland_protocols::xdg::shell::server::xdg_toplevel,
|
||||
wayland_server::protocol::wl_surface::WlSurface,
|
||||
},
|
||||
render_elements,
|
||||
utils::{IsAlive, Logical, Physical, Point, Scale},
|
||||
wayland::{compositor, input_method::InputMethodHandle},
|
||||
|
@ -166,7 +169,21 @@ where
|
|||
let output_render_elements = {
|
||||
let top_fullscreen_window = focus_stack.iter().rev().find(|win| {
|
||||
win.with_state(|state| {
|
||||
state.status.is_fullscreen() && state.tags.iter().any(|tag| tag.active())
|
||||
// TODO: for wayland windows, check if current state has xdg_toplevel fullscreen
|
||||
let is_wayland_actually_fullscreen = {
|
||||
if let WindowElement::Wayland(window) = win {
|
||||
window
|
||||
.toplevel()
|
||||
.current_state()
|
||||
.states
|
||||
.contains(xdg_toplevel::State::Fullscreen)
|
||||
} else {
|
||||
true
|
||||
}
|
||||
};
|
||||
state.status.is_fullscreen()
|
||||
&& state.tags.iter().any(|tag| tag.active())
|
||||
&& is_wayland_actually_fullscreen
|
||||
})
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue