diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-28 14:02:53 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-28 14:02:53 (GMT) |
commit | 7eb8135cd12ab7a65dc98b73ff16cf3bf5b8549f (patch) | |
tree | 21e0bbfa18b13b0b4398914826d3a1ef9249607e /generic | |
parent | 0363772b05a3395a9e79e21c2bb81121bcec0575 (diff) | |
parent | 34d3fa8298631ce5cbfb4be427b0681c3ad1475c (diff) | |
download | tk-7eb8135cd12ab7a65dc98b73ff16cf3bf5b8549f.zip tk-7eb8135cd12ab7a65dc98b73ff16cf3bf5b8549f.tar.gz tk-7eb8135cd12ab7a65dc98b73ff16cf3bf5b8549f.tar.bz2 |
[Bug 3562426]: Context menu goes out of edge of screen
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkMenuDraw.c | 2 |
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; } |