mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
desktop single mutex shared gtk.
This commit is contained in:
parent
d3340ad085
commit
a6afccd079
@ -10,6 +10,9 @@ const (
|
||||
)
|
||||
|
||||
func (manager *DesktopManagerCtx) DropFiles(x int, y int, files []string) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
|
||||
go gtk.DragWindow(files)
|
||||
|
||||
// TODO: Find a bettter way.
|
||||
|
@ -3,6 +3,7 @@ package desktop
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
"sync"
|
||||
|
||||
"github.com/kataras/go-events"
|
||||
"github.com/rs/zerolog"
|
||||
@ -12,6 +13,8 @@ import (
|
||||
"demodesk/neko/internal/desktop/xorg"
|
||||
)
|
||||
|
||||
var mu = sync.Mutex{}
|
||||
|
||||
type DesktopManagerCtx struct {
|
||||
logger zerolog.Logger
|
||||
cleanup *time.Ticker
|
||||
|
@ -1,14 +1,10 @@
|
||||
package desktop
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"demodesk/neko/internal/types"
|
||||
"demodesk/neko/internal/desktop/xorg"
|
||||
)
|
||||
|
||||
var mu = sync.Mutex{}
|
||||
|
||||
func (manager *DesktopManagerCtx) Move(x, y int) {
|
||||
xorg.Move(x, y)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user