From 915e989f9d60d4523563f14b71df8c7f6d5e812e Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 18 Feb 2009 13:21:44 +0000 Subject: 2.5 Added ghost display state hint 'modified file'. Only supported in osx though (close button in bar gets dot). --- intern/ghost/GHOST_Types.h | 4 +++- intern/ghost/Makefile | 2 +- intern/ghost/intern/GHOST_SystemCarbon.cpp | 3 ++- intern/ghost/intern/GHOST_WindowCarbon.cpp | 6 ++++++ 4 files changed, 12 insertions(+), 3 deletions(-) (limited to 'intern') diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index b683740247a..2441251dc33 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -104,7 +104,9 @@ typedef enum { GHOST_kWindowState8Normal = 8, GHOST_kWindowState8Maximized, GHOST_kWindowState8Minimized, - GHOST_kWindowState8FullScreen + GHOST_kWindowState8FullScreen, + GHOST_kWindowStateModified, + GHOST_kWindowStateUnModified } GHOST_TWindowState; diff --git a/intern/ghost/Makefile b/intern/ghost/Makefile index f809a32ac8f..c5a9c522655 100644 --- a/intern/ghost/Makefile +++ b/intern/ghost/Makefile @@ -38,7 +38,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_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index 5de00d9ab3e..203b3847019 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -438,6 +438,8 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent) bool anyProcessed = false; EventRef event; +// SetMouseCoalescingEnabled(false, NULL); + do { GHOST_TimerManager* timerMgr = getTimerManager(); @@ -469,7 +471,6 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent) } } - /* end loop when no more events available */ while (::ReceiveNextEvent(0, NULL, 0, true, &event)==noErr) { OSStatus status= ::SendEventToEventTarget(event, ::GetEventDispatcherTarget()); diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp index ba094501fe5..87bb86a37e7 100644 --- a/intern/ghost/intern/GHOST_WindowCarbon.cpp +++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp @@ -378,6 +378,12 @@ GHOST_TSuccess GHOST_WindowCarbon::setState(GHOST_TWindowState state) case GHOST_kWindowStateMinimized: ::HideWindow(m_windowRef); break; + case GHOST_kWindowStateModified: + SetWindowModified(m_windowRef, 1); + break; + case GHOST_kWindowStateUnModified: + SetWindowModified(m_windowRef, 0); + break; case GHOST_kWindowStateMaximized: case GHOST_kWindowStateNormal: default: -- cgit v1.2.3