summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-11 14:11:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-11 14:11:14 (GMT)
commit76eb475a1c171000446b21fb488202f2b1a124db (patch)
tree8b054d2dc9f1ba3071bd8194ece265b0445d0f8b /macosx/tkMacOSXWm.c
parent8fb4a031ef0229ae94bd43a06ac1779baab3049e (diff)
parent46f4476afd4803621152594669922f4d8b8afc3d (diff)
downloadtk-76eb475a1c171000446b21fb488202f2b1a124db.zip
tk-76eb475a1c171000446b21fb488202f2b1a124db.tar.gz
tk-76eb475a1c171000446b21fb488202f2b1a124db.tar.bz2
Merge 8.7
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 0b8ef81..d647b46 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -5,11 +5,11 @@
* application and the window manager. Among other things, it implements
* the "wm" command and passes geometry information to the window manager.
*
- * Copyright (c) 1994-1997 Sun Microsystems, Inc.
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
- * Copyright (c) 2010 Kevin Walzer/WordTech Communications LLC.
- * Copyright (c) 2017-2019 Marc Culler.
+ * Copyright © 1994-1997 Sun Microsystems, Inc.
+ * Copyright © 2001-2009, Apple Inc.
+ * Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright © 2010 Kevin Walzer/WordTech Communications LLC.
+ * Copyright © 2017-2019 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -2868,9 +2868,9 @@ WmIconwindowCmd(
static int
WmManageCmd(
- TCL_UNUSED(Tk_Window), /* Main window of the application. */
- TkWindow *winPtr, /* Toplevel or Frame to work with */
- Tcl_Interp *interp, /* Current interpreter. */
+ TCL_UNUSED(Tk_Window), /* Main window of the application. */
+ TkWindow *winPtr, /* Toplevel or Frame to work with */
+ Tcl_Interp *interp, /* Current interpreter. */
TCL_UNUSED(int), /* Number of arguments. */
TCL_UNUSED(Tcl_Obj *const *)) /* Argument objects. */
{
@@ -2888,6 +2888,18 @@ WmManageCmd(
Tcl_SetErrorCode(interp, "TK", "WM", "MANAGE", NULL);
return TCL_ERROR;
}
+
+ /*
+ * Draw the managed widget at the top left corner of its toplevel.
+ * See [4a40c6cace].
+ */
+
+ if (macWin) {
+ winPtr->changes.x -= macWin->xOff;
+ winPtr->changes.y -= macWin->yOff;
+ XMoveWindow(winPtr->display, winPtr->window, 0, 0);
+ }
+
TkFocusSplit(winPtr);
Tk_UnmapWindow(frameWin);
if (wmPtr == NULL) {