summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2021-09-29 16:50:57 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2021-09-29 16:50:57 +0100
commit19154bec157a4e05c8b988531e84095a8124d3ec (patch)
treef09c2641c65ef410117eb2344ce3454154630080 /indra/llwindow
parent3c4198e4b50de0221020f3b5bbf7d3f7ff7cf984 (diff)
parent391500b5f7f2fb251acdd192d80e1da7eea02c4c (diff)
Merge branch 'SL-15999' of ssh://bitbucket.org/lindenlab/viewer into SL-15999
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindow.cpp6
-rw-r--r--indra/llwindow/llwindow.h7
-rw-r--r--indra/llwindow/llwindowwin32.cpp7
-rw-r--r--indra/llwindow/llwindowwin32.h3
4 files changed, 22 insertions, 1 deletions
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 30bc743e72..67ef98d7b3 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -137,6 +137,12 @@ BOOL LLWindow::canDelete()
return TRUE;
}
+//virtual
+void LLWindow::setTitle(const std::string title)
+{
+ // the action happens in the platform specific impl
+}
+
// virtual
void LLWindow::incBusyCount()
{
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index d4d5b76937..41eb1d7ee5 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -86,6 +86,13 @@ public:
virtual void showCursorFromMouseMove() = 0;
virtual void hideCursorUntilMouseMove() = 0;
+ // Provide a way to set the Viewer window title after the
+ // windows has been created. The initial use case for this
+ // is described in SL-16102 (update window title with agent
+ // name, location etc. for non-interactive viewer) but it
+ // may also be useful in other cases.
+ virtual void setTitle(const std::string title);
+
// These two functions create a way to make a busy cursor instead
// of an arrow when someone's busy doing something. Draw an
// arrow/hour if busycount > 0.
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index b2b123f0da..dc3e77cc57 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1811,6 +1811,13 @@ void LLWindowWin32::moveWindow( const LLCoordScreen& position, const LLCoordScre
MoveWindow(mWindowHandle, position.mX, position.mY, size.mX, size.mY, TRUE);
}
+void LLWindowWin32::setTitle(const std::string title)
+{
+ // TODO: Do we need to use the wide string version of this call
+ // to support non-ascii usernames (and region names??)
+ SetWindowTextA(mWindowHandle, title.c_str());
+}
+
BOOL LLWindowWin32::setCursorPosition(const LLCoordWindow position)
{
mMousePositionModified = TRUE;
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 0b3d14fb16..34dcb7f268 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -58,7 +58,8 @@ public:
/*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL setSizeImpl(LLCoordWindow size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
- /*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
+ /*virtual*/ void setTitle(const std::string title);
+ /*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
/*virtual*/ void showCursor();
/*virtual*/ void hideCursor();