diff options
author | jenglish <jenglish@noemail.net> | 2008-01-06 22:33:13 (GMT) |
---|---|---|
committer | jenglish <jenglish@noemail.net> | 2008-01-06 22:33:13 (GMT) |
commit | 643e03ab6545a09f0f38b0fa8b44024e4c4dbe3d (patch) | |
tree | ea4fc95dc7452f6bbd1b5463da59093bf0bae495 | |
parent | dc00e8ceec79a7ca0f1a3821ff6ef86038ee08a4 (diff) | |
download | tk-643e03ab6545a09f0f38b0fa8b44024e4c4dbe3d.zip tk-643e03ab6545a09f0f38b0fa8b44024e4c4dbe3d.tar.gz tk-643e03ab6545a09f0f38b0fa8b44024e4c4dbe3d.tar.bz2 |
Call Tk_MakeWindowExist() in widget constructor.
Removed now-unnecessary initial ConfigureNotify processing.
FossilOrigin-Name: 97048e98812d3e44af0e30820e519a2439119bc5
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/ttk/ttkWidget.c | 13 | ||||
-rw-r--r-- | generic/ttk/ttkWidget.h | 3 |
3 files changed, 12 insertions, 10 deletions
@@ -1,5 +1,11 @@ 2008-01-06 Joe English <jenglish@users.sourceforge.net> + * generic/ttk/ttkWidget.c, generic/ttk/ttkWidget.h: + Call Tk_MakeWindowExist() in widget constructor. + Removed now-unnecessary initial ConfigureNotify processing. + +2008-01-06 Joe English <jenglish@users.sourceforge.net> + * library/ttk/treeview.tcl, library/ttk/utils.tcl: Fix MouseWheel bindings for ttk::treeview widget (Fixes #1442006, #1821939, #1862692) 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 */ |