summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2012-08-28 14:14:32 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2012-08-28 14:14:32 (GMT)
commit4445ffae4e0df3b8573e785c2d100e0ac0f113f2 (patch)
tree30764989c7760f3022a4055dc3ca5c281b73466f
parent8bf503fe4f3d712731a36512bd82a64a0eae94a2 (diff)
parent19bd79ea770280000eb2d1c3c6826082d8ae9e39 (diff)
downloadtk-4445ffae4e0df3b8573e785c2d100e0ac0f113f2.zip
tk-4445ffae4e0df3b8573e785c2d100e0ac0f113f2.tar.gz
tk-4445ffae4e0df3b8573e785c2d100e0ac0f113f2.tar.bz2
[Bug 3562426]: Context menu goes out of edge of screen.
FossilOrigin-Name: d703ff1315a181ed942e480454c9f82997e5b2e0
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkMenuDraw.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 65eab70..87fe5dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}