Skip to content

Commit

Permalink
avoid crash when WM_CLASS has gone awol
Browse files Browse the repository at this point in the history
  • Loading branch information
geomat0101 committed Apr 14, 2023
1 parent d33522e commit 4b268db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (c Client) Restore() {
c.MoveResize(geom.X(), geom.Y(), geom.Width(), geom.Height())
}

// Activate makes the client the currently active window
// Activate makes the client the currently active window
func (c Client) Activate() {
ewmh.ActiveWindowReq(state.X, c.window.Id)
}
Expand Down Expand Up @@ -148,6 +148,7 @@ func shouldIgnore(w xproto.Window) bool {
c, err := icccm.WmClassGet(state.X, w)
if err != nil {
log.Warn(err)
return true // c is nil and can't be used below
}

for _, s := range Config.WindowsToIgnore {
Expand Down

0 comments on commit 4b268db

Please sign in to comment.