mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
app,app/internal/wm: [macOS] refresh context on display change
The NSViewGlobalFrameDidChangeNotification notification is documented to be fired every time [NSOpenGLContext update] needs to be called. However, the notification fails to fire on my setup when a window is moved to a display with a different pixel scale, which leads to incorrectly sized output. This change gets rid of the notification and updates the context before every frame. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -71,6 +71,10 @@ func (c *d3d11Context) Present() error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *d3d11Context) Refresh() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *d3d11Context) MakeCurrent() error {
|
||||
var width, height int
|
||||
c.win.w.Run(func() {
|
||||
|
||||
Reference in New Issue
Block a user