Xnest: move xnestBitmapGC into struct xnest_upstream_info

This is per upstream connection state, so it's better of in the
upstream information struct.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-09-05 10:16:48 +02:00
parent 3a317cdd8b
commit 1dbffd9368
4 changed files with 6 additions and 7 deletions

View File

@ -52,7 +52,7 @@ xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
.foreground = 1L,
};
xcb_aux_change_gc(xnestUpstreamInfo.conn, xnestBitmapGC, valuemask, &values);
xcb_aux_change_gc(xnestUpstreamInfo.conn, xnestUpstreamInfo.bitmapGC, valuemask, &values);
uint32_t const winId = xnest_screen_priv(pScreen)->upstream_frame_window;
@ -67,7 +67,7 @@ xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
xcb_put_image(xnestUpstreamInfo.conn,
XCB_IMAGE_FORMAT_XY_BITMAP,
source,
xnestBitmapGC,
xnestUpstreamInfo.bitmapGC,
pCursor->bits->width,
pCursor->bits->height,
0, // x
@ -80,7 +80,7 @@ xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
xcb_put_image(xnestUpstreamInfo.conn,
XCB_IMAGE_FORMAT_XY_BITMAP,
mask,
xnestBitmapGC,
xnestUpstreamInfo.bitmapGC,
pCursor->bits->width,
pCursor->bits->height,
0, // x

View File

@ -41,7 +41,6 @@ int xnestNumPixmapFormats;
Drawable xnestDefaultDrawables[MAXDEPTH + 1];
Pixmap xnestIconBitmap;
Pixmap xnestScreenSaverPixmap;
uint32_t xnestBitmapGC;
uint32_t xnestEventMask;
void
@ -85,9 +84,9 @@ xnestOpenDisplay(int argc, char *argv[])
}
}
xnestBitmapGC = xcb_generate_id(xnestUpstreamInfo.conn);
xnestUpstreamInfo.bitmapGC = xcb_generate_id(xnestUpstreamInfo.conn);
xcb_create_gc(xnestUpstreamInfo.conn,
xnestBitmapGC,
xnestUpstreamInfo.bitmapGC,
xnestDefaultDrawables[1],
0,
NULL);

View File

@ -26,7 +26,6 @@ extern int xnestNumPixmapFormats;
extern Drawable xnestDefaultDrawables[MAXDEPTH + 1];
extern Pixmap xnestIconBitmap;
extern Pixmap xnestScreenSaverPixmap;
extern uint32_t xnestBitmapGC;
extern uint32_t xnestEventMask;
void xnestOpenDisplay(int argc, char *argv[]);

View File

@ -36,6 +36,7 @@ struct xnest_upstream_info {
const xcb_screen_t *screenInfo;
const xcb_setup_t *setup;
struct xnest_event_queue eventQueue;
xcb_gc_t bitmapGC;
};
extern struct xnest_screen_info xnestScreens[MAXSCREENS];