diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-18 20:28:39 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-18 20:28:39 +0400 |
commit | feeab1ad53f1b7cd4496fb8e7f173f21e460aac0 (patch) | |
tree | 3c9142be45eaf2b7d85b8de2b88cdf4e2243769f /source/blender/windowmanager/intern/wm_window.c | |
parent | fb2b3155f72d3bc6d2025d332cb843befea78d75 (diff) |
Fix #34997: when starting the game engine in one window and switching to a second
window, the game would stop drawing in the first and mess up the OpenGL state of
the second.
Also fixes glPushAttrib/glPopAttrib getting out of sync in some cases.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 70cb10476d7..fe419010780 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -677,10 +677,8 @@ static int query_qual(modifierKeyType qual) return val; } -void wm_window_make_drawable(bContext *C, wmWindow *win) +void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win) { - wmWindowManager *wm = CTX_wm_manager(C); - if (win != wm->windrawable && win->ghostwin) { // win->lmbut = 0; /* keeps hanging when mousepressed while other window opened */ @@ -786,7 +784,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr win->addmousemove = 1; /* enables highlighted buttons */ - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); /* window might be focused by mouse click in configuration of window manager * when focus is not following mouse @@ -817,7 +815,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr printf("%s: ghost redraw %d\n", __func__, win->winid); } - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); WM_event_add_notifier(C, NC_WINDOW, NULL); break; @@ -898,7 +896,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr } } - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); wm_draw_window_clear(win); WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); WM_event_add_notifier(C, NC_WINDOW | NA_EDITED, NULL); |