Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jun 30, 2020
1 parent 2e97364 commit 0e051b4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/driver/glfw/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ func (w *window) frameSized(viewport *glfw.Window, width, height int) {
w.canvas.Refresh(w.canvas.Content()) // apply texture scale
}

func (w *window) refresh(viewport *glfw.Window) {
func (w *window) refresh(_ *glfw.Window) {
refreshWindow(w)
}

Expand Down Expand Up @@ -877,7 +877,7 @@ func keyToName(code glfw.Key, scancode int) fyne.KeyName {
return ret
}

func (w *window) keyPressed(viewport *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey) {
func (w *window) keyPressed(_ *glfw.Window, key glfw.Key, scancode int, action glfw.Action, mods glfw.ModifierKey) {
keyName := keyToName(key, scancode)
if keyName == "" {
return
Expand Down Expand Up @@ -1007,7 +1007,7 @@ func desktopModifier(mods glfw.ModifierKey) desktop.Modifier {
// Unicode character is input.
//
// Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters.
func (w *window) charInput(viewport *glfw.Window, char rune) {
func (w *window) charInput(_ *glfw.Window, char rune) {
if w.canvas.Focused() == nil && w.canvas.onTypedRune == nil {
return
}
Expand All @@ -1020,7 +1020,7 @@ func (w *window) charInput(viewport *glfw.Window, char rune) {
}
}

func (w *window) focused(viewport *glfw.Window, focused bool) {
func (w *window) focused(_ *glfw.Window, focused bool) {
if w.canvas.focused == nil {
return
}
Expand Down Expand Up @@ -1061,7 +1061,7 @@ func (w *window) rescaleOnMain() {
return
}

size := w.canvas.size.Union(w.canvas.MinSize())
size := w.canvas.size.Max(w.canvas.MinSize())
newWidth, newHeight := w.screenSize(size)
w.viewport.SetSize(newWidth, newHeight)
}
Expand Down

0 comments on commit 0e051b4

Please sign in to comment.