|
@@ -93,6 +93,7 @@ type Door struct {
|
|
|
Config DropfileConfig
|
|
|
READFD int
|
|
|
WRITEFD int
|
|
|
+<<<<<<< Updated upstream
|
|
|
Disconnected bool
|
|
|
TimeOut time.Time
|
|
|
StartTime time.Time
|
|
@@ -140,6 +141,46 @@ func (d *Door) GetCursorPos() (CursorPos, bool) {
|
|
|
return ArrayDelete(&d.LastCursor, 0)
|
|
|
}
|
|
|
|
|
|
+func (d *Door) ClearMouseCursor() {
|
|
|
+ d.mcMutex.Lock()
|
|
|
+ defer d.mcMutex.Unlock()
|
|
|
+ d.LastMouse = make([]Mouse, 0, 2)
|
|
|
+ d.LastCursor = make([]CursorPos, 0, 3)
|
|
|
+=======
|
|
|
+ Disconnected int32
|
|
|
+ TimeOut time.Time
|
|
|
+ StartTime time.Time
|
|
|
+ Pushback FIFOBuffer
|
|
|
+ MouseOn int
|
|
|
+ LastMouse []Mouse
|
|
|
+ LastCursor []CursorPos
|
|
|
+ mcMutex sync.Mutex
|
|
|
+ LastColor []int
|
|
|
+ readerChannel chan byte
|
|
|
+ ReaderCanClose bool
|
|
|
+ writerChannel chan string
|
|
|
+ closeChannel chan struct{}
|
|
|
+ wg sync.WaitGroup
|
|
|
+>>>>>>> Stashed changes
|
|
|
+}
|
|
|
+
|
|
|
+func (d *Door) AddMouse(mouse Mouse) {
|
|
|
+ d.mcMutex.Lock()
|
|
|
+ defer d.mcMutex.Unlock()
|
|
|
+ d.LastMouse = append(d.LastMouse, mouse)
|
|
|
+}
|
|
|
+func (d *Door) GetMouse() (Mouse, bool) {
|
|
|
+ d.mcMutex.Lock()
|
|
|
+ defer d.mcMutex.Unlock()
|
|
|
+ return ArrayDelete(&d.LastMouse, 0)
|
|
|
+}
|
|
|
+
|
|
|
+func (d *Door) GetCursorPos() (CursorPos, bool) {
|
|
|
+ d.mcMutex.Lock()
|
|
|
+ defer d.mcMutex.Unlock()
|
|
|
+ return ArrayDelete(&d.LastCursor, 0)
|
|
|
+}
|
|
|
+
|
|
|
func (d *Door) ClearMouseCursor() {
|
|
|
d.mcMutex.Lock()
|
|
|
defer d.mcMutex.Unlock()
|