diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-08-28 14:02:53 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2012-08-28 14:02:53 (GMT) |
commit | 5db7d518971be0f1cb3d82db626ea7f30fac971e (patch) | |
tree | 21e0bbfa18b13b0b4398914826d3a1ef9249607e | |
parent | eaa5cf3650a0a9553ab7a6435e52fb047848fb90 (diff) | |
parent | 81c9e2e65d786ef47b27415ba128a417bb32a580 (diff) | |
download | tk-5db7d518971be0f1cb3d82db626ea7f30fac971e.zip tk-5db7d518971be0f1cb3d82db626ea7f30fac971e.tar.gz tk-5db7d518971be0f1cb3d82db626ea7f30fac971e.tar.bz2 |
[Bug 3562426]: Context menu goes out of edge of screen
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tkMenuDraw.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2012-08-28 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tkMenuDraw.c: [Bug 3562426]: Context menu goes out of edge of + screen. + 2012-08-24 Donal K. Fellows <dkf@users.sf.net> * library/tkfbox.tcl (GlobFiltered): [Bug 3558535]: Factor out the 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; } |