[gtk/wip/chergert/gdk-macos-gl-renderer] macos: resize extra GL window/view when surface changes



commit 65b2ea1888196ee7f570a097b38a7cbccd414733
Author: Christian Hergert <chergert redhat com>
Date:   Wed Nov 4 17:09:48 2020 -0800

    macos: resize extra GL window/view when surface changes
    
    Once we figure out what is going on with textures, changes are we'll be
    able to let this stay a zero rect. But that is still a bit up in the air right now.

 gdk/macos/gdkmacosglcontext.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gdk/macos/gdkmacosglcontext.c b/gdk/macos/gdkmacosglcontext.c
index 2d349b89ea..d3c70e6f5b 100644
--- a/gdk/macos/gdkmacosglcontext.c
+++ b/gdk/macos/gdkmacosglcontext.c
@@ -285,9 +285,10 @@ gdk_macos_gl_context_begin_frame (GdkDrawContext *context,
       if (self->dummy_view != NULL)
         {
           GdkSurface *surface = gdk_draw_context_get_surface (context);
-          GLint vals[2] = { surface->width, surface->height };
+          NSRect frame = NSMakeRect (0, 0, surface->width, surface->height);
 
-          [self->gl_context setValues:vals forParameter:NSOpenGLContextParameterSurfaceBackingSize];
+          [self->dummy_window setFrame:frame display:NO];
+          [self->dummy_view setFrame:frame];
         }
 
       [self->gl_context update];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]