summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorchengyemao <chengyemao>2005-01-16 00:23:11 (GMT)
committerchengyemao <chengyemao>2005-01-16 00:23:11 (GMT)
commit755a33fa24ee2e9c505c528c743441fb070e6259 (patch)
tree82b67e8dc7b258ae244e01c7f5d66be5142bea87 /win/tkWinWm.c
parent22b21c0af24682c2efdfcd6ac7c4263b445a9907 (diff)
downloadtk-755a33fa24ee2e9c505c528c743441fb070e6259.zip
tk-755a33fa24ee2e9c505c528c743441fb070e6259.tar.gz
tk-755a33fa24ee2e9c505c528c743441fb070e6259.tar.bz2
Added TK_INFO message for use in an embedded window attachment protocol; modified TkpUseWindow to allow to attach to a legacy container with a warning; modified some return values of messages from an embedded window to differentiate a case of unprocessed
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 77a521b..e680145 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinWm.c,v 1.93 2005/01/13 01:48:03 chengyemao Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.94 2005/01/16 00:23:13 chengyemao Exp $
*/
#include "tkWinInt.h"
@@ -2241,7 +2241,7 @@ UpdateWrapper(winPtr)
*/
if (winPtr->flags & TK_EMBEDDED) {
- if(state != SendMessage(wmPtr->wrapper, TK_STATE, state, 0)) {
+ if(state+1 != SendMessage(wmPtr->wrapper, TK_STATE, state, 0)) {
TkpWmSetState(winPtr, NormalState);
wmPtr->hints.initial_state = NormalState;
}
@@ -4341,7 +4341,7 @@ WmOverrideredirectCmd(tkwin, winPtr, interp, objc, objv)
return TCL_ERROR;
}
if(winPtr->flags & TK_EMBEDDED) {
- curValue = SendMessage(wmPtr->wrapper, TK_OVERRIDEREDIRECT, -1, -1);
+ curValue = SendMessage(wmPtr->wrapper, TK_OVERRIDEREDIRECT, -1, -1)-1;
if(curValue < 0) {
Tcl_AppendResult(interp, "Container does not support overrideredirect", NULL);
return TCL_ERROR;
@@ -4849,7 +4849,7 @@ WmStateCmd(tkwin, winPtr, interp, objc, objv)
break;
}
- if(state != SendMessage(wmPtr->wrapper, TK_STATE, state, 0)) {
+ if(state+1 != SendMessage(wmPtr->wrapper, TK_STATE, state, 0)) {
Tcl_AppendResult(interp, "can't change state of ",
winPtr->pathName, ": the container does not support the request",
(char *) NULL);
@@ -4894,7 +4894,7 @@ WmStateCmd(tkwin, winPtr, interp, objc, objv)
} else {
int state;
if(winPtr->flags & TK_EMBEDDED)
- state = SendMessage(wmPtr->wrapper, TK_STATE, -1, -1);
+ state = SendMessage(wmPtr->wrapper, TK_STATE, -1, -1)-1;
else
state = wmPtr->hints.initial_state;
switch (state) {
@@ -7976,7 +7976,7 @@ void TkpWinToplevelDetachWindow(winPtr)
{
register WmInfo *wmPtr = winPtr->wmInfoPtr;
if(winPtr->flags & TK_EMBEDDED) {
- int state = SendMessage(wmPtr->wrapper, TK_STATE, -1, -1);
+ int state = SendMessage(wmPtr->wrapper, TK_STATE, -1, -1)-1;
SendMessage(wmPtr->wrapper, TK_SETMENU, 0, 0);
SendMessage(wmPtr->wrapper, TK_DETACHWINDOW, 0, 0);
winPtr->flags &= ~TK_EMBEDDED;