diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-01-02 15:58:57 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-01-02 15:58:57 (GMT) |
commit | 55091eb14914c24bbae66062f600e2ec17b3352b (patch) | |
tree | fbf3d1dda6b1c4120ea8de8abb0cca9a64c695e1 /win/tkWinPixmap.c | |
parent | 73d95cf6f972ef7af3b41b2d80f1f7ba62f41878 (diff) | |
download | tk-55091eb14914c24bbae66062f600e2ec17b3352b.zip tk-55091eb14914c24bbae66062f600e2ec17b3352b.tar.gz tk-55091eb14914c24bbae66062f600e2ec17b3352b.tar.bz2 |
Use more X11 macro's, in stead of accessing fields directly. Mostly backported from 8.7
Diffstat (limited to 'win/tkWinPixmap.c')
-rw-r--r-- | win/tkWinPixmap.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c index e28f348..51ff88c 100644 --- a/win/tkWinPixmap.c +++ b/win/tkWinPixmap.c @@ -40,9 +40,9 @@ Tk_GetPixmap( int planes; Screen *screen; - display->request++; + LastKnownRequestProcessed(display)++; - newTwdPtr = ckalloc(sizeof(TkWinDrawable)); + newTwdPtr = (TkWinDrawable *)ckalloc(sizeof(TkWinDrawable)); newTwdPtr->type = TWD_BITMAP; newTwdPtr->bitmap.depth = depth; twdPtr = (TkWinDrawable *) d; @@ -56,9 +56,9 @@ Tk_GetPixmap( } else { newTwdPtr->bitmap.colormap = twdPtr->bitmap.colormap; } - screen = &display->screens[0]; + screen = ScreenOfDisplay(display, 0); planes = 1; - if (depth == screen->root_depth) { + if (depth == DefaultDepthOfScreen(screen)) { planes = PTR2INT(screen->ext_data); depth /= planes; } @@ -144,7 +144,7 @@ Tk_FreePixmap( { TkWinDrawable *twdPtr = (TkWinDrawable *) pixmap; - display->request++; + LastKnownRequestProcessed(display)++; if (twdPtr != NULL) { DeleteObject(twdPtr->bitmap.handle); ckfree(twdPtr); @@ -208,6 +208,12 @@ XGetGeometry( unsigned int *depth_return) { TkWinDrawable *twdPtr = (TkWinDrawable *)d; + (void)display; + (void)root_return; + (void)x_return; + (void)y_return; + (void)border_width_return; + (void)depth_return; if (twdPtr->type == TWD_BITMAP) { HDC dc; |