summaryrefslogtreecommitdiffstats
path: root/generic/tkMenuDraw.c
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2012-08-28 14:12:33 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2012-08-28 14:12:33 (GMT)
commitd40e45b3ffbb4e50f829c7c2e4f5782371e6a413 (patch)
tree38fd76667434fb184d030c1a34389eb3fc939950 /generic/tkMenuDraw.c
parent5472e08110017e3cbc9cd574ba02fd77a948f406 (diff)
parent5db7d518971be0f1cb3d82db626ea7f30fac971e (diff)
downloadtk-d40e45b3ffbb4e50f829c7c2e4f5782371e6a413.zip
tk-d40e45b3ffbb4e50f829c7c2e4f5782371e6a413.tar.gz
tk-d40e45b3ffbb4e50f829c7c2e4f5782371e6a413.tar.bz2
[Bug 3562426]: Context menu goes out of edge of screen.
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 65aa591..c49f513 100644
--- a/generic/tkMenuDraw.c
+++ b/generic/tkMenuDraw.c
@@ -881,12 +881,14 @@ TkPostTearoffMenu(
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;
}