Преглед на файлове

Updated comments on WantGetMouse.

Steve Thielemann преди 1 година
родител
ревизия
66e3d1c37b
променени са 1 файла, в които са добавени 2 реда и са изтрити 8 реда
  1. 2 8
      door/input.go

+ 2 - 8
door/input.go

@@ -459,16 +459,9 @@ func process(d *Door, newRune bool) {
 }
 
 func (d *Door) WaitKey(timeout time.Duration) (rune, Extended, error) {
-	/*
-		d.readerMutex.Lock()
-		if d.ReaderClosed {
-			d.readerMutex.Unlock()
-			return 0, NOP, ErrDisconnected
-		}
-		d.readerMutex.Unlock()
-	*/
 
 	if WantGetMouse {
+		// Call GetMouse().
 		d.GetMouse()
 	}
 	// Probably faster to just read from closed channel and get ok = false.
@@ -481,6 +474,7 @@ func (d *Door) WaitKey(timeout time.Duration) (rune, Extended, error) {
 			}
 			// return bio.GetKey()
 			if r.Ex == MOUSE {
+				// We want GetMouse() called.
 				WantGetMouse = true
 			}
 			return r.R, r.Ex, r.Err