summaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-06-01 09:26:57 +0000
committerPierre Ossman <ossman@cendio.se>2011-06-01 09:26:57 +0000
commitb043ad143dbf333dd6d23da1736744f94f79e302 (patch)
tree783a98ebb6b60b22886024c69cab1db5bf49c79d /vncviewer
parent950642027b17daaa8dc4cd145b60aeaae1a1f836 (diff)
downloadtigervnc-b043ad143dbf333dd6d23da1736744f94f79e302.tar.gz
tigervnc-b043ad143dbf333dd6d23da1736744f94f79e302.zip
Fix some misbehaviour with the scroll widget caused by the popup menu.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4458 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/Viewport.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 91daf9ea..3dd53e2f 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -82,6 +82,12 @@ Viewport::Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_)
// button component (which we don't want)
contextMenu->box(FL_NO_BOX);
+ // The (invisible) button associated with this widget can mess with
+ // things like Fl_Scroll so we need to get rid of any parents.
+ // Unfortunately that's not possible because of STR #2654, but
+ // reparenting to the current window works for most cases.
+ window()->add(contextMenu);
+
initContextMenu();
setMenuKey();
@@ -617,8 +623,6 @@ void Viewport::popupContextMenu()
if (window()->contains(Fl::focus()))
Fl::focus(NULL);
- contextMenu->position(Fl::event_x(), Fl::event_y());
-
m = contextMenu->popup();
if (m == NULL)
return;