diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-08 20:49:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-08 20:49:55 (GMT) |
commit | 311efb2355355e5bcc6596c702c5cad288cabd5a (patch) | |
tree | e78b10da9c7a783f5df6111abbd74e8bd342ea73 | |
parent | 69810cf540ec4e49dc76d0a1f99f9cab49a7d091 (diff) | |
parent | 19d012df44dac9aaf5faa9b3beca5a6396ea21a8 (diff) | |
download | tk-311efb2355355e5bcc6596c702c5cad288cabd5a.zip tk-311efb2355355e5bcc6596c702c5cad288cabd5a.tar.gz tk-311efb2355355e5bcc6596c702c5cad288cabd5a.tar.bz2 |
Merge 8.6
-rw-r--r-- | tests/focus.test | 2 | ||||
-rw-r--r-- | xlib/xgc.c | 18 |
2 files changed, 12 insertions, 8 deletions
diff --git a/tests/focus.test b/tests/focus.test index 7da289d..7c40f1d 100644 --- a/tests/focus.test +++ b/tests/focus.test @@ -624,7 +624,7 @@ fixfocus test focus-6.1 {miscellaneous - embedded application in same process} -constraints { unix testwrapper } -setup { - eval interp delete [interp slaves] + eval interp delete [interp children] } -body { toplevel .t wm geometry .t +0+0 @@ -16,7 +16,6 @@ #if !defined(MAC_OSX_TK) # include <X11/Xlib.h> -# define gcCacheSize 0 # define TkpInitGCCache(gc) # define TkpFreeGCCache(gc) # define TkpGetGCCache(gc) @@ -24,10 +23,18 @@ # include <tkMacOSXInt.h> # include <X11/Xlib.h> # include <X11/X.h> -# define gcCacheSize sizeof(TkpGCCache) #endif +#define MAX_DASH_LIST_SIZE 10 +typedef struct { + XGCValues gc; + char dash[MAX_DASH_LIST_SIZE]; +#ifdef MAC_OSX_TK + TkpGCCache cache; +#endif +} XGCValuesWithCache; + /* *---------------------------------------------------------------------- * @@ -110,9 +117,7 @@ XCreateGC( * initialization. */ -#define MAX_DASH_LIST_SIZE 10 - - gp = (GC)ckalloc(sizeof(XGCValues) + MAX_DASH_LIST_SIZE + gcCacheSize); + gp = (GC)ckalloc(sizeof(XGCValuesWithCache)); if (!gp) { return NULL; } @@ -175,8 +180,7 @@ XCreateGC( TkpGCCache* TkpGetGCCache(GC gc) { - return (gc ? (TkpGCCache*)(((char*) gc) + sizeof(XGCValues) + - MAX_DASH_LIST_SIZE) : NULL); + return (gc ? &((XGCValuesWithCache *)gc)->cache : NULL); } #endif |