mirror of
https://github.com/jahruz67/wisp-open.git
synced 2026-08-08 18:14:08 +00:00
14.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//go:build linux
|
||||
|
||||
package hotkey
|
||||
|
||||
import "errors"
|
||||
|
||||
func (hk *Hotkey) register() error {
|
||||
return hk.registerPortal()
|
||||
}
|
||||
|
||||
func (hk *Hotkey) unregister() error {
|
||||
hk.mu.Lock()
|
||||
if !hk.registered {
|
||||
hk.mu.Unlock()
|
||||
return errors.New("hotkey is not registered.")
|
||||
}
|
||||
hk.registered = false
|
||||
hk.mu.Unlock()
|
||||
return hk.cleanupPortal()
|
||||
}
|
||||
Reference in New Issue
Block a user