Avoid crashing if entered surface's window is not a known window
Not sure how this even happens, but should fix #88
This commit is contained in:
parent
94da1af753
commit
b699ce62a1
1 changed files with 1 additions and 5 deletions
|
|
@ -127,11 +127,7 @@ impl SurfaceData {
|
||||||
self.output_key = Some(key);
|
self.output_key = Some(key);
|
||||||
debug!("{} entered {}", self.server.id(), output.server.id());
|
debug!("{} entered {}", self.server.id(), output.server.id());
|
||||||
let windows = &mut state.windows;
|
let windows = &mut state.windows;
|
||||||
if let Some(win_data) = self
|
if let Some(win_data) = self.window.as_ref().and_then(|win| windows.get_mut(win)) {
|
||||||
.window
|
|
||||||
.as_ref()
|
|
||||||
.map(|win| windows.get_mut(&win).unwrap())
|
|
||||||
{
|
|
||||||
let (x, y) = match output.position {
|
let (x, y) = match output.position {
|
||||||
OutputPosition::Xdg { x, y } => (x, y),
|
OutputPosition::Xdg { x, y } => (x, y),
|
||||||
OutputPosition::Wl { x, y } => (x, y),
|
OutputPosition::Wl { x, y } => (x, y),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue