Commit: 8387bfd9c64003835133620d2e7e9832c36c39c9
Author: Jason Wilkins
Date:   Thu Jul 24 02:03:29 2014 -0500
Branches: soc-2014-viewport_context
https://developer.blender.org/rB8387bfd9c64003835133620d2e7e9832c36c39c9

fix X11 error where current context was not set for window before calling swap 
buffers

===================================================================

M       source/blender/windowmanager/intern/wm_window.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_window.c 
b/source/blender/windowmanager/intern/wm_window.c
index 1f5ac25..397f517 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -340,7 +340,7 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win)
 }
 
 /* belongs to below */
-static void wm_window_add_ghostwindow(const char *title, wmWindow *win)
+static void wm_window_add_ghostwindow(wmWindowManager *wm, const char *title, 
wmWindow *win)
 {
        GHOST_WindowHandle ghostwin;
        static int multisamples = -1;
@@ -363,7 +363,10 @@ static void wm_window_add_ghostwindow(const char *title, 
wmWindow *win)
        
        if (ghostwin) {
                GHOST_RectangleHandle bounds;
-               
+
+               /* the new window has already been made drawable upon creation 
*/
+               wm->windrawable = win;
+
                /* needed so we can detect the graphics card below */
                GPU_init();
                
@@ -460,7 +463,7 @@ void wm_window_add_ghostwindows(wmWindowManager *wm)
                                wm_init_state.override_flag &= 
~WIN_OVERRIDE_WINSTATE;
                        }
 
-                       wm_window_add_ghostwindow("Blender", win);
+                       wm_window_add_ghostwindow(wm, "Blender", win);
                }
                /* happens after fileread */
                if (win->eventstate == NULL)
@@ -1397,7 +1400,6 @@ void wm_window_raise(wmWindow *win)
 
 void wm_window_swap_buffers(wmWindow *win)
 {
-       
 #ifdef WIN32
        glDisable(GL_SCISSOR_TEST);
        GHOST_SwapWindowBuffers(win->ghostwin);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to