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 | |
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')
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 10 |
4 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index f7b7aa87cf8..0e1e41b0149 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -384,7 +384,7 @@ void wm_add_default(bContext *C) wm->winactive = win; wm->file_saved = 1; - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); } diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 396c827fe25..005d02647a4 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -828,7 +828,7 @@ void wm_draw_update(bContext *C) CTX_wm_window_set(C, win); /* sets context window+screen */ - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); /* notifiers for screen redraw */ if (win->screen->do_refresh) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index fcacfbbb686..098fe72688c 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2130,7 +2130,7 @@ void wm_event_do_handlers(bContext *C) CTX_wm_region_set(C, region_event_inside(C, &event->x)); /* MVC demands to not draw in event handlers... but we need to leave it for ogl selecting etc */ - wm_window_make_drawable(C, win); + wm_window_make_drawable(wm, win); wm_region_mouse_co(C, event); 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); |