diff options
-rw-r--r-- | generic/tk.h | 2 | ||||
-rw-r--r-- | generic/tkGeometry.c | 4 | ||||
-rw-r--r-- | generic/tkInt.h | 1 | ||||
-rw-r--r-- | generic/tkWindow.c | 1 | ||||
-rw-r--r-- | library/ttk/aquaTheme.tcl | 2 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 9 |
6 files changed, 13 insertions, 6 deletions
diff --git a/generic/tk.h b/generic/tk.h index c94882c..53de668 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -761,6 +761,7 @@ typedef XActivateDeactivateEvent XDeactivateEvent; #define Tk_MinReqHeight(tkwin) (((Tk_FakeWin *) (tkwin))->minReqHeight) #define Tk_Parent(tkwin) (((Tk_FakeWin *) (tkwin))->parentPtr) #define Tk_Colormap(tkwin) (((Tk_FakeWin *) (tkwin))->atts.colormap) +#define Tk_GeomMaster(tkwin) (((Tk_FakeWin *) (tkwin))->geomMasterPtr) /* * The structure below is needed by the macros above so that they can access @@ -802,6 +803,7 @@ typedef struct Tk_FakeWin { char *dummy13; /* selHandlerList */ char *dummy14; /* geomMgrPtr */ ClientData dummy15; /* geomData */ + Tk_Window geomMasterPtr; int reqWidth, reqHeight; int internalBorderLeft; char *dummy16; /* wmInfoPtr */ diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c index 2e0009a..a9c134b 100644 --- a/generic/tkGeometry.c +++ b/generic/tkGeometry.c @@ -425,6 +425,8 @@ Tk_MaintainGeometry( Tk_Window ancestor, parent; TkDisplay *dispPtr = ((TkWindow *) master)->dispPtr; + Tk_GeomMaster(slave) = master; + if (master == Tk_Parent(slave)) { /* * If the slave is a direct descendant of the master, don't bother @@ -570,6 +572,8 @@ Tk_UnmaintainGeometry( Tk_Window ancestor; TkDisplay *dispPtr = ((TkWindow *) slave)->dispPtr; + Tk_GeomMaster(slave) = NULL; + if (master == Tk_Parent(slave)) { /* * If the slave is a direct descendant of the master, diff --git a/generic/tkInt.h b/generic/tkInt.h index 4b5aebb..554e10d 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -769,6 +769,7 @@ typedef struct TkWindow { /* Information about geometry manager for this * window. */ ClientData geomData; /* Argument for geometry manager functions. */ + Tk_Window *geomMasterPtr; /* Tk_MaintainGeometry maintains this field. */ int reqWidth, reqHeight; /* Arguments from last call to * Tk_GeometryRequest, or 0's if * Tk_GeometryRequest hasn't been called. */ diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 868a8fa..606acb4 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -664,6 +664,7 @@ TkAllocWindow( winPtr->selHandlerList = NULL; winPtr->geomMgrPtr = NULL; winPtr->geomData = NULL; + winPtr->geomMasterPtr = NULL; winPtr->reqWidth = winPtr->reqHeight = 1; winPtr->internalBorderLeft = 0; winPtr->wmInfoPtr = NULL; diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl index 1e7745a..8379c49 100644 --- a/library/ttk/aquaTheme.tcl +++ b/library/ttk/aquaTheme.tcl @@ -7,7 +7,7 @@ namespace eval ttk::theme::aqua { ttk::style configure . \ -font TkDefaultFont \ - -background systemWindowBody \ + -background systemTtkBackground \ -foreground systemLabelColor \ -selectbackground systemHighlight \ -selectforeground systemLabelColor \ diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index c68f7d3..99ec71b 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -156,7 +156,6 @@ static int GetBoxColor( int depth, CGFloat *fill) { - TkWindow *winPtr = (TkWindow *)tkwin; NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace]; if ([NSApp macMinorVersion] > 13) { NSColor *windowColor = [[NSColor windowBackgroundColor] @@ -173,10 +172,10 @@ static int GetBoxColor( * Compute the nesting depth of the widget. */ - for (TkWindow *topPtr = winPtr->parentPtr; topPtr != NULL; - topPtr = topPtr->parentPtr) { - if (topPtr->privatePtr && - (topPtr->privatePtr->flags & TTK_HAS_DARKER_BG)) { + for (TkWindow *masterPtr = (TkWindow *)Tk_GeomMaster(tkwin); masterPtr != NULL; + masterPtr = (TkWindow *)Tk_GeomMaster(masterPtr)) { + if (masterPtr->privatePtr && + (masterPtr->privatePtr->flags & TTK_HAS_DARKER_BG)) { depth++; } if (depth > 7) { |