From 832968e8fc0cd12bd086abe91fd92bb3401ec794 Mon Sep 17 00:00:00 2001 From: m1k1o Date: Sun, 21 Jun 2020 03:05:58 +0200 Subject: [PATCH] fix naming convention --- server/internal/remote/manager.go | 4 ++-- server/internal/types/remote.go | 2 +- server/internal/websocket/control.go | 2 +- server/internal/xorg/xorg.c | 2 +- server/internal/xorg/xorg.go | 4 ++-- server/internal/xorg/xorg.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/server/internal/remote/manager.go b/server/internal/remote/manager.go index fe4413fb..c646a39e 100644 --- a/server/internal/remote/manager.go +++ b/server/internal/remote/manager.go @@ -219,6 +219,6 @@ func (manager *RemoteManager) GetScreenSize() *types.ScreenSize { return xorg.GetScreenSize() } -func (manager *RemoteManager) SetKeyboard(layout string) { - xorg.SetKeyboard(layout) +func (manager *RemoteManager) SetKeyboardLayout(layout string) { + xorg.SetKeyboardLayout(layout) } \ No newline at end of file diff --git a/server/internal/types/remote.go b/server/internal/types/remote.go index 4b6453be..d2b0e36e 100644 --- a/server/internal/types/remote.go +++ b/server/internal/types/remote.go @@ -22,5 +22,5 @@ type RemoteManager interface { ReadClipboard() string WriteClipboard(data string) ResetKeys() - SetKeyboard(layout string) + SetKeyboardLayout(layout string) } diff --git a/server/internal/websocket/control.go b/server/internal/websocket/control.go index 234c5d06..7a2ffff9 100644 --- a/server/internal/websocket/control.go +++ b/server/internal/websocket/control.go @@ -123,6 +123,6 @@ func (h *MessageHandler) controlKeyboard(id string, session types.Session, paylo return nil } - h.remote.SetKeyboard(payload.Layout) + h.remote.SetKeyboardLayout(payload.Layout) return nil } diff --git a/server/internal/xorg/xorg.c b/server/internal/xorg/xorg.c index 3868f5d2..d49c3939 100644 --- a/server/internal/xorg/xorg.c +++ b/server/internal/xorg/xorg.c @@ -166,7 +166,7 @@ short XGetScreenRate() { return XRRConfigCurrentRate(conf); } -void SetKeyboard(char *layout) { +void SetKeyboardLayout(char *layout) { // TOOD: refactor, use native API. char cmd[13] = "setxkbmap "; strncat(cmd, layout, 2); diff --git a/server/internal/xorg/xorg.go b/server/internal/xorg/xorg.go index 200294cc..5280a8ef 100644 --- a/server/internal/xorg/xorg.go +++ b/server/internal/xorg/xorg.go @@ -211,7 +211,7 @@ func GetScreenSize() *types.ScreenSize { return nil } -func SetKeyboard(layout string) { +func SetKeyboardLayout(layout string) { mu.Lock() defer mu.Unlock() @@ -222,7 +222,7 @@ func SetKeyboard(layout string) { layoutUnsafe := C.CString(layout) defer C.free(unsafe.Pointer(layoutUnsafe)) - C.SetKeyboard(layoutUnsafe) + C.SetKeyboardLayout(layoutUnsafe) } //export goCreateScreenSize diff --git a/server/internal/xorg/xorg.h b/server/internal/xorg/xorg.h index 24384c48..cf0cd3e8 100644 --- a/server/internal/xorg/xorg.h +++ b/server/internal/xorg/xorg.h @@ -39,6 +39,6 @@ void XDisplayClose(void); void XDisplaySet(char *input); - void SetKeyboard(char *layout); + void SetKeyboardLayout(char *layout); #endif