fixed by using XFlush.

This commit is contained in:
Miroslav Šedivý 2023-04-19 00:13:53 +02:00
parent 47a3f6d6fb
commit 466185fc24

View File

@ -9,7 +9,6 @@ import "C"
import ( import (
"strings" "strings"
"time"
"unsafe" "unsafe"
"github.com/kataras/go-events" "github.com/kataras/go-events"
@ -53,10 +52,6 @@ func goXEventConfigureNotify(display *C.Display, window C.Window, name *C.char,
C.XFileChooserHide(display, window) C.XFileChooserHide(display, window)
// Because first dialog is not put properly to background
time.Sleep(10 * time.Millisecond)
C.XFileChooserHide(display, window)
if file_chooser_dialog_window == 0 { if file_chooser_dialog_window == 0 {
file_chooser_dialog_window = uint32(window) file_chooser_dialog_window = uint32(window)
Emmiter.Emit("file-chooser-dialog-opened") Emmiter.Emit("file-chooser-dialog-opened")