Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #14 from mskorzhinskiy/fix/dont-barf-on-null
Browse files Browse the repository at this point in the history
fix: don't barf with a null metaWindow

Context from @mskorzhinskiy in [PR #14]:

> Using next-release branch of PaperWM-community on Gnome 40, I have
> noticed that some of the keybindings do not work for some reason. E.g.
> "Super+V", whic should open the calendar/notifications widget. Every
> hit of this keybinding additionally leads to a JS stack trace in the
> gnome journal.

> This fix doesn't bring back the functionality, i.e. keybindigs are
> still not working (I know about Super+V and Super+S), but it removes
> the annoying stack trace.

[PR #14]: #14
  • Loading branch information
smichel17 authored Jul 9, 2022
2 parents 083cab3 + c964f3d commit 102ca56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tiling.js
Original file line number Diff line number Diff line change
Expand Up @@ -3283,6 +3283,9 @@ function slurp(metaWindow) {
}

function barf(metaWindow) {
if (!metaWindow)
return;

let space = spaces.spaceOfWindow(metaWindow);
let index = space.indexOf(metaWindow);
if (index === -1)
Expand Down

0 comments on commit 102ca56

Please sign in to comment.