Fix setting the app window's title on osx
parent
3241b67346
commit
22e2fa7859
|
|
@ -70,6 +70,7 @@ void showNSCursor();
|
|||
void hideNSCursorTillMove(bool hide);
|
||||
void requestUserAttention();
|
||||
long showAlert(std::string title, std::string text, int type);
|
||||
void setTitleCocoa(NSWindowRef window, const std::string &title); // <FS:CR> Set Window title
|
||||
|
||||
NSWindowRef createNSWindow(int x, int y, int width, int height);
|
||||
|
||||
|
|
|
|||
|
|
@ -450,3 +450,11 @@ unsigned int getModifiers()
|
|||
{
|
||||
return [NSEvent modifierFlags];
|
||||
}
|
||||
|
||||
// <FS:CR> Set Window Title - sigh.
|
||||
void setTitleCocoa(NSWindowRef window, const std::string &title)
|
||||
{
|
||||
NSString *str = [NSString stringWithCString:title.c_str() encoding:[NSString defaultCStringEncoding]];
|
||||
[(LLNSWindow*)window setTitle:str];
|
||||
}
|
||||
// </FS:CR>
|
||||
|
|
|
|||
|
|
@ -1590,9 +1590,7 @@ void LLWindowMacOSX::hideCursorUntilMouseMove()
|
|||
|
||||
void LLWindowMacOSX::setTitle(const std::string &title)
|
||||
{
|
||||
// FIXME: 3.6.5 Merge <FS:CR>
|
||||
//CFStringRef string = CFStringCreateWithCString(NULL, title.c_str(), kCFStringEncodingUTF8);
|
||||
//SetWindowTitleWithCFString(mWindow, string);
|
||||
setTitleCocoa(mWindow, title);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in New Issue