summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2018-12-14 19:44:43 (GMT)
committerculler <culler>2018-12-14 19:44:43 (GMT)
commit55943785efe5639b3ada935ce718ad6fd0bed6b2 (patch)
tree7899bea04f25dc385024d07465b517c6c4a658fa /macosx
parent7a359d16f322e88b8af5b7208eb63e53a5f3ec91 (diff)
downloadtk-55943785efe5639b3ada935ce718ad6fd0bed6b2.zip
tk-55943785efe5639b3ada935ce718ad6fd0bed6b2.tar.gz
tk-55943785efe5639b3ada935ce718ad6fd0bed6b2.tar.bz2
On second thought, it is better to follow X11 and return an empty string when the top
window containing the point has a different interpreter.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXWm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 0b39f1a..2091de0 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -609,8 +609,7 @@ SetWindowSizeLimits(
static TkWindow*
FrontWindowAtPoint(
int x,
- int y,
- TkMainInfo *mainPtr)
+ int y)
{
NSPoint p = NSMakePoint(x, tkMacOSXZeroScreenHeight - y);
NSArray *windows = [NSApp orderedWindows];
@@ -618,7 +617,7 @@ FrontWindowAtPoint(
for (NSWindow *w in windows) {
winPtr = TkMacOSXGetTkWindow(w);
- if (winPtr && winPtr->mainPtr == mainPtr) {
+ if (winPtr) {
WmInfo *wmPtr = winPtr->wmInfoPtr;
NSRect frame = [w frame];
@@ -4401,7 +4400,6 @@ Tk_CoordsToWindow(
TkWindow *winPtr, *childPtr;
TkWindow *nextPtr; /* Coordinates of highest child found so far
* that contains point. */
- TkMainInfo *mainPtr = ((TkWindow *) tkwin)->mainPtr;
int x, y; /* Coordinates in winPtr. */
int tmpx, tmpy, bd;
@@ -4409,8 +4407,8 @@ Tk_CoordsToWindow(
* Step 1: find the top-level window that contains the desired point.
*/
- winPtr = FrontWindowAtPoint(rootX, rootY, mainPtr);
- if (!winPtr) {
+ winPtr = FrontWindowAtPoint(rootX, rootY);
+ if (!winPtr || winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr) {
return NULL;
}