aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/Viewport.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-05-23 12:21:21 +0000
committerPierre Ossman <ossman@cendio.se>2011-05-23 12:21:21 +0000
commitc628ba44c1a98cdee6580587bc50380b6cbc46e2 (patch)
tree9aa1b58bf0b1831218e77480a64909593ee38034 /vncviewer/Viewport.cxx
parentbf1f26417247c2b9c794b3a25507a5a20107deab (diff)
downloadtigervnc-c628ba44c1a98cdee6580587bc50380b6cbc46e2.tar.gz
tigervnc-c628ba44c1a98cdee6580587bc50380b6cbc46e2.zip
We need to be careful about feeding FLTK @:s when they will be used in a
label as that is a formatting character. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4440 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer/Viewport.cxx')
-rw-r--r--vncviewer/Viewport.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 5b98d97b..5b5f5bba 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -42,6 +42,7 @@
#include "CConn.h"
#include "OptionsDialog.h"
#include "i18n.h"
+#include "fltk_layout.h"
#include "parameters.h"
#include "keysym2ucs.h"
@@ -575,6 +576,7 @@ void Viewport::initContextMenu()
void Viewport::popupContextMenu()
{
const Fl_Menu_Item *m;
+ char buffer[1024];
contextMenu->position(Fl::event_x(), Fl::event_y());
@@ -618,8 +620,10 @@ void Viewport::popupContextMenu()
OptionsDialog::showDialog();
break;
case ID_INFO:
- fl_message_title(_("VNC connection info"));
- fl_message(cc->connectionInfo());
+ if (fltk_escape(cc->connectionInfo(), buffer, sizeof(buffer)) < sizeof(buffer)) {
+ fl_message_title(_("VNC connection info"));
+ fl_message(buffer);
+ }
break;
case ID_ABOUT:
about_vncviewer();