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
path: root/intern
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2003-11-24 02:04:35 +0300
committerTon Roosendaal <ton@blender.org>2003-11-24 02:04:35 +0300
commit0ff0ac9b87b156c62552ec2195584da6f1babde6 (patch)
tree46286038c1878283540f2208b3874ca77652311f /intern
parent4cd72d69c13c30753035482ef96547c95552f4fc (diff)
- another hack!
well... probably OK, got it from a python mailing list. When starting from commandline, the window doesnt pop to the front. this was really bad for the play function in blender, which opens a new blender thread. solved with SetFrontProcess()
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/Makefile2
-rw-r--r--intern/ghost/intern/GHOST_WindowCarbon.cpp9
-rw-r--r--intern/ghost/intern/GHOST_WindowCarbon.h1
3 files changed, 9 insertions, 3 deletions
diff --git a/intern/ghost/Makefile b/intern/ghost/Makefile
index fe65afbfb93..ccbb223680b 100644
--- a/intern/ghost/Makefile
+++ b/intern/ghost/Makefile
@@ -41,7 +41,7 @@ TESTDIRS = test
include nan_subdirs.mk
-install: all debug
+install: all
@[ -d $(NAN_GHOST) ] || mkdir $(NAN_GHOST)
@[ -d $(NAN_GHOST)/include ] || mkdir $(NAN_GHOST)/include
@[ -d $(NAN_GHOST)/lib ] || mkdir $(NAN_GHOST)/lib
diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp
index f8374134d65..29fab93b314 100644
--- a/intern/ghost/intern/GHOST_WindowCarbon.cpp
+++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp
@@ -42,7 +42,6 @@
#endif
#include "GHOST_WindowCarbon.h"
-
#include "GHOST_Debug.h"
AGLContext GHOST_WindowCarbon::s_firstaglCtx = NULL;
@@ -108,7 +107,13 @@ GHOST_WindowCarbon::GHOST_WindowCarbon(
updateDrawingContext();
activateDrawingContext();
}
- if(ugly_hack==NULL) ugly_hack= m_windowRef;
+ if(ugly_hack==NULL) {
+ ugly_hack= m_windowRef;
+ // when started from commandline, window remains in the back... also for play anim
+ ProcessSerialNumber psn;
+ GetCurrentProcess(&psn);
+ SetFrontProcess(&psn);
+ }
}
else {
/*
diff --git a/intern/ghost/intern/GHOST_WindowCarbon.h b/intern/ghost/intern/GHOST_WindowCarbon.h
index 1c183028aea..15757556780 100644
--- a/intern/ghost/intern/GHOST_WindowCarbon.h
+++ b/intern/ghost/intern/GHOST_WindowCarbon.h
@@ -44,6 +44,7 @@
#include "STR_String.h"
#include <Carbon/Carbon.h>
+
#include <AGL/agl.h>