Skip to content

x/exp/shiny: windows driver cannot set window height #14879

@200sc

Description

@200sc

GO/OS info:

Go1.6 windows/amd64
GOARCH = amd64
GOOS = windows

Using x/exp/shiny, we were starting a new project and trying to manipulate the initial window size.

We expected using screen.NewWindowOptions{640,480} to result in a screen of 640 width and 480 height

The screen had no height. See here.

In shiny's windows driver, it sets width to be the option's width, then to be the option's height, without actually ever setting height. This should be a simple fix:

    if opts != nil {
        if opts.Width > 0 {
            w = opts.Width
        }
        if opts.Height > 0 {
            h = opts.Height
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions