diff options
author | culler <culler> | 2019-02-07 18:26:37 (GMT) |
---|---|---|
committer | culler <culler> | 2019-02-07 18:26:37 (GMT) |
commit | 422f0f5d203bfb7aad77106e2239a60eb7c0ccc0 (patch) | |
tree | ba6a04d51b7b022c6667c265e7259870e320d447 /macosx | |
parent | f3021bb678bdcf54ee9149b3ef746a79cee07f6f (diff) | |
parent | 43fbfc9de2fc5eac324e919e0f04ac80c9a52589 (diff) | |
download | tk-422f0f5d203bfb7aad77106e2239a60eb7c0ccc0.zip tk-422f0f5d203bfb7aad77106e2239a60eb7c0ccc0.tar.gz tk-422f0f5d203bfb7aad77106e2239a60eb7c0ccc0.tar.bz2 |
Fix bug [58665b91dd]: many unixEmbed tests fail.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXEmbed.c | 15 | ||||
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 4 | ||||
-rw-r--r-- | macosx/tkMacOSXWm.c | 6 |
3 files changed, 17 insertions, 8 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index 61aff6c..b23f33b 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -498,9 +498,7 @@ TkMacOSXGetHostToplevel( * TkpClaimFocus -- * * This procedure is invoked when someone asks for the input focus to be - * put on a window in an embedded application, but the application - * doesn't currently have the focus. It requests the input focus from the - * container application. + * put on a window in an embedded application. * * Results: * None. @@ -539,7 +537,7 @@ TkpClaimFocus( event.xfocus.window = containerPtr->parent; event.xfocus.mode = EMBEDDED_APP_WANTS_FOCUS; event.xfocus.detail = force; - Tk_QueueWindowEvent(&event,TCL_QUEUE_TAIL); + Tk_HandleEvent(&event); } /* @@ -871,6 +869,14 @@ EmbedStructureProc( Tk_ErrorHandler errHandler; if (eventPtr->type == ConfigureNotify) { + + /* + * Send a ConfigureNotify to the embedded application. + */ + + if (containerPtr->embeddedPtr != None) { + TkDoConfigureNotify(containerPtr->embeddedPtr); + } if (containerPtr->embedded != None) { /* * Ignore errors, since the embedded application could have @@ -914,7 +920,6 @@ EmbedActivateProc( XEvent *eventPtr) /* ResizeRequest event. */ { Container *containerPtr = clientData; - if (containerPtr->embeddedPtr != NULL) { if (eventPtr->type == ActivateNotify) { TkGenerateActivateEvents(containerPtr->embeddedPtr,1); diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index ad6af30..c39f62b 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -523,7 +523,9 @@ GenerateActivateEvents( int activeFlag) { TkGenerateActivateEvents(winPtr, activeFlag); - TkMacOSXGenerateFocusEvent(winPtr, activeFlag); + if (activeFlag || ![NSApp isActive]) { + TkMacOSXGenerateFocusEvent(winPtr, activeFlag); + } return true; } diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 25ae2df..25b1d9f 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -6385,8 +6385,10 @@ XSetInputFocus( * * TkpChangeFocus -- * - * This procedure is a stub on the Mac because we always own the focus if - * we are a front most application. + * This function is called when Tk moves focus from one window to another. + * It should be passed a non-embedded TopLevel. That toplevel gets raised + * to the top of the Tk stacking order and the associated NSWindow is + * ordered Front. * * Results: * The return value is the serial number of the command that changed the |