summaryrefslogtreecommitdiffstats
path: root/unix/xserver
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2008-03-26 18:59:58 +0000
committerAdam Tkac <atkac@redhat.com>2008-03-26 18:59:58 +0000
commita553c452da6f29bdb0e66c18b289aefe250845c6 (patch)
tree013c2a6e241b009b3ed171f91af85d2e6e432529 /unix/xserver
parent90a93ea844587ae92f53f069eb076993a0c2ab7a (diff)
downloadtigervnc-a553c452da6f29bdb0e66c18b289aefe250845c6.tar.gz
tigervnc-a553c452da6f29bdb0e66c18b289aefe250845c6.zip
PaintWindowBackground and PaintWindowBorder hooks are no longer used.
PolyFillRect hook is used instead and it needs modified ValidateGC hook. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2452 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/xserver')
-rw-r--r--unix/xserver/hw/vnc/vncHooks.cc63
1 files changed, 6 insertions, 57 deletions
diff --git a/unix/xserver/hw/vnc/vncHooks.cc b/unix/xserver/hw/vnc/vncHooks.cc
index 010c4277..0d4392fe 100644
--- a/unix/xserver/hw/vnc/vncHooks.cc
+++ b/unix/xserver/hw/vnc/vncHooks.cc
@@ -66,8 +66,6 @@ typedef struct {
CloseScreenProcPtr CloseScreen;
CreateGCProcPtr CreateGC;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
RestoreAreasProcPtr RestoreAreas;
@@ -99,10 +97,6 @@ static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey;
static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen);
static Bool vncHooksCreateGC(GCPtr pGC);
-static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion,
- int what);
-static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion,
- int what);
static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
RegionPtr pOldRegion);
static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w,
@@ -222,8 +216,6 @@ Bool vncHooksInit(ScreenPtr pScreen, XserverDesktop* desktop)
vncHooksScreen->CloseScreen = pScreen->CloseScreen;
vncHooksScreen->CreateGC = pScreen->CreateGC;
- vncHooksScreen->PaintWindowBackground = pScreen->PaintWindowBackground;
- vncHooksScreen->PaintWindowBorder = pScreen->PaintWindowBorder;
vncHooksScreen->CopyWindow = pScreen->CopyWindow;
vncHooksScreen->ClearToBackground = pScreen->ClearToBackground;
vncHooksScreen->RestoreAreas = pScreen->RestoreAreas;
@@ -241,8 +233,6 @@ Bool vncHooksInit(ScreenPtr pScreen, XserverDesktop* desktop)
pScreen->CloseScreen = vncHooksCloseScreen;
pScreen->CreateGC = vncHooksCreateGC;
- pScreen->PaintWindowBackground = vncHooksPaintWindowBackground;
- pScreen->PaintWindowBorder = vncHooksPaintWindowBorder;
pScreen->CopyWindow = vncHooksCopyWindow;
pScreen->ClearToBackground = vncHooksClearToBackground;
pScreen->RestoreAreas = vncHooksRestoreAreas;
@@ -288,8 +278,6 @@ static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen_)
SCREEN_UNWRAP(pScreen_, CloseScreen);
pScreen->CreateGC = vncHooksScreen->CreateGC;
- pScreen->PaintWindowBackground = vncHooksScreen->PaintWindowBackground;
- pScreen->PaintWindowBorder = vncHooksScreen->PaintWindowBorder;
pScreen->CopyWindow = vncHooksScreen->CopyWindow;
pScreen->ClearToBackground = vncHooksScreen->ClearToBackground;
pScreen->RestoreAreas = vncHooksScreen->RestoreAreas;
@@ -322,38 +310,6 @@ static Bool vncHooksCreateGC(GCPtr pGC)
return ret;
}
-// PaintWindowBackground - changed region is the given region
-
-static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion,
- int what)
-{
- SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBackground);
-
- RegionHelper changed(pScreen, pRegion);
-
- (*pScreen->PaintWindowBackground) (pWin, pRegion, what);
-
- vncHooksScreen->desktop->add_changed(changed.reg);
-
- SCREEN_REWRAP(PaintWindowBackground);
-}
-
-// PaintWindowBorder - changed region is the given region
-
-static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion,
- int what)
-{
- SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder);
-
- RegionHelper changed(pScreen, pRegion);
-
- (*pScreen->PaintWindowBorder) (pWin, pRegion, what);
-
- vncHooksScreen->desktop->add_changed(changed.reg);
-
- SCREEN_REWRAP(PaintWindowBorder);
-}
-
// CopyWindow - destination of the copy is the old region, clipped by
// borderClip, translated by the delta. This call only does the copy - it
// doesn't affect any other bits.
@@ -546,7 +502,7 @@ public:
};
-// ValidateGC - wrap the "ops" if a viewable window
+// ValidateGC - wrap the "ops" if a drawable window or pixmap
static void vncHooksValidateGC(GCPtr pGC, unsigned long changes,
DrawablePtr pDrawable)
@@ -556,19 +512,12 @@ static void vncHooksValidateGC(GCPtr pGC, unsigned long changes,
DBGPRINT((stderr,"vncHooksValidateGC called\n"));
(*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
-
+
u.vncHooksGC->wrappedOps = 0;
- if (pDrawable->type == DRAWABLE_WINDOW && ((WindowPtr)pDrawable)->viewable) {
- WindowPtr pWin = (WindowPtr)pDrawable;
- RegionPtr pRegion = &pWin->clipList;
-
- if (pGC->subWindowMode == IncludeInferiors)
- pRegion = &pWin->borderClip;
- if (REGION_NOTEMPTY(pDrawable->pScreen, pRegion)) {
- u.vncHooksGC->wrappedOps = pGC->ops;
- DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n"));
- }
- }
+ if (pDrawable->type == DRAWABLE_WINDOW || pDrawable->type == DRAWABLE_PIXMAP) {
+ u.vncHooksGC->wrappedOps = pGC->ops;
+ DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n"));
+ }
}
// Other GC funcs - just unwrap and call on