Tk Source Code

Check-in [d703ff13]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[Bug 3562426]: Context menu goes out of edge of screen.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d703ff1315a181ed942e480454c9f82997e5b2e0
User & Date: jan.nijtmans 2012-08-28 14:14:32
Context
2012-08-28
15:11
re-do [c42d04b1b4], but now correct ;-( check-in: e0024bbb user: jan.nijtmans tags: trunk
14:14
[Bug 3562426]: Context menu goes out of edge of screen. check-in: d703ff13 user: jan.nijtmans tags: trunk
14:12
[Bug 3562426]: Context menu goes out of edge of screen. check-in: 13c14cc5 user: jan.nijtmans tags: core-8-5-branch
11:00
Note potential incompatibility introduced by new virtual events. Emiliano Gavilan reports that this impacts tkcon's history features. check-in: bcd40d0b user: dkf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2012-08-27  Donal K. Fellows  <[email protected]>

	* (very many files): Reworked the generation of error messages and
	postscript so that they no longer made nearly as much use of the Tcl
	interpreter's string result code, in the process substantially
	reducing the amount of ad-hoc stack buffers used for message
	generation. There should be no observable changes from this except
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2012-08-28  Jan Nijtmans  <[email protected]>

	* generic/tkMenuDraw.c: [Bug 3562426]: Context menu goes out of edge of
	screen.

2012-08-27  Donal K. Fellows  <[email protected]>

	* (very many files): Reworked the generation of error messages and
	postscript so that they no longer made nearly as much use of the Tcl
	interpreter's string result code, in the process substantially
	reducing the amount of ad-hoc stack buffers used for message
	generation. There should be no observable changes from this except

Changes to generic/tkMenuDraw.c.

877
878
879
880
881
882
883

884
885
886
887
888
889

890
891
892
893
894
895
896
     * 2. The menu may not have been mapped yet, so its current size might be
     *    the default 1x1. To compute how much space it needs, use its
     *    requested size, not its actual size.
     */

    Tk_GetVRootGeometry(Tk_Parent(menuPtr->tkwin), &vRootX, &vRootY,
	&vRootWidth, &vRootHeight);

    if (x > vRootX + vRootWidth) {
	x = vRootX + vRootWidth;
    }
    if (x < vRootX) {
	x = vRootX;
    }

    if (y > vRootY + vRootHeight) {
	y = vRootY + vRootHeight;
    }
    if (y < vRootY) {
	y = vRootY;
    }
    Tk_MoveToplevelWindow(menuPtr->tkwin, x, y);







>






>







877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
     * 2. The menu may not have been mapped yet, so its current size might be
     *    the default 1x1. To compute how much space it needs, use its
     *    requested size, not its actual size.
     */

    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;
    }
    if (y < vRootY) {
	y = vRootY;
    }
    Tk_MoveToplevelWindow(menuPtr->tkwin, x, y);