Xnest: replace XChangeGC() by xcb_change_gc()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
e71cf9c53a
commit
ebbaf44e9f
|
@ -13,10 +13,15 @@ is" without express or implied warranty.
|
|||
*/
|
||||
#include <dix-config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/Xproto.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
|
||||
#include "screenint.h"
|
||||
#include "input.h"
|
||||
#include "misc.h"
|
||||
|
@ -40,19 +45,16 @@ xnestCursorFuncRec xnestCursorFuncs = { NULL };
|
|||
Bool
|
||||
xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||
{
|
||||
unsigned long valuemask;
|
||||
XGCValues values;
|
||||
uint32_t valuemask = XCB_GC_FUNCTION | XCB_GC_PLANE_MASK | XCB_GC_FOREGROUND
|
||||
| XCB_GC_BACKGROUND | XCB_GC_CLIP_MASK;
|
||||
|
||||
valuemask = GCFunction |
|
||||
GCPlaneMask | GCForeground | GCBackground | GCClipMask;
|
||||
xcb_params_gc_t values = {
|
||||
.function = XCB_GX_COPY,
|
||||
.plane_mask = ((uint32_t)~0L),
|
||||
.foreground = 1L,
|
||||
};
|
||||
|
||||
values.function = GXcopy;
|
||||
values.plane_mask = AllPlanes;
|
||||
values.foreground = 1L;
|
||||
values.background = 0L;
|
||||
values.clip_mask = XCB_PIXMAP_NONE;
|
||||
|
||||
XChangeGC(xnestDisplay, xnestBitmapGC, valuemask, &values);
|
||||
xcb_aux_change_gc(xnestUpstreamInfo.conn, xnestBitmapGC->gid, valuemask, &values);
|
||||
|
||||
uint32_t const winId = xnestDefaultWindows[pScreen->myNum];
|
||||
|
||||
|
|
|
@ -13,10 +13,15 @@ is" without express or implied warranty.
|
|||
*/
|
||||
#include <dix-config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/Xproto.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
|
||||
#include "gcstruct.h"
|
||||
#include "windowstr.h"
|
||||
#include "pixmapstr.h"
|
||||
|
@ -26,6 +31,7 @@ is" without express or implied warranty.
|
|||
#include "region.h"
|
||||
|
||||
#include "Xnest.h"
|
||||
#include "xnest-xcb.h"
|
||||
|
||||
#include "Display.h"
|
||||
#include "XNGC.h"
|
||||
|
@ -92,7 +98,7 @@ xnestValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
|
|||
void
|
||||
xnestChangeGC(GCPtr pGC, unsigned long mask)
|
||||
{
|
||||
XGCValues values;
|
||||
xcb_params_gc_t values;
|
||||
|
||||
if (mask & GCFunction)
|
||||
values.function = pGC->alu;
|
||||
|
@ -135,10 +141,10 @@ xnestChangeGC(GCPtr pGC, unsigned long mask)
|
|||
values.stipple = xnestPixmap(pGC->stipple);
|
||||
|
||||
if (mask & GCTileStipXOrigin)
|
||||
values.ts_x_origin = pGC->patOrg.x;
|
||||
values.tile_stipple_origin_x = pGC->patOrg.x;
|
||||
|
||||
if (mask & GCTileStipYOrigin)
|
||||
values.ts_y_origin = pGC->patOrg.y;
|
||||
values.tile_stipple_origin_y = pGC->patOrg.y;
|
||||
|
||||
if (mask & GCFont)
|
||||
values.font = xnestFont(pGC->font);
|
||||
|
@ -150,10 +156,10 @@ xnestChangeGC(GCPtr pGC, unsigned long mask)
|
|||
values.graphics_exposures = pGC->graphicsExposures;
|
||||
|
||||
if (mask & GCClipXOrigin)
|
||||
values.clip_x_origin = pGC->clipOrg.x;
|
||||
values.clip_originX = pGC->clipOrg.x;
|
||||
|
||||
if (mask & GCClipYOrigin)
|
||||
values.clip_y_origin = pGC->clipOrg.y;
|
||||
values.clip_originY = pGC->clipOrg.y;
|
||||
|
||||
if (mask & GCClipMask) /* this is handled in change clip */
|
||||
mask &= ~GCClipMask;
|
||||
|
@ -171,7 +177,10 @@ xnestChangeGC(GCPtr pGC, unsigned long mask)
|
|||
values.arc_mode = pGC->arcMode;
|
||||
|
||||
if (mask)
|
||||
XChangeGC(xnestDisplay, xnestGC(pGC), mask, &values);
|
||||
xcb_aux_change_gc(xnestUpstreamInfo.conn,
|
||||
xnest_upstream_gc(pGC),
|
||||
mask,
|
||||
&values);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue