summaryrefslogtreecommitdiffstats
path: root/generic/tkMenuDraw.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-28 13:59:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-28 13:59:07 (GMT)
commit34d3fa8298631ce5cbfb4be427b0681c3ad1475c (patch)
tree269d22c9062424e0972042d28ebc1f38e369d179 /generic/tkMenuDraw.c
parent3e015bc690d012c2d7a83be914babd37cbd259c0 (diff)
downloadtk-34d3fa8298631ce5cbfb4be427b0681c3ad1475c.zip
tk-34d3fa8298631ce5cbfb4be427b0681c3ad1475c.tar.gz
tk-34d3fa8298631ce5cbfb4be427b0681c3ad1475c.tar.bz2
[Bug 3562426]: Context menu goes out of edge of screen.
<p>PLEASE DON'T PUT THIS ASIDE TO A <b>MISTAKE</b> BRANCH OR SOMETHING! It's simply a fork, in fossil there's nothing wrong with that!</p>
Diffstat (limited to 'generic/tkMenuDraw.c')
-rw-r--r--generic/tkMenuDraw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c
index 7c69548..d4634cd 100644
--- a/generic/tkMenuDraw.c
+++ b/generic/tkMenuDraw.c
@@ -896,12 +896,14 @@ TkPostTearoffMenu(interp, menuPtr, x, y)
Tk_GetVRootGeometry(Tk_Parent(menuPtr->tkwin), &vRootX, &vRootY,
&vRootWidth, &vRootHeight);
+ vRootWidth -= Tk_ReqWidth(menuPtr->tkwin);
if (x > vRootX + vRootWidth) {
x = vRootX + vRootWidth;
}
if (x < vRootX) {
x = vRootX;
}
+ vRootHeight -= Tk_ReqHeight(menuPtr->tkwin);
if (y > vRootY + vRootHeight) {
y = vRootY + vRootHeight;
}