summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMouseEvent.c
diff options
context:
space:
mode:
authordas <das>2007-12-18 18:21:29 (GMT)
committerdas <das>2007-12-18 18:21:29 (GMT)
commitbe55f56a1e6843f4a67dbf48ff88008c9d5c1f6f (patch)
tree9955e412e61973061382f7bcd8b31ce10831c4e2 /macosx/tkMacOSXMouseEvent.c
parent966ff06117278ef28754933ca7c39695f8177acd (diff)
downloadtk-be55f56a1e6843f4a67dbf48ff88008c9d5c1f6f.zip
tk-be55f56a1e6843f4a67dbf48ff88008c9d5c1f6f.tar.gz
tk-be55f56a1e6843f4a67dbf48ff88008c9d5c1f6f.tar.bz2
* macosx/tkMacOSXWm.c (ApplyMasterOverrideChanges): Revert 2007-10-26
change to window class of transient toplevels that are not also overrideredirect. [Bug 1845899] * macosx/tkMacOSXWm.c (ApplyMasterOverrideChanges): Implement more * macosx/tkMacOSXMouseEvent.c (BringWindowForward): X11-like transient * macosx/tkMacOSXSubwindows.c (XDestroyWindow): behaviour by adding transient windows to a window group owned by the master window, this ensures transients always remain in front of and are collapsed with the master; bring master to front when selecting transient windows; restore default window group of transients if master destroyed. [Bug 1845899]
Diffstat (limited to 'macosx/tkMacOSXMouseEvent.c')
-rw-r--r--macosx/tkMacOSXMouseEvent.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index bf1e3ae..2340e92 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -54,7 +54,7 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.6.2.22 2007/07/09 08:32:12 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.6.2.23 2007/12/18 18:21:30 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -555,6 +555,29 @@ BringWindowForward(
ChkErr(GetWindowModality, frontWindow, &frontWindowModality, NULL);
}
if (frontWindowModality != kWindowModalityAppModal) {
+ Window window = TkMacOSXGetXWindow(wRef);
+
+ if (window != None) {
+ TkDisplay *dispPtr = TkGetDisplayList();
+ TkWindow * winPtr = (TkWindow *)Tk_IdToWindow(dispPtr->display,
+ window);
+
+ if (winPtr && winPtr->wmInfoPtr &&
+ winPtr->wmInfoPtr->master != None) {
+ TkWindow *masterWinPtr = (TkWindow *)Tk_IdToWindow(
+ dispPtr->display, winPtr->wmInfoPtr->master);
+
+ if (masterWinPtr && masterWinPtr->window != None &&
+ TkMacOSXHostToplevelExists(masterWinPtr)) {
+ WindowRef masterMacWin =
+ TkMacOSXDrawableWindow(masterWinPtr->window);
+
+ if (masterMacWin) {
+ BringToFront(masterMacWin);
+ }
+ }
+ }
+ }
SelectWindow(wRef);
} else {
frontWindowOnly = 0;