diff options
-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-27 Donal K. Fellows <dkf@users.sf.net> * (very many files): Reworked the generation of error messages and diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index 4cd9b02..1abe1c4 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; } |