diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-20 12:50:11 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-20 12:50:11 (GMT) |
commit | 4536458f719fdc35f247c8139aad6b8b71471048 (patch) | |
tree | ac02899a473761587e13b2906482b07f4bb0bb66 /generic/tkFocus.c | |
parent | f4876885b53d6ed34fb1c3577e0c2d238a871953 (diff) | |
parent | 8077dd948e9d7c758be18837a1cc637007e50084 (diff) | |
download | tk-4536458f719fdc35f247c8139aad6b8b71471048.zip tk-4536458f719fdc35f247c8139aad6b8b71471048.tar.gz tk-4536458f719fdc35f247c8139aad6b8b71471048.tar.bz2 |
fix (hopefully) menu posting in the same way as window placement
Diffstat (limited to 'generic/tkFocus.c')
-rw-r--r-- | generic/tkFocus.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tkFocus.c b/generic/tkFocus.c index aad1305..93e1617 100644 --- a/generic/tkFocus.c +++ b/generic/tkFocus.c @@ -737,7 +737,7 @@ TkFocusKeyEvent(winPtr, eventPtr) { DisplayFocusInfo *displayFocusPtr; TkWindow *focusWinPtr; - int focusX, focusY, vRootX, vRootY, vRootWidth, vRootHeight; + int focusX, focusY; displayFocusPtr = FindDisplayFocusInfo(winPtr->mainPtr, winPtr->dispPtr); focusWinPtr = displayFocusPtr->focusWinPtr; @@ -770,11 +770,9 @@ TkFocusKeyEvent(winPtr, eventPtr) eventPtr->xkey.x = -1; eventPtr->xkey.y = -1; } else { - Tk_GetVRootGeometry((Tk_Window) focusWinPtr, &vRootX, &vRootY, - &vRootWidth, &vRootHeight); Tk_GetRootCoords((Tk_Window) focusWinPtr, &focusX, &focusY); - eventPtr->xkey.x = eventPtr->xkey.x_root - vRootX - focusX; - eventPtr->xkey.y = eventPtr->xkey.y_root - vRootY - focusY; + eventPtr->xkey.x = eventPtr->xkey.x_root - focusX; + eventPtr->xkey.y = eventPtr->xkey.y_root - focusY; } eventPtr->xkey.window = focusWinPtr->window; return focusWinPtr; |