cursor position bypass desktop module.

This commit is contained in:
Miroslav Šedivý
2021-02-28 18:50:32 +01:00
parent 66618b9e62
commit 663270b0f5
6 changed files with 11 additions and 27 deletions

View File

@ -9,21 +9,8 @@ import (
"demodesk/neko/internal/types"
)
// TODO: Refactor.
var cursorListeners []func(x, y int)
func (manager *DesktopManagerCtx) Move(x, y int) {
xorg.Move(x, y)
// TODO: Refactor.
for _, listener := range cursorListeners {
listener(x, y)
}
}
// TODO: Refactor.
func (manager *DesktopManagerCtx) OnCursorPosition(listener func(x, y int)) {
cursorListeners = append(cursorListeners, listener)
}
func (manager *DesktopManagerCtx) GetCursorPosition() (int, int) {