summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2012-08-28 13:59:07 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2012-08-28 13:59:07 (GMT)
commit52955e909cb6f853b7bb43eceedefa91d184bb05 (patch)
tree269d22c9062424e0972042d28ebc1f38e369d179
parenta7b4806c7e5ea5e888e42bb1e5af07e7bbc6b9b8 (diff)
downloadtk-52955e909cb6f853b7bb43eceedefa91d184bb05.zip
tk-52955e909cb6f853b7bb43eceedefa91d184bb05.tar.gz
tk-52955e909cb6f853b7bb43eceedefa91d184bb05.tar.bz2
[Bug 3562426]: Context menu goes out of edge of screen
FossilOrigin-Name: 65071721e87248e77a652e22164a9aaea9a417b6
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkMenuDraw.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 52d9739..89865de 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-17 Jan Nijtmans <nijtmans@users.sf.net>
* win/nmakehlp.c: Add "-V<num>" option, in order to be able
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;
}