summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkWidget.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2008-01-06 22:33:14 (GMT)
committerjenglish <jenglish@flightlab.com>2008-01-06 22:33:14 (GMT)
commitb4391500808635ab7b520ba19e185701486b473d (patch)
treeea4fc95dc7452f6bbd1b5463da59093bf0bae495 /generic/ttk/ttkWidget.c
parent5d7c64a19265cd805fbdc6df205b165c443d1b3e (diff)
downloadtk-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/ttkWidget.c')
-rw-r--r--generic/ttk/ttkWidget.c13
1 files changed, 5 insertions, 8 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;