Skip to content

Commit

Permalink
Support graphics switching on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Sep 1, 2021
1 parent 08dae6d commit 651d745
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/fyne/internal/templates/data/Info.plist
Expand Up @@ -20,6 +20,8 @@
<string>{{.Build}}</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down
1 change: 1 addition & 0 deletions internal/driver/glfw/window.go
Expand Up @@ -1399,6 +1399,7 @@ func (w *window) create() {
} else {
glfw.WindowHint(glfw.Resizable, 1)
}
glfw.WindowHint(glfw.CocoaGraphicsSwitching, glfw.True)
initWindowHints()

pixWidth, pixHeight := w.screenSize(w.canvas.size)
Expand Down

0 comments on commit 651d745

Please sign in to comment.