diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-28 14:14:32 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-28 14:14:32 (GMT) |
commit | fc600063743a764221043644b9271ccfb93bced7 (patch) | |
tree | 30764989c7760f3022a4055dc3ca5c281b73466f /generic | |
parent | 670e3cc8e1c87ea7b1cdd703383ae5e0a2d3a6b5 (diff) | |
parent | 183d093ed0f015d721d963c7cff2f07f5a72af72 (diff) | |
download | tk-fc600063743a764221043644b9271ccfb93bced7.zip tk-fc600063743a764221043644b9271ccfb93bced7.tar.gz tk-fc600063743a764221043644b9271ccfb93bced7.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 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; } |