Skip to content

Commit

Permalink
[v3] NewWebviewWindow* return *WebviewWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
tmclane committed Sep 28, 2023
1 parent 2c3216b commit 1c48d56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions v3/pkg/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func (a *App) RegisterHook(eventType events.ApplicationEventType, callback func(
}
}

func (a *App) NewWebviewWindow() Window {
func (a *App) NewWebviewWindow() *WebviewWindow {
return a.NewWebviewWindowWithOptions(WebviewWindowOptions{})
}

Expand Down Expand Up @@ -376,7 +376,7 @@ func (a *App) error(message string, args ...any) {
}
}

func (a *App) NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) Window {
func (a *App) NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) *WebviewWindow {
newWindow := NewWindow(windowOptions)
id := newWindow.ID()

Expand Down
2 changes: 1 addition & 1 deletion v3/pkg/application/webview_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (w *WebviewWindow) setupEventMapping() {
}

// NewWindow creates a new window with the given options
func NewWindow(options WebviewWindowOptions) Window {
func NewWindow(options WebviewWindowOptions) *WebviewWindow {
if options.Width == 0 {
options.Width = 800
}
Expand Down

0 comments on commit 1c48d56

Please sign in to comment.