Tk Source Code

Artifact [05e1612b]
Login

Artifact 05e1612b0fefd6b557b2fed5990d5a5047d8333b:

Attachment "wm-wrappper.patch" to ticket [540920ff] added by jenglish 2002-04-10 03:30:29.
Index: doc/wm.n
===================================================================
RCS file: /cvsroot/tktoolkit/tk/doc/wm.n,v
retrieving revision 1.7
diff -c -r1.7 wm.n
*** doc/wm.n	4 Dec 2001 03:07:43 -0000	1.7
--- doc/wm.n	9 Apr 2002 20:23:01 -0000
***************
*** 455,460 ****
--- 455,467 ----
  window and then re-map it (e.g. with \fBwm deiconify\fR) to get some
  window managers to pay attention to changes in window attributes
  such as group.
+ .TP
+ \fBwm wrapper \fIwindow\fR
+ (Unix only.)  
+ Under X11, Tk creates a wrapper window around top-level windows
+ to hold the menu bar.
+ This command returns the platform specific window identifier 
+ for the wrapper window.
  
  .SH "GEOMETRY MANAGEMENT"
  .PP
Index: unix/tkUnixWm.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/unix/tkUnixWm.c,v
retrieving revision 1.13
diff -c -r1.13 tkUnixWm.c
*** unix/tkUnixWm.c	5 Apr 2002 08:41:44 -0000	1.13
--- unix/tkUnixWm.c	9 Apr 2002 20:23:02 -0000
***************
*** 2045,2050 ****
--- 2045,2067 ----
  	    return TCL_ERROR;
  	}
  	WaitForMapNotify(winPtr, 0);
+     } else if ((c == 'w') && (strncmp(argv[1], "wrapper", length) == 0)
+ 	    && (length >= 2)) {
+ 	Window window;
+ 	char buf[TCL_INTEGER_SPACE];
+ 
+ 	if (argc != 3) {
+ 	    Tcl_AppendResult(interp, "wrong # arguments: must be \"",
+ 		    argv[0], " wrapper window\"", (char *) NULL);
+ 	    return TCL_ERROR;
+ 	}
+ 	if (wmPtr->wrapperPtr == NULL || wmPtr->wrapperPtr->window == None) {
+ 	    window = Tk_WindowId((Tk_Window) winPtr);
+ 	} else {
+ 	    window = wmPtr->wrapperPtr->window;
+ 	}
+ 	sprintf(buf, "0x%x", (unsigned int) window);
+ 	Tcl_SetResult(interp, buf, TCL_VOLATILE);
      } else {
  	Tcl_AppendResult(interp, "unknown or ambiguous option \"", argv[1],
  		"\": must be aspect, client, command, deiconify, ",
***************
*** 2052,2058 ****
  		"iconify, iconmask, iconname, iconposition, ",
  		"iconwindow, maxsize, minsize, overrideredirect, ",
  		"positionfrom, protocol, resizable, sizefrom, stackorder, ",
! 		"state, title, transient, or withdraw",
  		(char *) NULL);
  	return TCL_ERROR;
      }
--- 2069,2075 ----
  		"iconify, iconmask, iconname, iconposition, ",
  		"iconwindow, maxsize, minsize, overrideredirect, ",
  		"positionfrom, protocol, resizable, sizefrom, stackorder, ",
! 		"state, title, transient, wrapper, or withdraw",
  		(char *) NULL);
  	return TCL_ERROR;
      }