mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fileChooserDialog use keypress.
This commit is contained in:
parent
b261217cbe
commit
0d6335ebcd
@ -3,7 +3,8 @@ package desktop
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
|
||||||
|
"demodesk/neko/internal/desktop/xorg"
|
||||||
)
|
)
|
||||||
|
|
||||||
// name of the window that is being controlled
|
// name of the window that is being controlled
|
||||||
@ -76,13 +77,8 @@ func (manager *DesktopManagerCtx) CloseFileChooserDialog() {
|
|||||||
// custom press Alt + F4
|
// custom press Alt + F4
|
||||||
// because xdotool is failing to send proper Alt+F4
|
// because xdotool is failing to send proper Alt+F4
|
||||||
|
|
||||||
manager.ResetKeys()
|
|
||||||
//nolint
|
//nolint
|
||||||
manager.KeyDown(65513) // Alt
|
manager.KeyPress(xorg.XK_Alt_L, xorg.XK_F4)
|
||||||
//nolint
|
|
||||||
manager.KeyDown(65473) // F4
|
|
||||||
time.Sleep(10 * time.Millisecond)
|
|
||||||
manager.ResetKeys()
|
|
||||||
|
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user