io/pointer: added the grab cursor

Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
pierre
2021-02-07 20:48:30 +01:00
committed by Elias Naur
parent 6682f75db9
commit a581acf3fd
7 changed files with 22 additions and 7 deletions
+4 -1
View File
@@ -118,10 +118,13 @@ func (w *x11Window) WriteClipboard(s string) {
}
func (w *x11Window) SetCursor(name pointer.CursorName) {
if name == pointer.CursorNone {
switch name {
case pointer.CursorNone:
w.cursor = name
C.XFixesHideCursor(w.x, w.xw)
return
case pointer.CursorGrab:
name = "hand1"
}
if w.cursor == pointer.CursorNone {
C.XFixesShowCursor(w.x, w.xw)