xwayland: Handle sticky windows on configure
This commit is contained in:
parent
153ed8d0a5
commit
36b759ea18
1 changed files with 15 additions and 2 deletions
|
|
@ -321,8 +321,21 @@ impl XwmHandler for State {
|
||||||
// We only allow floating X11 windows to resize themselves. Nothing else
|
// We only allow floating X11 windows to resize themselves. Nothing else
|
||||||
let mut current_geo = window.geometry();
|
let mut current_geo = window.geometry();
|
||||||
if let Some(mapped) = self.common.shell.element_for_x11_surface(&window) {
|
if let Some(mapped) = self.common.shell.element_for_x11_surface(&window) {
|
||||||
let space = self.common.shell.space_for(mapped).unwrap();
|
let is_floating = self
|
||||||
if space.is_floating(mapped) {
|
.common
|
||||||
|
.shell
|
||||||
|
.workspaces
|
||||||
|
.sets
|
||||||
|
.values()
|
||||||
|
.any(|set| set.sticky_layer.mapped().any(|m| m == mapped))
|
||||||
|
|| self
|
||||||
|
.common
|
||||||
|
.shell
|
||||||
|
.space_for(&mapped)
|
||||||
|
.filter(|space| space.is_floating(mapped))
|
||||||
|
.is_some();
|
||||||
|
|
||||||
|
if is_floating {
|
||||||
mapped.set_geometry(
|
mapped.set_geometry(
|
||||||
Rectangle::from_loc_and_size(
|
Rectangle::from_loc_and_size(
|
||||||
current_geo.loc,
|
current_geo.loc,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue