mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
cursor position bypass desktop module.
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user