| @@ -239,13 +239,25 @@ const StringArray Font::findAllTypefaceNames() throw() | |||||
| return results; | return results; | ||||
| } | } | ||||
| extern bool juce_IsRunningInWine() throw(); | |||||
| void Font::getDefaultFontNames (String& defaultSans, | void Font::getDefaultFontNames (String& defaultSans, | ||||
| String& defaultSerif, | String& defaultSerif, | ||||
| String& defaultFixed) throw() | String& defaultFixed) throw() | ||||
| { | { | ||||
| defaultSans = "Verdana"; | |||||
| defaultSerif = "Times"; | |||||
| defaultFixed = "Lucida Console"; | |||||
| if (juce_IsRunningInWine()) | |||||
| { | |||||
| // If we're running in Wine, then use fonts that might be available on Linux.. | |||||
| defaultSans = "Bitstream Vera Sans"; | |||||
| defaultSerif = "Bitstream Vera Serif"; | |||||
| defaultFixed = "Bitstream Vera Sans Mono"; | |||||
| } | |||||
| else | |||||
| { | |||||
| defaultSans = "Verdana"; | |||||
| defaultSerif = "Times"; | |||||
| defaultFixed = "Lucida Console"; | |||||
| } | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -300,6 +300,17 @@ void PlatformUtilities::deleteRegistryKey (const String& regKeyPath) | |||||
| } | } | ||||
| } | } | ||||
| bool juce_IsRunningInWine() throw() | |||||
| { | |||||
| HKEY key; | |||||
| if (RegOpenKeyEx (HKEY_CURRENT_USER, _T("Software\\Wine"), 0, KEY_READ, &key) == ERROR_SUCCESS) | |||||
| { | |||||
| RegCloseKey (key); | |||||
| return true; | |||||
| } | |||||
| return false; | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| static void* currentModuleHandle = 0; | static void* currentModuleHandle = 0; | ||||
| @@ -93,6 +93,7 @@ BEGIN_JUCE_NAMESPACE | |||||
| extern void juce_repeatLastProcessPriority() throw(); // in juce_win32_Threads.cpp | extern void juce_repeatLastProcessPriority() throw(); // in juce_win32_Threads.cpp | ||||
| extern void juce_CheckCurrentlyFocusedTopLevelWindow() throw(); // in juce_TopLevelWindow.cpp | extern void juce_CheckCurrentlyFocusedTopLevelWindow() throw(); // in juce_TopLevelWindow.cpp | ||||
| extern bool juce_IsRunningInWine() throw(); | |||||
| const int juce_windowIsSemiTransparentFlag = (1 << 31); // also in component.cpp | const int juce_windowIsSemiTransparentFlag = (1 << 31); // also in component.cpp | ||||
| @@ -121,8 +122,11 @@ bool Desktop::canUseSemiTransparentWindows() throw() | |||||
| { | { | ||||
| if (updateLayeredWindow == 0) | if (updateLayeredWindow == 0) | ||||
| { | { | ||||
| HMODULE user32Mod = GetModuleHandle (_T("user32.dll")); | |||||
| updateLayeredWindow = (UpdateLayeredWinFunc) GetProcAddress (user32Mod, "UpdateLayeredWindow"); | |||||
| if (! juce_IsRunningInWine()) | |||||
| { | |||||
| HMODULE user32Mod = GetModuleHandle (_T("user32.dll")); | |||||
| updateLayeredWindow = (UpdateLayeredWinFunc) GetProcAddress (user32Mod, "UpdateLayeredWindow"); | |||||
| } | |||||
| } | } | ||||
| return updateLayeredWindow != 0; | return updateLayeredWindow != 0; | ||||