From c4b14740d5ad4dbcf5d289e1a8268b7a01ef224a Mon Sep 17 00:00:00 2001 From: stffabi Date: Fri, 14 Jan 2022 15:56:16 +0100 Subject: [PATCH 1/2] [v2] Only call EnableSizable for normal windows Frameless windows are always not resizable per default and the resizing for those will be initiated by the frontend see processMessage. If EnableSizable is enabled for frameless windows, a small white titlebar will be shown. Fix #1049 --- v2/internal/frontend/desktop/windows/window.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/v2/internal/frontend/desktop/windows/window.go b/v2/internal/frontend/desktop/windows/window.go index ee5840ec021..f627ac16647 100644 --- a/v2/internal/frontend/desktop/windows/window.go +++ b/v2/internal/frontend/desktop/windows/window.go @@ -55,12 +55,17 @@ func NewWindow(parent winc.Controller, appoptions *options.App) *Window { result.SetSize(appoptions.Width, appoptions.Height) result.SetText(appoptions.Title) - if appoptions.Frameless == false && !appoptions.Fullscreen { - result.EnableMaxButton(!appoptions.DisableResize) - result.SetMinSize(appoptions.MinWidth, appoptions.MinHeight) - result.SetMaxSize(appoptions.MaxWidth, appoptions.MaxHeight) + if appoptions.Frameless == false { + if !appoptions.Fullscreen { + result.EnableMaxButton(!appoptions.DisableResize) + result.SetMinSize(appoptions.MinWidth, appoptions.MinHeight) + result.SetMaxSize(appoptions.MaxWidth, appoptions.MaxHeight) + } + // Only call EnableSizable for normal windows, frameless windows are always not resizable per default and + // the resizing for those will be initiated by the frontend see processMessage. + // If EnableSizable is enabled for frameless windows, a small white titlebar will be shown. + result.EnableSizable(!appoptions.DisableResize) } - result.EnableSizable(!appoptions.DisableResize) if appoptions.Windows != nil { if appoptions.Windows.WindowIsTranslucent { From dd4b0e189cf1f5a73cd62470a119ed6385f0b8f2 Mon Sep 17 00:00:00 2001 From: stffabi Date: Fri, 14 Jan 2022 15:44:19 +0100 Subject: [PATCH 2/2] [v2] Bump winc Contains fixes for #1049, #1063 and #1083 --- v2/go.mod | 4 ++-- v2/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/v2/go.mod b/v2/go.mod index be7a4bbef71..09f629faf27 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -27,7 +27,7 @@ require ( github.com/leaanthony/idgen v1.0.0 github.com/leaanthony/slicer v1.5.0 github.com/leaanthony/typescriptify-golang-structs v0.1.7 - github.com/leaanthony/winc v0.0.0-20220112092814-1608a1744133 + github.com/leaanthony/winc v0.0.0-20220117090042-fdd739b32c58 github.com/leaanthony/winicon v1.0.0 github.com/matryer/is v1.4.0 github.com/olekukonko/tablewriter v0.0.4 @@ -42,7 +42,7 @@ require ( github.com/ztrue/tracerr v0.3.0 golang.org/x/mod v0.4.1 golang.org/x/net v0.0.0-20210510120150-4163338589ed - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e + golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 golang.org/x/tools v0.1.0 nhooyr.io/websocket v1.8.6 ) diff --git a/v2/go.sum b/v2/go.sum index cd8fa2a5a86..1c29a42fc66 100644 --- a/v2/go.sum +++ b/v2/go.sum @@ -128,8 +128,8 @@ github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0H github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= github.com/leaanthony/typescriptify-golang-structs v0.1.7 h1:yoznzWzyxkO/iWdlpq+aPcuJ5Y/hpjq/lmgMFmpjwl0= github.com/leaanthony/typescriptify-golang-structs v0.1.7/go.mod h1:cWtOkiVhMF77e6phAXUcfNwYmMwCJ67Sij24lfvi9Js= -github.com/leaanthony/winc v0.0.0-20220112092814-1608a1744133 h1:pt0HDBG8mdHbhgQANOUyHQVfzFdMRriU0QEk1dn7WAk= -github.com/leaanthony/winc v0.0.0-20220112092814-1608a1744133/go.mod h1:KEbMsKoznsebyGHwLk5LqkFOxL5uXSRdvpP4+avmAMs= +github.com/leaanthony/winc v0.0.0-20220117090042-fdd739b32c58 h1:gIHTuLZmfaiOJAoJiedFs0I1rrYyz3iJfgdtnmG6afY= +github.com/leaanthony/winc v0.0.0-20220117090042-fdd739b32c58/go.mod h1:OPfk8SNMAKRcSv8Vw1QL0yupmwcRtJyXZUgtMoaHUGc= github.com/leaanthony/winicon v1.0.0 h1:ZNt5U5dY71oEoKZ97UVwJRT4e+5xo5o/ieKuHuk8NqQ= github.com/leaanthony/winicon v1.0.0/go.mod h1:en5xhijl92aphrJdmRPlh4NI1L6wq3gEm0LpXAPghjU= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= @@ -257,8 +257,8 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=