Skip to content
Snippets Groups Projects
Commit 2471211a authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix setting window title on macos

parent a8a0d085
No related branches found
No related tags found
No related merge requests found
......@@ -179,5 +179,6 @@ NSWindowRef getMainAppWindow();
GLViewRef getGLView();
unsigned int getModifiers();
void setTitle(const std::string& title);
#endif // LL_LLWINDOWMACOSX_OBJC_H
......@@ -451,14 +451,17 @@ long showAlert(std::string text, std::string title, int type)
return ret;
}
/*
GLViewRef getGLView()
{
return [(LLAppDelegate*)[[NSApplication sharedApplication] delegate] glview];
}
*/
unsigned int getModifiers()
{
return [NSEvent modifierFlags];
}
void setTitle(const std::string& title)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
LLNSWindow *winRef = [(LLAppDelegate*)[[LLApplication sharedApplication] delegate] window];
NSString *nsTitle = [NSString stringWithUTF8String:title.c_str()];
[winRef setTitle:nsTitle];
[pool release];
}
......@@ -1269,6 +1269,10 @@ BOOL LLWindowMacOSX::copyTextToClipboard(const LLWString &s)
return result;
}
void LLWindowMacOSX::setWindowTitle(const std::string& title)
{
setTitle(title);
}
// protected
BOOL LLWindowMacOSX::resetDisplayResolution()
......
......@@ -77,6 +77,7 @@ class LLWindowMacOSX : public LLWindow
/*virtual*/ BOOL isClipboardTextAvailable();
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst);
/*virtual*/ BOOL copyTextToClipboard(const LLWString & src);
/*virtual*/ void setWindowTitle(const std::string& title);
/*virtual*/ void flashIcon(F32 seconds);
/*virtual*/ F32 getGamma();
/*virtual*/ BOOL setGamma(const F32 gamma); // Set the gamma
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment