Skip to content

Commit 6c984fb

Browse files
committed
feat: allow setting the window title in hover.yaml
needs non-breaking and backward compatible hover PR go-flutter-desktop/hover#138
1 parent 7641a88 commit 6c984fb

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

application.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ func (a *Application) Run() error {
167167
a.window.SetIcon(images)
168168
}
169169

170+
a.window.SetTitle(ProjectName)
171+
170172
if a.config.windowDimensionLimits.minWidth != 0 {
171173
a.window.SetSizeLimits(
172174
a.config.windowDimensionLimits.minWidth,

platform.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,6 @@ func (p *platformPlugin) handleClipboardGetData(arguments interface{}) (reply in
9797
}
9898

9999
func (p *platformPlugin) handleWindowSetTitle(arguments interface{}) (reply interface{}, err error) {
100-
appSwitcherDescription := struct {
101-
Label string `json:"label"`
102-
PrimaryColor int64 `json:"primaryColor"`
103-
}{}
104-
err = json.Unmarshal(arguments.(json.RawMessage), &appSwitcherDescription)
105-
if err != nil {
106-
return nil, errors.Wrap(err, "failed to decode arguments")
107-
}
108-
p.glfwTasker.Do(func() {
109-
p.window.SetTitle(appSwitcherDescription.Label)
110-
})
111-
112100
// triggers flutter framework initialized callbacks
113101
for _, f := range p.flutterInitialized {
114102
f()

0 commit comments

Comments
 (0)