diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-28 14:12:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-28 14:12:33 (GMT) |
commit | 183d093ed0f015d721d963c7cff2f07f5a72af72 (patch) | |
tree | 38fd76667434fb184d030c1a34389eb3fc939950 | |
parent | b4ef8aeb378ece8ed9e81bec86fbba29558bbdc7 (diff) | |
parent | 7eb8135cd12ab7a65dc98b73ff16cf3bf5b8549f (diff) | |
download | tk-183d093ed0f015d721d963c7cff2f07f5a72af72.zip tk-183d093ed0f015d721d963c7cff2f07f5a72af72.tar.gz tk-183d093ed0f015d721d963c7cff2f07f5a72af72.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 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; } |