diff options
author | jenglish <jenglish@flightlab.com> | 2008-01-06 22:33:14 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2008-01-06 22:33:14 (GMT) |
commit | b4391500808635ab7b520ba19e185701486b473d (patch) | |
tree | ea4fc95dc7452f6bbd1b5463da59093bf0bae495 /generic/ttk | |
parent | 5d7c64a19265cd805fbdc6df205b165c443d1b3e (diff) | |
download | tk-b4391500808635ab7b520ba19e185701486b473d.zip tk-b4391500808635ab7b520ba19e185701486b473d.tar.gz tk-b4391500808635ab7b520ba19e185701486b473d.tar.bz2 |
Call Tk_MakeWindowExist() in widget constructor.
Removed now-unnecessary initial ConfigureNotify processing.
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkWidget.c | 13 | ||||
-rw-r--r-- | generic/ttk/ttkWidget.h | 3 |
2 files changed, 6 insertions, 10 deletions
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index bd5bb27..9f9c3ae 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -1,4 +1,4 @@ -/* $Id: ttkWidget.c,v 1.9 2007/12/13 15:26:26 dgp Exp $ +/* $Id: ttkWidget.c,v 1.10 2008/01/06 22:33:14 jenglish Exp $ * Copyright (c) 2003, Joe English * * Core widget utilities. @@ -232,7 +232,8 @@ WidgetCleanup(char *memPtr) * It turns out this is impossible to do correctly in a binding script, * because Tk filters out focus events with detail == NotifyInferior. * - * For Deactivate/Activate pseudo-events, clear/set the background state flag. + * For Deactivate/Activate pseudo-events, set/clear the background state + * flag. * * <<NOTE-REALIZED>> On the first ConfigureNotify event * (which indicates that the window has just been created), @@ -260,12 +261,6 @@ static void CoreEventProc(ClientData clientData, XEvent *eventPtr) switch (eventPtr->type) { case ConfigureNotify : - if (!(corePtr->flags & WIDGET_REALIZED)) { - /* See <<NOTE-REALIZED>> */ - (void)UpdateLayout(corePtr->interp, corePtr); - SizeChanged(corePtr); - corePtr->flags |= WIDGET_REALIZED; - } TtkRedisplayWidget(corePtr); break; case Expose : @@ -444,6 +439,8 @@ int TtkWidgetConstructorObjCmd( SizeChanged(corePtr); Tk_CreateEventHandler(tkwin, CoreEventMask, CoreEventProc, recordPtr); + Tk_MakeWindowExist(tkwin); + Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(tkwin), -1)); return TCL_OK; diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h index c164beb..21cb1b3 100644 --- a/generic/ttk/ttkWidget.h +++ b/generic/ttk/ttkWidget.h @@ -1,4 +1,4 @@ -/* $Id: ttkWidget.h,v 1.8 2007/12/13 15:26:26 dgp Exp $ +/* $Id: ttkWidget.h,v 1.9 2008/01/06 22:33:14 jenglish Exp $ * Copyright (c) 2003, Joe English * Helper routines for widget implementations. */ @@ -11,7 +11,6 @@ */ #define WIDGET_DESTROYED 0x0001 #define REDISPLAY_PENDING 0x0002 /* scheduled call to RedisplayWidget */ -#define WIDGET_REALIZED 0x0010 /* set at first ConfigureNotify */ #define CURSOR_ON 0x0020 /* See TtkBlinkCursor() */ #define WIDGET_USER_FLAG 0x0100 /* 0x0100 - 0x8000 for user flags */ |