Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2021-09-16 23:44:21 +0300
committerJoseph Eagar <joeedh@gmail.com>2021-09-16 23:44:21 +0300
commit627edd1efabb0baaed3127bd127215ffb0ddfbac (patch)
treed42cf9d0de78dbdeb21c11a95c0fde2d4caf5fee /source/blender/windowmanager/intern/wm_window.c
parent445889676bfd900a237acbacbedeaadc30881cc7 (diff)
parentdb7fca3588aab72e49a74cbb2c236f86c0e0e6c1 (diff)
Merge branch 'master' into temp_bmesh_multires
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 004a845c667..0402b0d778a 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -808,16 +808,17 @@ wmWindow *WM_window_open(bContext *C,
/* changes rect to fit within desktop */
wm_window_check_size(&rect);
- /* Reuse temporary windows when they share the same title. */
+ /* Reuse temporary windows when they share the same single area. */
wmWindow *win = NULL;
if (temp) {
LISTBASE_FOREACH (wmWindow *, win_iter, &wm->windows) {
- if (WM_window_is_temp_screen(win_iter)) {
- char *wintitle = GHOST_GetTitle(win_iter->ghostwin);
- if (STREQ(title, wintitle)) {
+ const bScreen *screen = WM_window_get_active_screen(win_iter);
+ if (screen && screen->temp && BLI_listbase_is_single(&screen->areabase)) {
+ ScrArea *area = screen->areabase.first;
+ if (space_type == (area->butspacetype ? area->butspacetype : area->spacetype)) {
win = win_iter;
+ break;
}
- free(wintitle);
}
}
}