Skip to content

Commit

Permalink
[v2] Only call EnableSizable for normal windows
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stffabi committed Jan 17, 2022
1 parent f5164d3 commit 21e25d5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions v2/internal/frontend/desktop/windows/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 21e25d5

Please sign in to comment.