From 0d6335ebcd06377d8d66a804db72c04591961bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 30 Jan 2022 01:23:05 +0100 Subject: [PATCH] fileChooserDialog use keypress. --- internal/desktop/filechooserdialog.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/internal/desktop/filechooserdialog.go b/internal/desktop/filechooserdialog.go index b10f76a8..339168a4 100644 --- a/internal/desktop/filechooserdialog.go +++ b/internal/desktop/filechooserdialog.go @@ -3,7 +3,8 @@ package desktop import ( "errors" "os/exec" - "time" + + "demodesk/neko/internal/desktop/xorg" ) // name of the window that is being controlled @@ -76,13 +77,8 @@ func (manager *DesktopManagerCtx) CloseFileChooserDialog() { // custom press Alt + F4 // because xdotool is failing to send proper Alt+F4 - manager.ResetKeys() //nolint - manager.KeyDown(65513) // Alt - //nolint - manager.KeyDown(65473) // F4 - time.Sleep(10 * time.Millisecond) - manager.ResetKeys() + manager.KeyPress(xorg.XK_Alt_L, xorg.XK_F4) mu.Unlock() }