From 071062fe7721ac1c23be6faf5d26223f019dbb3d Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 20 Feb 2020 18:50:42 +0100 Subject: [PATCH 001/210] Minor HTML improvements --- bindata.generated.go | 4 ++-- webdata/index.html | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bindata.generated.go b/bindata.generated.go index f5e8a00..02c80aa 100644 --- a/bindata.generated.go +++ b/bindata.generated.go @@ -144,7 +144,7 @@ func webdataIconWoff() (*asset, error) { return a, nil } -var _webdataIndexHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x92\xbf\x6e\x13\x41\x10\xc6\x7b\x3f\xc5\x66\x6b\xec\x03\x24\x10\xc5\xed\x49\x28\x49\x01\x0d\x08\x82\x04\xe5\x78\x77\xec\x5b\xb2\xff\xd8\x9d\xbb\xc4\x2f\x00\x02\x21\xd1\x50\x50\x81\x04\x14\x34\xfc\xe9\x79\x1b\x9e\x80\x47\x40\x77\xeb\xf8\x8c\x13\x5b\x41\x54\xa7\x9d\xf9\x3e\xfd\xbe\x9b\x99\x72\xef\xe0\xde\xfe\xd1\x93\xfb\x87\xac\x26\x6b\xaa\x51\xd9\x7d\x98\x01\x37\x17\x1c\x1d\xaf\x46\xa3\xd2\x22\x01\x93\x35\xc4\x84\x24\x78\x43\xb3\xf1\x2d\xce\x8a\x6a\xd9\x70\x60\x51\xf0\x56\xe3\x49\xf0\x91\x38\x93\xde\x11\x3a\x12\xfc\x44\x2b\xaa\x85\xc2\x56\x4b\x1c\xf7\x0f\xa6\x9d\x26\x0d\x66\x9c\x24\x18\x14\xd7\xae\x30\x0b\xa7\xda\x36\x76\x28\x34\x09\x63\xff\x82\xa9\x41\x71\x75\x8d\x53\x13\x85\x31\x3e\x6b\x74\x2b\xf8\xe3\xf1\xa3\xdb\xe3\x7d\x6f\x03\x90\x9e\x1a\x5c\x83\xde\x39\x14\xa8\xe6\x98\x7d\x49\x46\x1d\x88\xa5\x28\x05\x9f\xb9\xc9\xd3\xc4\xab\xb2\xc8\xc5\x8d\x6e\xaa\xe1\xfa\x8d\x9b\x9b\x0a\xd2\x64\xb0\x7a\x80\xd6\x13\xb2\x23\xdf\xc8\x3a\x80\x2a\x8b\x5c\x1e\x95\x46\xbb\x63\x56\x47\x9c\x09\x6e\x41\xbb\x89\x4c\x89\x33\x8b\x4a\x83\xe0\x49\x46\x44\xc7\x59\x44\x23\x78\xa2\x85\xc1\x54\x23\x52\xce\xb5\x66\xd4\xd2\xbb\x49\x70\x73\xce\x68\x11\x50\x70\x6d\x61\x8e\x45\x5f\xc8\xd6\xda\x47\x92\x0d\xb1\x4e\xd8\xbb\x47\xa5\xd2\x2d\xd3\x4a\x70\x1f\xd0\x69\x37\xe7\xd5\x88\x31\xc6\xca\x50\xed\x7b\xe7\x50\x92\x76\xf3\xc9\x64\x52\x16\x61\xd9\x70\x7e\xf9\x47\x65\xa8\xee\x42\x0b\x0f\xf3\x8f\xeb\xc4\x62\x37\xcf\x88\x6a\xaf\x13\x97\xc5\x4a\x38\x2a\x0b\xa5\xdb\x6a\x40\x49\xe3\x13\x2a\xce\xa4\x81\x94\x04\xaf\xb5\x52\xfd\x71\x2c\xc1\x07\x3a\xc9\xcc\x46\x35\x70\xa7\x0d\x91\x77\xbd\x3f\xa2\xf1\xa0\x72\x81\x57\xbf\x9e\xff\x2c\x8b\xfc\x38\x8f\x0a\xb0\x8d\xd3\x29\x96\x8d\x6c\x4e\xcb\xce\x26\xed\x18\x17\x69\xc5\x7a\xf7\x63\x60\xf5\xc2\xcc\xcb\xc9\xcf\x88\x06\xa6\x68\x78\x35\xec\x38\xfc\x2b\x73\xd6\x18\x93\x97\xbe\x22\x7f\xfe\xf8\x37\xf9\x82\x98\x53\x0f\x71\x18\xcb\xeb\x2f\x17\x46\xdd\x9c\xd0\x99\x6f\xcb\x98\x08\x4f\x09\x22\x42\xaf\xed\x1e\xdd\x4d\x9f\x15\xcf\xaf\x26\xa1\x1b\x12\xbc\xff\xb4\x7d\x31\xdd\x54\xff\x77\x33\x21\x62\x4b\x11\xe4\xf1\x8a\xf8\xe6\xdb\xee\x21\x05\x03\x8b\x00\x4d\xc2\xc1\xf1\x7d\xb7\xc3\xe1\x29\x6d\x30\xbe\x6e\x3f\x81\x4b\x47\x6f\xbd\x69\x2c\x2a\x7f\xb2\x5a\xf0\xef\x0f\x6f\x5f\xee\x8e\x92\x3d\xb6\x21\x5c\xf3\xbc\xb8\x8c\xa7\x09\x6b\x8e\x57\xbb\xce\xe2\x4f\x00\x00\x00\xff\xff\x46\xf9\xea\xef\xc1\x05\x00\x00") +var _webdataIndexHtml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x92\xbd\x6e\xd4\x40\x10\xc7\xfb\x7b\x8a\xcd\xd4\xb9\x33\x20\x81\x28\xbc\x96\x50\x92\x02\x1a\x10\x04\x09\xca\xb9\xdd\xb9\xf3\x92\xf5\xee\xb2\x3b\x76\x72\x2f\x00\x02\x21\xd1\x50\x50\x81\x04\x14\x34\x7c\xf4\xbc\x0d\x4f\xc0\x23\x20\xdb\x97\x73\x72\xc9\x9d\x82\xa8\xac\xf9\xf8\xfb\x37\xfb\x9f\xc9\x77\xf6\xef\xef\x1d\x3e\x7d\x70\x20\x4a\xae\x6c\x31\xca\xdb\x8f\xb0\xe8\xe6\x12\xc8\x41\x31\x1a\xe5\x15\x31\x0a\x55\x62\x4c\xc4\x12\x6a\x9e\x8d\x6f\x43\xb1\x4c\x3b\xac\x48\x42\x63\xe8\x38\xf8\xc8\x20\x94\x77\x4c\x8e\x25\x1c\x1b\xcd\xa5\xd4\xd4\x18\x45\xe3\x2e\xd8\x15\xc6\x19\x36\x68\xc7\x49\xa1\x25\x79\x7d\x57\xd4\x89\x62\x17\xe1\xd4\x92\xbc\xb6\xfa\x6b\xc9\x1c\xc6\xf4\xbc\x36\x8d\x84\x27\xe3\xc7\x77\xc6\x7b\xbe\x0a\xc8\x66\x6a\xe9\x0c\xe2\xee\x81\x24\x3d\xa7\x56\x95\x54\x34\x81\x45\x8a\x4a\xc2\xcc\x4d\x9e\x25\x28\xf2\xac\x4f\xae\x55\x53\x89\x37\x6e\xde\x5a\xef\x60\xc3\x96\x8a\x87\x54\x79\x26\x71\xe8\x6b\x55\x06\xd4\x79\xd6\xa7\x47\xb9\x35\xee\x48\x94\x91\x66\x12\x2a\x34\x6e\xa2\x52\x02\x51\x91\x36\x28\x21\xa9\x48\xe4\x40\x44\xb2\x12\x12\x2f\x2c\xa5\x92\x88\xe1\xbc\xcc\x28\xef\x26\xc1\xcd\x41\xf0\x22\x90\x04\x53\xe1\x9c\xb2\x2e\xd1\x0b\x4b\x1f\x59\xd5\x2c\xda\xc6\xce\x75\x6d\x1a\x61\xb4\x04\x1f\xc8\x19\x37\x87\x62\x24\x84\x10\x79\x28\xf6\xbc\x73\xa4\xd8\xb8\xf9\x64\x32\xc9\xb3\xb0\x2c\x38\xbf\x7c\x4d\x1e\x8a\x7b\xd8\xe0\xa3\xfe\xd1\x26\x89\xd8\x3a\x19\x49\xef\xb4\xcd\x79\xb6\x6a\x1c\xe5\x99\x36\x4d\x31\xa0\x94\xf5\x89\x34\x08\x65\x31\x25\x09\xa5\xd1\xba\x3b\x81\x25\x78\xdf\x24\xd5\xb3\x49\x0f\xdc\x69\xcd\xec\x5d\xa7\x8f\x64\x3d\xea\x3e\x01\xc5\xef\x17\xbf\xf2\xac\x0f\x2e\xa2\x02\x6e\xe2\xb4\x1d\xcb\x42\x2f\x4e\xcb\xca\x3a\xed\x88\x16\x69\xc5\x7a\xff\x73\x60\x75\x8d\x3d\xaf\x9f\xfc\x94\x68\x71\x4a\x16\x8a\x61\xbf\xe1\x5f\x99\xb3\xda\xda\x7e\xe1\x2b\xf2\x97\x4f\xe7\xc9\x97\x8c\x39\xf5\x18\x07\x5b\xde\x7c\xbd\x74\xd4\x75\x87\x4e\x75\x1b\x6c\x62\x3a\x61\x8c\x84\x5d\x6f\x1b\xb4\xf7\x7c\x9a\xbc\xb8\x9a\x44\x6e\x98\xe0\xc3\xe7\xcd\x8b\x69\x5d\xfd\xdf\xcd\x84\x48\x0d\x47\x54\x47\x2b\xe2\xdb\xef\xdb\x4d\x0a\x16\x17\x01\xeb\x44\x83\xe2\xc7\x76\x85\xa3\x13\x5e\x63\x7c\xdb\x7c\x02\x57\x1e\xbd\xf1\xb6\xae\x48\xfb\xe3\xd5\x82\xff\x7c\x7c\xf7\x6a\xfb\x28\xbd\xa6\xaa\x99\xce\x68\x5e\x5e\x45\x53\x87\x33\x8a\xd7\xdb\xce\xe2\x6f\x00\x00\x00\xff\xff\xf5\x4b\x18\x76\xa7\x05\x00\x00") func webdataIndexHtmlBytes() ([]byte, error) { return bindataRead( @@ -159,7 +159,7 @@ func webdataIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "webdata/index.html", size: 1473, mode: os.FileMode(436), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "webdata/index.html", size: 1447, mode: os.FileMode(436), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/webdata/index.html b/webdata/index.html index 8297a34..f7aed29 100644 --- a/webdata/index.html +++ b/webdata/index.html @@ -1,14 +1,14 @@ - - - + + + Remote Touchpad - - + +

Connecting...

From afcfa8a67acded1d956a3719ea11b0cf4bd1e308 Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 20 Feb 2020 18:53:16 +0100 Subject: [PATCH 002/210] Bump version to 0.0.17 --- CHANGELOG.md | 4 ++++ .../com.github.unrud.RemoteTouchpad.appdata.xml | 15 +++++++++++---- main.go | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19e45ce..cfdc6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.0.17 (2020-02-20) + + * Minor HTML improvements + ## 0.0.16 (2020-02-17) * Fix textarea on WebKit diff --git a/desktop/com.github.unrud.RemoteTouchpad.appdata.xml b/desktop/com.github.unrud.RemoteTouchpad.appdata.xml index 00742a6..a71f5d1 100644 --- a/desktop/com.github.unrud.RemoteTouchpad.appdata.xml +++ b/desktop/com.github.unrud.RemoteTouchpad.appdata.xml @@ -19,6 +19,13 @@ https://github.com/Unrud/remote-touchpad Unrud + + +
    +
  • Minor HTML improvements
  • +
+
+
    @@ -145,16 +152,16 @@ - https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.16/screenshots/1.png + https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.17/screenshots/1.png - https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.16/screenshots/2.png + https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.17/screenshots/2.png - https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.16/screenshots/3.png + https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.17/screenshots/3.png - https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.16/screenshots/4.png + https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.17/screenshots/4.png diff --git a/main.go b/main.go index b8d63e1..e537554 100644 --- a/main.go +++ b/main.go @@ -45,7 +45,7 @@ const ( authenticationRateBurst int = 10 challengeLength int = 8 defaultBind string = ":0" - version string = "0.0.16" + version string = "0.0.17" pretty_app_name string = "Remote Touchpad" ) From 049d79448cf6de4326a045065af802ef3cebe5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=20Lin=29?= Date: Sun, 1 Mar 2020 15:07:40 +0800 Subject: [PATCH 003/210] Snap: Fix license top-level property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Snapcraft uses SPDX 2.1 syntax[1], which allows specifying "or later" license style by appending a `+` operator after the license expression. Refer Appendix IV: SPDX License Expressions[2] for more info regarding this syntax. [1] https://spdx.org/spdx-specification-21-web-version [2] https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60 Refer-to: license - Snapcraft top-level metadata - doc - snapcraft.io Signed-off-by: 林博仁(Buo-ren Lin) --- snap/snapcraft.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 295d457..35e7943 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,5 @@ name: remote-touchpad -# WORKAROUND: Snapcraft doesn't accept GPL-3.0-or-later -license: GPL-3.0 +license: GPL-3.0+ grade: stable adopt-info: remote-touchpad From 08b852f8360612df3c9444130de48b3abaa453cb Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 30 Apr 2020 13:29:01 +0200 Subject: [PATCH 004/210] Update dependencies --- flatpak/com.github.unrud.RemoteTouchpad.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flatpak/com.github.unrud.RemoteTouchpad.yaml b/flatpak/com.github.unrud.RemoteTouchpad.yaml index 33f190e..9c4a3dd 100644 --- a/flatpak/com.github.unrud.RemoteTouchpad.yaml +++ b/flatpak/com.github.unrud.RemoteTouchpad.yaml @@ -14,7 +14,7 @@ modules: sources: - type: git url: https://github.com/golang/net - commit: 16171245cfb220d5317888b716d69c1fb4e7992b + commit: ff2c4b7c35a07b0c1e90ce72aa7bfe41bb66a3cb dest: src/golang.org/x/net - type: git url: https://github.com/skip2/go-qrcode @@ -26,7 +26,7 @@ modules: dest: src/github.com/elazarl/go-bindata-assetfs - type: git url: https://salsa.debian.org/go-team/packages/golang-dbus.git - commit: 23d235ce6d5fee2616e6c9325987ef9cdf14ef23 + commit: ed647c482535c2296517ff0c45d8bdcb5efce458 dest: src/salsa.debian.org/go-team/packages/golang-dbus.git - type: git path: .. From fad0e2d7c021612e9bffb326432156ec25c04e22 Mon Sep 17 00:00:00 2001 From: Stefano Mersi Date: Sat, 2 May 2020 13:18:36 +0200 Subject: [PATCH 005/210] Update main.go --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e537554..b95a179 100644 --- a/main.go +++ b/main.go @@ -164,10 +164,10 @@ func main() { return } if certFile != "" && keyFile == "" { - log.Fatal("TLS certificate missing") + log.Fatal("TLS private key file missing") } if certFile == "" && keyFile != "" { - log.Fatal("TLS private key missing") + log.Fatal("TLS certificate file missing") } tls := certFile != "" && keyFile != "" if secret == "" { From b432b9541357e773e11248e359ef1ab911d9b40c Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 17 May 2020 03:11:49 +0200 Subject: [PATCH 006/210] Update dependencies --- flatpak/com.github.unrud.RemoteTouchpad.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flatpak/com.github.unrud.RemoteTouchpad.yaml b/flatpak/com.github.unrud.RemoteTouchpad.yaml index 9c4a3dd..9839211 100644 --- a/flatpak/com.github.unrud.RemoteTouchpad.yaml +++ b/flatpak/com.github.unrud.RemoteTouchpad.yaml @@ -14,7 +14,7 @@ modules: sources: - type: git url: https://github.com/golang/net - commit: ff2c4b7c35a07b0c1e90ce72aa7bfe41bb66a3cb + commit: a91f0712d120a21e49061d61eb6ba9b88cb0d376 dest: src/golang.org/x/net - type: git url: https://github.com/skip2/go-qrcode @@ -22,7 +22,7 @@ modules: dest: src/github.com/skip2/go-qrcode - type: git url: https://github.com/elazarl/go-bindata-assetfs - commit: d0111fe6fb11d467f8aa090457c2edaa4a2d7bab + commit: 234c15e7648ff35458026de92b34c637bae5e6f7 dest: src/github.com/elazarl/go-bindata-assetfs - type: git url: https://salsa.debian.org/go-team/packages/golang-dbus.git From 7c0d47539403bdf9dba26be79f165f056e58db93 Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 17 May 2020 03:12:19 +0200 Subject: [PATCH 007/210] Bump version to 0.0.18 --- CHANGELOG.md | 4 ++++ .../com.github.unrud.RemoteTouchpad.appdata.xml | 15 +++++++++++---- main.go | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfdc6d6..081a947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.0.18 (2020-05-16) + + * Fix error messages for TLS certificate and private key files + ## 0.0.17 (2020-02-20) * Minor HTML improvements diff --git a/desktop/com.github.unrud.RemoteTouchpad.appdata.xml b/desktop/com.github.unrud.RemoteTouchpad.appdata.xml index a71f5d1..87218c8 100644 --- a/desktop/com.github.unrud.RemoteTouchpad.appdata.xml +++ b/desktop/com.github.unrud.RemoteTouchpad.appdata.xml @@ -19,6 +19,13 @@ https://github.com/Unrud/remote-touchpad Unrud + + +
      +
    • Fix error messages for TLS certificate and private key files
    • +
    +
    +
      @@ -152,16 +159,16 @@ - https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.17/screenshots/1.png + https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.18/screenshots/1.png - https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.17/screenshots/2.png + https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.18/screenshots/2.png - https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.17/screenshots/3.png + https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.18/screenshots/3.png - https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.17/screenshots/4.png + https://raw.githubusercontent.com/Unrud/remote-touchpad/0.0.18/screenshots/4.png diff --git a/main.go b/main.go index b95a179..5475122 100644 --- a/main.go +++ b/main.go @@ -45,7 +45,7 @@ const ( authenticationRateBurst int = 10 challengeLength int = 8 defaultBind string = ":0" - version string = "0.0.17" + version string = "0.0.18" pretty_app_name string = "Remote Touchpad" ) From bd376578d4631217588b2d275cfdf8831987132b Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 16 Aug 2020 10:06:57 +0200 Subject: [PATCH 008/210] Snap: Update --- snap/snapcraft.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 35e7943..93e34f5 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,3 +1,9 @@ +# Build by running "snapcraft". + +# WARNING: +# Snapcraft uses caching for already build steps but it's buggy and can cause strange problems. +# Clean the cache by running "snapcraft clean". + name: remote-touchpad license: GPL-3.0+ grade: stable @@ -31,6 +37,7 @@ parts: source-type: git build-packages: - gcc + - libc6-dev - libxt-dev - libxtst-dev stage-packages: @@ -41,7 +48,7 @@ parts: # WORKAROUND: Snapcraft Go Plugin doesn't set buildtags for go-get GOPATH="$(realpath "${SNAPCRAFT_PART_SRC}/../go")" env --chdir="$GOPATH/src" GOPATH="$GOPATH" go get -t -d -tags 'portal x11' ./github.com/Unrud/remote-touchpad/... - # WORKAROUND: Point icon to the correct location + # WORKAROUND: Point icon directly to high resolution version otherwise snapcraft automatically chooses lowest resolution sed -e 's|Icon=com.github.unrud.RemoteTouchpad|Icon=/usr/share/icons/hicolor/512x512/apps/com.github.unrud.RemoteTouchpad.png|' -i desktop/com.github.unrud.RemoteTouchpad.desktop override-build: | snapcraftctl build @@ -51,6 +58,4 @@ parts: for s in 64 128 256 512; do install -Dm0644 desktop/remote-touchpad_${s}.png "${SNAPCRAFT_PART_INSTALL}/usr/share/icons/hicolor/${s}x${s}/apps/com.github.unrud.RemoteTouchpad.png" done - # WORKAROUND: Version is not extracted from AppStream - snapcraftctl set-version "$(${SNAPCRAFT_PART_INSTALL}/bin/remote-touchpad --version)" parse-info: [usr/share/metainfo/com.github.unrud.RemoteTouchpad.appdata.xml] From 9ad8590517c79ca3322f5d2d01a9b55eda73b8bf Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 26 Aug 2020 03:30:20 +0200 Subject: [PATCH 009/210] Cosmetics --- backend.go | 4 +- backend_portal.go | 5 +- backend_portal_disabled.go | 4 +- backend_windows.go | 4 +- backend_windows_disabled.go | 4 +- backend_x11.go | 4 +- backend_x11_disabled.go | 4 +- flatpak/com.github.unrud.RemoteTouchpad.yaml | 3 +- host.go | 4 +- keysyms.generator.go | 4 +- keysyms.go | 29 ++++++----- main.go | 4 +- qr.go | 4 +- terminal.go | 4 +- terminal_posix.go | 4 +- terminal_windows.go | 4 +- webdata/fn.js | 55 +++++++++----------- 17 files changed, 70 insertions(+), 74 deletions(-) diff --git a/backend.go b/backend.go index 98f7682..4efea54 100644 --- a/backend.go +++ b/backend.go @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/backend_portal.go b/backend_portal.go index 1f1bc6f..3de18ef 100644 --- a/backend_portal.go +++ b/backend_portal.go @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main @@ -35,6 +35,7 @@ const ( btnReleased uint32 = 0 btnPressed uint32 = 1 + // linux/input-event-codes.h btnLeft int32 = 0x110 btnRight int32 = 0x111 btnMiddle int32 = 0x112 diff --git a/backend_portal_disabled.go b/backend_portal_disabled.go index 499d5f5..05ca72f 100644 --- a/backend_portal_disabled.go +++ b/backend_portal_disabled.go @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/backend_windows.go b/backend_windows.go index 2b25cc7..78574e0 100644 --- a/backend_windows.go +++ b/backend_windows.go @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/backend_windows_disabled.go b/backend_windows_disabled.go index 5d902ea..b0051b0 100644 --- a/backend_windows_disabled.go +++ b/backend_windows_disabled.go @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/backend_x11.go b/backend_x11.go index 6749408..ad3445b 100644 --- a/backend_x11.go +++ b/backend_x11.go @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/backend_x11_disabled.go b/backend_x11_disabled.go index 8a68e22..11a8234 100644 --- a/backend_x11_disabled.go +++ b/backend_x11_disabled.go @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/flatpak/com.github.unrud.RemoteTouchpad.yaml b/flatpak/com.github.unrud.RemoteTouchpad.yaml index 9839211..ad9276c 100644 --- a/flatpak/com.github.unrud.RemoteTouchpad.yaml +++ b/flatpak/com.github.unrud.RemoteTouchpad.yaml @@ -34,8 +34,7 @@ modules: dest: src/github.com/unrud/remote-touchpad buildsystem: simple build-commands: - - . /usr/lib/sdk/golang/enable.sh; env GOPATH="$(pwd)" go build -tags 'portal x11' - github.com/unrud/remote-touchpad + - . /usr/lib/sdk/golang/enable.sh; env GOPATH="$(pwd)" go build -tags 'portal x11' github.com/unrud/remote-touchpad - install -Dm0755 -t /app/bin remote-touchpad - install -Dm0755 -t /app/bin src/github.com/unrud/remote-touchpad/desktop/remote-touchpad-wait-on-error - install -Dm0644 -t /app/share/metainfo src/github.com/unrud/remote-touchpad/desktop/com.github.unrud.RemoteTouchpad.appdata.xml diff --git a/host.go b/host.go index 2e622a8..14ed821 100644 --- a/host.go +++ b/host.go @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/keysyms.generator.go b/keysyms.generator.go index 17340be..74d479d 100644 --- a/keysyms.generator.go +++ b/keysyms.generator.go @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/keysyms.go b/keysyms.go index a81dfd9..dbafa70 100644 --- a/keysyms.go +++ b/keysyms.go @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main @@ -26,12 +26,13 @@ import "errors" type Keysym int32 const ( - xf86AudioLowerVolume Keysym = 0x1008ff11 - xf86AudioMute Keysym = 0x1008ff12 - xf86AudioRaiseVolume Keysym = 0x1008ff13 - xf86AudioPlay Keysym = 0x1008ff14 - xf86AudioPrev Keysym = 0x1008ff16 - xf86AudioNext Keysym = 0x1008ff17 + // X11/XF86keysym.h + xf86xkAudioLowerVolume Keysym = 0x1008ff11 + xf86xkAudioMute Keysym = 0x1008ff12 + xf86xkAudioRaiseVolume Keysym = 0x1008ff13 + xf86xkAudioPlay Keysym = 0x1008ff14 + xf86xkAudioPrev Keysym = 0x1008ff16 + xf86xkAudioNext Keysym = 0x1008ff17 ) func RuneToKeysym(runeValue rune) (Keysym, error) { @@ -51,22 +52,22 @@ func RuneToKeysym(runeValue rune) (Keysym, error) { func KeyToKeysym(key Key) (Keysym, error) { if key == KeyVolumeMute { - return xf86AudioMute, nil + return xf86xkAudioMute, nil } if key == KeyVolumeDown { - return xf86AudioLowerVolume, nil + return xf86xkAudioLowerVolume, nil } if key == KeyVolumeUp { - return xf86AudioRaiseVolume, nil + return xf86xkAudioRaiseVolume, nil } if key == KeyMediaPlayPause { - return xf86AudioPlay, nil + return xf86xkAudioPlay, nil } if key == KeyMediaPrevTrack { - return xf86AudioPrev, nil + return xf86xkAudioPrev, nil } if key == KeyMediaNextTrack { - return xf86AudioNext, nil + return xf86xkAudioNext, nil } return 0, errors.New("key not mapped to keysym") } diff --git a/main.go b/main.go index 5475122..4b9d967 100644 --- a/main.go +++ b/main.go @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/qr.go b/qr.go index 3c94b84..aae21db 100644 --- a/qr.go +++ b/qr.go @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/terminal.go b/terminal.go index 86e559c..91de022 100644 --- a/terminal.go +++ b/terminal.go @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/terminal_posix.go b/terminal_posix.go index 1e5ad90..e79ea61 100644 --- a/terminal_posix.go +++ b/terminal_posix.go @@ -15,8 +15,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/terminal_windows.go b/terminal_windows.go index 22c0c3e..5637a7d 100644 --- a/terminal_windows.go +++ b/terminal_windows.go @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ package main diff --git a/webdata/fn.js b/webdata/fn.js index 8c4fa6d..9a018b2 100644 --- a/webdata/fn.js +++ b/webdata/fn.js @@ -13,14 +13,15 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with Remote-Touchpad. If not, see . + * You should have received a copy of the GNU General Public License + * along with Remote-Touchpad. If not, see . */ -// [1 Touch, 2 Touches, 3 Touches] +// [1 Touch, 2 Touches, 3 Touches] (as pixel) const TOUCH_MOVE_THRESHOLD = [10, 15, 15]; +// Max time between consecutive touches for clicking or dragging (as milliseconds) const TOUCH_TIMEOUT = 250; -// [[px/s, mult], ...] +// [[pixel/second, multiplicator], ...] const POINTER_ACCELERATION = [ [0, 0], [87, 1], @@ -311,7 +312,7 @@ window.addEventListener("load", function() { let text = document.getElementById("text"); function showScene(scene) { - [opening, closed, pad, keys, keyboard].forEach(function (e) { + [opening, closed, pad, keys, keyboard].forEach(function(e) { e.classList.toggle("hidden", e != scene); }); } @@ -336,13 +337,10 @@ window.addEventListener("load", function() { text.value = ""; showScene(opening); - let wsProtocol = "wss:"; - if (location.protocol == "http:") { - wsProtocol = "ws:"; - } - ws = new WebSocket(wsProtocol + "//" + location.hostname + - (location.port ? ":" + location.port : "") + - "/ws"); + ws = new WebSocket( + (location.protocol == "http:" ? "ws:" : "wss:") + "//" + location.hostname + + (location.port ? ":" + location.port : "") + "/ws" + ); ws.onmessage = function(evt) { if (authenticated) { @@ -383,23 +381,21 @@ window.addEventListener("load", function() { {id: "volumedownbutton", key: KEY_VOLUME_DOWN}, {id: "volumemutebutton", key: KEY_VOLUME_MUTE}, {id: "volumeupbutton", key: KEY_VOLUME_UP}].forEach(function(o) { - document.getElementById(o.id).addEventListener("click", - function() { - ws.send("k" + o.key); - }); - }); - document.getElementById("sendbutton").addEventListener("click", - function() { - if (text.value != "") { - ws.send("t" + text.value); - text.value = ""; - } - window.history.back(); + document.getElementById(o.id).addEventListener("click", function() { + ws.send("k" + o.key); }); + }); + document.getElementById("sendbutton").addEventListener("click", function() { + if (text.value != "") { + ws.send("t" + text.value); + text.value = ""; + } + window.history.back(); + }); window.onpopstate = function() { if (!pad.classList.contains("hidden") || - !keyboard.classList.contains("hidden") || - !keys.classList.contains("hidden")) { + !keyboard.classList.contains("hidden") || + !keys.classList.contains("hidden")) { if (history.state == "keys") { showKeys(); } else if (history.state == "keyboard") { @@ -409,10 +405,9 @@ window.addEventListener("load", function() { } } }; - document.getElementById("reloadbutton").addEventListener("click", - function() { - location.reload(); - }); + document.getElementById("reloadbutton").addEventListener("click", function() { + location.reload(); + }); pad.addEventListener("touchstart", handleStart); pad.addEventListener("touchend", handleEnd); pad.addEventListener("touchcancel", handleEnd); From 1f410b5a18bbc9ac10364cd1605a04dc693afc52 Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 26 Aug 2020 03:30:21 +0200 Subject: [PATCH 010/210] Only exit fullscreen when in fullscreen mode --- webdata/fn.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/webdata/fn.js b/webdata/fn.js index 9a018b2..627b748 100644 --- a/webdata/fn.js +++ b/webdata/fn.js @@ -318,7 +318,9 @@ window.addEventListener("load", function() { } function showKeys() { - exitFullscreen(); + if (fullscreenElement()) { + exitFullscreen(); + } showScene(keys); if (history.state != "keys") { history.pushState("keys", ""); @@ -326,7 +328,9 @@ window.addEventListener("load", function() { } function showKeyboard() { - exitFullscreen(); + if (fullscreenElement()) { + exitFullscreen(); + } showScene(keyboard); text.focus(); if (history.state != "keyboard") { @@ -359,7 +363,9 @@ window.addEventListener("load", function() { }; ws.onclose = function() { - exitFullscreen(); + if (fullscreenElement()) { + exitFullscreen(); + } showScene(closed); }; From 585a3c0dccf739073791dbaae8f069c19cf3ab5c Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 26 Aug 2020 03:30:21 +0200 Subject: [PATCH 011/210] Reduce minimum size of textarea --- webdata/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webdata/index.html b/webdata/index.html index f7aed29..fc3fd96 100644 --- a/webdata/index.html +++ b/webdata/index.html @@ -29,7 +29,7 @@