Skip to content

Commit

Permalink
stop tracking focus state in window{}
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Dec 10, 2016
1 parent 8702700 commit 5a01128
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions window.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
const create = id => ({
id,
workspace: null,
shown: false,
focused: false
shown: false
})

const show = window => {
if (!window) return
global.X.MapWindow(window.id)
window.shown = true
}

const hide = window => {
if (!window) return
global.X.UnmapWindow(window.id)
window.shown = false
}

const focus = window => {
global.X.SetInputFocus(window.id)
// todo: how does this get unset
// is it even the job of the window to maintain this?
window.focused = true
}

export {create, show, hide, focus}

0 comments on commit 5a01128

Please sign in to comment.