summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@beryl-project.org>2007-05-09 13:41:40 +0200
committerDennis kasprzyk <onestone@beryl-project.org>2007-05-09 13:41:40 +0200
commitbc060c11cd5a278880e487dd6673936c5b1a101c (patch)
tree2b3ae49d7317547ed359efdfb64cf4d1d46e5984
parent410baf7adfd5ab5e2b6856ef3bc5a25174a2bdc8 (diff)
downloadberyl-premerge-bc060c11cd5a278880e487dd6673936c5b1a101c.tar.gz
beryl-premerge-bc060c11cd5a278880e487dd6673936c5b1a101c.tar.bz2
Fixes to the wall moving system
-rw-r--r--src/wall.c340
1 files changed, 102 insertions, 238 deletions
diff --git a/src/wall.c b/src/wall.c
index 76153c9..76d4280 100644
--- a/src/wall.c
+++ b/src/wall.c
@@ -35,9 +35,6 @@ Wall Features:
* If you plan on adding a feature not on the above list please bring it up for discussion first. *
****************************************************************************************************
-Known Bugs:
- Current behavior with input zoom is screwy... (disable input zoom?)
-
*/
#include <stdio.h>
#include <stdlib.h>
@@ -78,7 +75,7 @@ enum DnDState
DnDStart
};
-typedef struct _WallCairoContext
+typedef struct _WallCairoContext
{
Pixmap pixmap;
CompTexture texture;
@@ -104,7 +101,6 @@ typedef struct _WallScreen
PaintTransformedScreenProc paintTransformedScreen;
PaintWindowProc paintWindow;
DamageWindowRectProc damageWindowRect;
-// SetClipPlanesProc setClipPlanes;
SetScreenOptionProc setScreenOption;
Bool activatedEdges;
@@ -137,12 +133,10 @@ typedef struct _WallScreen
int mouseOverViewX;
int mouseOverViewY;
- int destx;
- int desty;
- int curx;
- int cury;
-
- int timer;
+ float curPosX;
+ float curPosY;
+ int gotoX;
+ int gotoY;
Bool anyClick;
int boxTimeout;
@@ -159,7 +153,7 @@ typedef struct _WallScreen
float viewportWidth;
float viewportHeight;
float viewportBorder;
-
+
int moveWindowX;
int moveWindowY;
@@ -249,7 +243,7 @@ screenGrabExist (CompScreen *s, ...)
return FALSE;
}
-static Bool
+static Bool
pointerOnlyOnDesktop(CompScreen * s, int pointerX, int pointerY)
{
CompWindow *w;
@@ -291,7 +285,7 @@ static void wallDrawSwitcherBackground(CompScreen *s)
WALL_SCREEN(s);
cairo_t * cr = ws->switcherContext->cr;
-
+
cairo_save(cr);
cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
cairo_paint(cr);
@@ -301,10 +295,10 @@ static void wallDrawSwitcherBackground(CompScreen *s)
int hsize = s->hsize;
int vsize = s->vsize;
-
+
float border = 10.0f;
float outline = 2.0f;
-
+
float width = (float) ws->switcherContext->width;
width -= outline;
float height = (float) ws->switcherContext->height;
@@ -330,7 +324,7 @@ static void wallDrawSwitcherBackground(CompScreen *s)
// apply pattern to background...
cairo_fill_preserve(cr);
-
+
// ... and draw an outline
cairo_set_line_width(cr, outline);
cairo_set_source_rgba(cr, 0.2,0.2,0.2,0.85);
@@ -343,9 +337,9 @@ static void wallDrawSwitcherBackground(CompScreen *s)
ws->viewportWidth = viewportWidth;
ws->viewportHeight = viewportHeight;
ws->viewportBorder = border;
-
+
cairo_translate(cr, border, border);
-
+
int i, j;
float vpX, vpY;
@@ -365,9 +359,9 @@ static void wallDrawSwitcherBackground(CompScreen *s)
cairo_fill(cr);
}
}
-
+
cairo_restore(cr);
-
+
}
static void wallDrawThumb(CompScreen *s)
@@ -375,7 +369,7 @@ static void wallDrawThumb(CompScreen *s)
WALL_SCREEN(s);
cairo_t * cr = ws->thumbContext->cr;
-
+
cairo_save(cr);
cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
cairo_paint(cr);
@@ -392,7 +386,7 @@ static void wallDrawThumb(CompScreen *s)
ws->viewportWidth = width;
ws->viewportHeight = height;
ws->viewportBorder = border;
-
+
width -= outline;
height -= outline;
@@ -415,7 +409,7 @@ static void wallDrawThumb(CompScreen *s)
cairo_pattern_destroy(pattern);
cairo_restore(cr);
-
+
}
static void wallDrawHighlight(CompScreen *s)
@@ -423,7 +417,7 @@ static void wallDrawHighlight(CompScreen *s)
WALL_SCREEN(s);
cairo_t * cr = ws->highlightContext->cr;
-
+
cairo_save(cr);
cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
cairo_paint(cr);
@@ -435,7 +429,7 @@ static void wallDrawHighlight(CompScreen *s)
float width = (float) ws->highlightContext->width;
float height = (float) ws->highlightContext->height;
-
+
width -= outline;
height -= outline;
@@ -458,7 +452,7 @@ static void wallDrawHighlight(CompScreen *s)
cairo_pattern_destroy(pattern);
cairo_restore(cr);
-
+
}
static void wallDrawArrow(CompScreen *s)
@@ -466,7 +460,7 @@ static void wallDrawArrow(CompScreen *s)
WALL_SCREEN(s);
cairo_t * cr = ws->arrowContext->cr;
-
+
cairo_save(cr);
cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
cairo_paint(cr);
@@ -478,7 +472,7 @@ static void wallDrawArrow(CompScreen *s)
float width = (float) ws->arrowContext->width;
float height = (float) ws->arrowContext->height;
-
+
width -= outline;
height -= outline;
@@ -514,16 +508,16 @@ static void wallDrawArrow(CompScreen *s)
cairo_stroke(cr);
cairo_restore(cr);
-
+
}
static void wallSetupCairoContext(CompScreen *s, WallCairoContext *context)
{
XRenderPictFormat * format;
Screen * screen;
-
+
screen = ScreenOfDisplay(s->display->display, s->screenNum);
-
+
int width, height;
width = context->width;
height = context->height;
@@ -531,12 +525,12 @@ static void wallSetupCairoContext(CompScreen *s, WallCairoContext *context)
initTexture(s, &context->texture);
format = XRenderFindStandardFormat(s->display->display, PictStandardARGB32);
-
+
context->pixmap = XCreatePixmap(s->display->display, s->root, width, height, 32);
-
+
if (!bindPixmapToTexture(s, &context->texture, context->pixmap, width, height, 32))
printf("Couldn't create cairo context for switcher");
-
+
context->surface = cairo_xlib_surface_create_with_xrender_format(s->display->display, context->pixmap, screen, format, width, height);
context->cr = cairo_create(context->surface);
@@ -557,47 +551,11 @@ static void wallDestroyCairoContext(CompScreen *s, WallCairoContext *context)
cairo_surface_destroy(context->surface);
finiTexture(s, &context->texture);
-
+
if (context->pixmap)
XFreePixmap(s->display->display, context->pixmap);
}
-/* TODO: make setClipPlanes wrappable in core */
-#if 0
-static void wallSetClipPlanes (CompScreen *s, int output)
-{
- WALL_SCREEN(s);
-
- if (ws->moving || ws->expoCam > 0.0)
- {
-
- float XScale = (float)s->width / s->outputDev[output].width;
- float YScale = (float)s->height / s->outputDev[output].height;
-
- float XOffset =
- (s->width / 2.0f -
- (s->outputDev[output].region.extents.x1 +
- s->outputDev[output].region.extents.x2) / 2.0f) /
- (float)s->outputDev[output].width;
-
- float YOffset =
- (s->height / 2.0f -
- (s->outputDev[output].region.extents.y1 +
- s->outputDev[output].region.extents.y2) / 2.0f) /
- (float)s->outputDev[output].height;
-
- glTranslatef(XOffset, -YOffset, 0.0f);
- glScalef( XScale, YScale, 1.0f);
- }
-
-
- UNWRAP(ws, s, setClipPlanes);
- (*s->setClipPlanes) (s, output);
- WRAP(ws, s, setClipPlanes, wallSetClipPlanes);
-
-}
-#endif
-
static Bool wallCheckDestination(CompScreen * s, int destX, int destY)
{
if (s->x - destX < 0)
@@ -628,40 +586,15 @@ static void wallReleaseMoveWindow (CompScreen * s)
static Bool wallMoveViewport(CompScreen * s, int x, int y, Window moveWindow)
{
- int newDestX = MAXSHORT;
- int newDestY = MAXSHORT;
-
if (!x && !y)
return FALSE;
WALL_SCREEN(s);
- if (ws->moving)
- return FALSE;
if (!ws->expoMode)
{
- if (!ws->timer)
- {
- ws->curx = 0;
- ws->cury = 0;
-
- newDestX = x;
- newDestY = y;
- }
-
- if (wallCheckDestination(s, newDestX, newDestY))
+ if (wallCheckDestination(s, x, y))
{
-
- float newTimeout = wallGetSlideDuration(s->display) * 1000.0f *
- (float)(MAX(abs(newDestY), abs(newDestX)));
-
- ws->destx = newDestX;
- ws->desty = newDestY;
- moveScreenViewport(s, ws->destx, ws->desty, TRUE);
-
- ws->moving = TRUE;
- ws->timer = (int)newTimeout - ws->timer;
- ws->boxOutputDevice = s->currentOutputDev;
if (ws->moveWindow != moveWindow)
{
@@ -683,6 +616,20 @@ static Bool wallMoveViewport(CompScreen * s, int x, int y, Window moveWindow)
}
}
}
+
+ if (!ws->moving)
+ {
+ ws->curPosX = s->x;
+ ws->curPosY = s->y;
+ }
+ ws->gotoX = s->x - x;
+ ws->gotoY = s->y - y;
+
+ moveScreenViewport(s, x, y, TRUE);
+
+ ws->moving = TRUE;
+ ws->boxOutputDevice = s->currentOutputDev;
+
}
}
@@ -700,12 +647,7 @@ static Bool wallMoveViewport(CompScreen * s, int x, int y, Window moveWindow)
ws->grabIndex = pushScreenGrab(s, s->invisibleCursor, "wall");
}
else
- {
ws->moving = FALSE;
- ws->destx = 0;
- ws->desty = 0;
- ws->timer = 0;
- }
}
damageScreen(s);
@@ -778,17 +720,17 @@ static void wallHandleEvent(CompDisplay * d, XEvent * event)
{
syncWindowPosition(ws->dndWindow);
(*s->windowUngrabNotify)(ws->dndWindow);
- /* update window attibutes to make sure a
+ /* update window attibutes to make sure a
moved maximized window is properly snapped
to the work area */
- updateWindowAttributes(ws->dndWindow,
+ updateWindowAttributes(ws->dndWindow,
CompStackingUpdateModeNone);
}
ws->dndState = DnDNone;
ws->dndWindow = NULL;
}
- break;
+ break;
case ClientMessage:
if (event->xclient.message_type == d->winActiveAtom)
{
@@ -1336,12 +1278,12 @@ static void wallDrawCairoTextureOnScreen(CompScreen *s, int output, Region regio
left = 2 * left;
screenTexEnvMode (s, GL_MODULATE);
-
+
glColor4f(left,left,left,left);
-
+
glTranslatef(0.0f,0.0f,-(1-left));
-
- ws->mSzCamera = -(1-left);
+
+ ws->mSzCamera = -(1-left);
}
else
ws->mSzCamera = 0.0f;
@@ -1367,7 +1309,7 @@ static void wallDrawCairoTextureOnScreen(CompScreen *s, int output, Region regio
glTexCoord2f(COMP_TEX_COORD_X(&matrix, box.x2), COMP_TEX_COORD_Y(&matrix, box.y1));
glVertex2i(box.x2, box.y1);
glTexCoord2f(COMP_TEX_COORD_X(&matrix, box.x1), COMP_TEX_COORD_Y(&matrix, box.y1));
- glVertex2i(box.x1, box.y1);
+ glVertex2i(box.x1, box.y1);
glEnd();
disableTexture(s, &ws->switcherContext->texture);
@@ -1375,7 +1317,7 @@ static void wallDrawCairoTextureOnScreen(CompScreen *s, int output, Region regio
// draw thumb
width = (float) ws->thumbContext->width;
height = (float) ws->thumbContext->height;
-
+
int i, j;
enableTexture(s, &ws->thumbContext->texture, COMP_TEXTURE_FILTER_FAST);
@@ -1384,7 +1326,7 @@ static void wallDrawCairoTextureOnScreen(CompScreen *s, int output, Region regio
{
for (j = 0; j < s->vsize; j++)
{
- if (i == (s->x - ws->destx) && j == (s->y - ws->desty) && ws->moving)
+ if (i == ws->gotoX && j == ws->gotoY && ws->moving)
continue;
box.x1 = i*(width+border);
@@ -1405,7 +1347,7 @@ static void wallDrawCairoTextureOnScreen(CompScreen *s, int output, Region regio
glTexCoord2f(COMP_TEX_COORD_X(&matrix, box.x2), COMP_TEX_COORD_Y(&matrix, box.y1));
glVertex2i(box.x2, box.y1);
glTexCoord2f(COMP_TEX_COORD_X(&matrix, box.x1), COMP_TEX_COORD_Y(&matrix, box.y1));
- glVertex2i(box.x1, box.y1);
+ glVertex2i(box.x1, box.y1);
}
}
glEnd();
@@ -1447,26 +1389,25 @@ static void wallDrawCairoTextureOnScreen(CompScreen *s, int output, Region regio
enableTexture(s, &ws->arrowContext->texture, COMP_TEXTURE_FILTER_GOOD);
float angle = 0.0f;
-
- if (ws->destx < 0 && ws->desty == 0)
- angle = 90.0f;
+ float dx = ws->gotoX - ws->curPosX;
+ float dy = ws->gotoY - ws->curPosY;
- else if (ws->destx > 0 && ws->desty == 0)
+ if (dx > 0 && dy == 0)
+ angle = 90.0f;
+ else if (dx < 0 && dy == 0)
angle = 270.0f;
-
- else if (ws->desty < 0) {
+ else if (dy > 0) {
angle = 180.0f;
-
- if (ws->destx > 0)
+
+ if (dx < 0)
angle += 45.0f;
- else if (ws->destx < 0)
+ else if (dx > 0)
angle -= 45.0f;
}
-
- else if (ws->desty > 0) {
- if (ws->destx > 0)
+ else if (dy < 0) {
+ if (dx < 0)
angle = -45.0f;
- else if (ws->destx < 0)
+ else if (dx > 0)
angle = 45.0f;
}
@@ -1567,7 +1508,7 @@ static void wallDrawCairoTextureOnScreen(CompScreen *s, int output, Region regio
glTexCoord2f(COMP_TEX_COORD_X(&matrix, box.x2), COMP_TEX_COORD_Y(&matrix, box.y1));
glVertex2i(box.x2, box.y1);
glTexCoord2f(COMP_TEX_COORD_X(&matrix, box.x1), COMP_TEX_COORD_Y(&matrix, box.y1));
- glVertex2i(box.x1, box.y1);
+ glVertex2i(box.x1, box.y1);
glEnd();
disableTexture(s, &ws->arrowContext->texture);
@@ -1614,8 +1555,8 @@ static Bool wallPaintScreen(CompScreen * s,
&sTransform, &infiniteRegion, 0);
}
-
- if ((ws->moving || ws->boxTimeout) && wallGetShowSwitcher(s->display) &&
+
+ if ((ws->moving || ws->boxTimeout) && wallGetShowSwitcher(s->display) &&
(output == ws->boxOutputDevice))
{
wallDrawCairoTextureOnScreen(s, output, region);
@@ -1673,34 +1614,6 @@ static Bool wallPaintScreen(CompScreen * s,
return status;
}
-static void wallGetDistanceForAnimation(CompScreen *s, double left, int output, float *rdx, float *rdy)
-{
- WALL_SCREEN(s);
-
- // 1.44 isn't a magic number, it can be easily derived from the
- // following
- // integral x^2=x^3/3, then solve for x = 1 as we want to translate by 1
- // total, you get 1.44 and the (tx-1.44) is to translate the parabola
- // right by 1.44
- float tx = (1 - left) * 1.4422495;
- float dx = (tx - 1.4422495) * (tx - 1.4422495) / 2;
-
- dx = 1 - dx;
- //dx *= s->width / (float)s->outputDev[output].width;
- dx *= ws->destx;
-
- float dy = (tx - 1.4422495) * (tx - 1.4422495) / 2;
- dy = 1 - dy;
- //dy *= (s->height) / (float)s->outputDev[output].height;
- dy *= ws->desty;
-
- if (rdx)
- *rdx = dx;
-
- if (rdy)
- *rdy = dy;
-}
-
static void wallPreparePaintScreen(CompScreen * s, int ms)
{
WALL_SCREEN(s);
@@ -1737,31 +1650,37 @@ static void wallPreparePaintScreen(CompScreen * s, int ms)
if (ws->moving)
{
- ws->timer -= ms;
+ float dx,dy,mv;
+
+ mv = (float)ms / (wallGetSlideDuration(s->display) * 1000.0f);
+
+ dx = ws->gotoX - ws->curPosX;
+ dy = ws->gotoY - ws->curPosY;
+
+ ws->curPosX = (dx > 0)? MIN(ws->curPosX + mv, ws->gotoX): MAX(ws->curPosX - mv, ws->gotoX);
+ ws->curPosY = (dy > 0)? MIN(ws->curPosY + mv, ws->gotoY): MAX(ws->curPosY - mv, ws->gotoY);
+
+
if (ws->moveWindow)
{
CompWindow *w;
-
- double left = (float)ws->timer / (wallGetSlideDuration(s->display) * 1000.0f *
- MAX(abs(ws->destx), abs(ws->desty)));
-
+
w = findWindowAtScreen(s, ws->moveWindow);
if (w)
{
- float dx, dy;
+ dx = ws->gotoX - ws->curPosX;
+ dy = ws->gotoY - ws->curPosY;
- wallGetDistanceForAnimation(s, left, s->currentOutputDev, &dx, &dy);
-
moveWindow (w, ws->moveWindowX - w->attrib.x, ws->moveWindowY - w->attrib.y, TRUE, TRUE);
moveWindowToViewportPosition(w, ws->moveWindowX - s->width*dx, ws->moveWindowY - s->height*dy, TRUE);
}
}
}
- if (ws->moving && ws->timer <= 0)
+ if (ws->moving && ws->curPosX == ws->gotoX && ws->curPosY == ws->gotoY)
{
ws->moving = FALSE;
- ws->timer = 0;
+
if (ws->moveWindow)
wallReleaseMoveWindow(s);
else
@@ -1829,7 +1748,7 @@ static void wallPaintTransformedScreen(CompScreen * s,
(*s->paintTransformedScreen) (s, sAttrib, &sTransform, region, output, mask);
mask &= ~PAINT_SCREEN_CLEAR_MASK;
-
+
if (ws->expoCam > 0.0)
{
int oldFilter = s->display->textureFilter;
@@ -1850,7 +1769,7 @@ static void wallPaintTransformedScreen(CompScreen * s,
float hss = (float)s->width / s->outputDev[output].width;
float vss = (float)s->height / s->outputDev[output].height;
-
+
vpCamPos.x = s->hsize * hss * ((s->x + 0.5) / s->hsize - 0.5) + gapx * (s->x);
vpCamPos.y = -s->vsize * vss * ((s->y + 0.5) / s->vsize - 0.5) - gapy * (s->y);
vpCamPos.z = 0;
@@ -2021,31 +1940,25 @@ static void wallPaintTransformedScreen(CompScreen * s,
}
else if (ws->moving)
{
- double left = (float)ws->timer / (wallGetSlideDuration(s->display) * 1000.0f *
- MAX(abs(ws->destx), abs(ws->desty)));
int origx = s->x;
int origy = s->y;
clearTargetOutput(s->display, GL_COLOR_BUFFER_BIT);
- float dx, dy, px, py;
+ float px, py;
int tx, ty;
float mx = (s->width / (float)s->outputDev[output].width);
float my = (s->height / (float)s->outputDev[output].height);
- wallGetDistanceForAnimation(s, left, output, &dx, &dy);
ScreenPaintAttrib sA = *sAttrib;
+ px = ws->curPosX;
+ py = ws->curPosY;
-
- px = origx + ws->destx - dx;
- py = origy + ws->desty - dy;
-
-
if (floor(py) != ceil(py))
{
- ty = ceil(py) - s->y;
+ ty = ceil(py) - s->y;
sA.yTranslate = (fmod(py,1) - 1) * my;
if (floor(px) != ceil(px))
{
@@ -2054,15 +1967,16 @@ static void wallPaintTransformedScreen(CompScreen * s,
sA.xTranslate = (1-fmod(px,1)) * mx;
(*s->paintTransformedScreen) (s, &sA, &sTransform,
&s->region, output, mask);
+ moveScreenViewport(s, tx, ty, FALSE);
}
tx = floor(px) - s->x;
moveScreenViewport(s, - tx, -ty, FALSE);
sA.xTranslate = (-fmod(px,1)) * mx;
(*s->paintTransformedScreen) (s, &sA, &sTransform,
&s->region, output, mask);
-
+ moveScreenViewport(s, tx, ty, FALSE);
}
-
+
ty = floor(py) - s->y;
sA.yTranslate = (fmod(py,1)) * my;
if (floor(px) != ceil(px))
@@ -2072,14 +1986,15 @@ static void wallPaintTransformedScreen(CompScreen * s,
sA.xTranslate = (1-fmod(px,1)) * mx;
(*s->paintTransformedScreen) (s, &sA, &sTransform,
&s->region, output, mask);
+ moveScreenViewport(s, tx, ty, FALSE);
}
tx = floor(px) - s->x;
moveScreenViewport(s, - tx, -ty, FALSE);
sA.xTranslate = (-fmod(px,1)) * mx;
(*s->paintTransformedScreen) (s, &sA, &sTransform,
&s->region, output, mask);
+ moveScreenViewport(s, tx, ty, FALSE);
-
while (s->x != origx)
moveScreenViewport(s, -1, 0, FALSE);
while (s->y != origy)
@@ -2162,9 +2077,9 @@ wallPaintWindow(CompWindow * w,
if (ws->miniScreen)
{
pA.opacity = attrib->opacity * ((float)ws->mSAttribs.opacity / OPAQUE);
- pA.brightness = attrib->brightness *
+ pA.brightness = attrib->brightness *
((float)ws->mSAttribs.brightness / BRIGHT);
- pA.saturation = attrib->saturation *
+ pA.saturation = attrib->saturation *
((float)ws->mSAttribs.saturation / COLOR);
}
@@ -2201,7 +2116,7 @@ static void wallDonePaintScreen(CompScreen * s)
int dy = ws->newCursorY - ws->prevCursorY;
if (ws->dndWindow && !ws->stickyWindow)
- moveWindow(ws->dndWindow, dx, dy, TRUE, wallGetExpoImmediateMove(s->display));
+ moveWindow(ws->dndWindow, dx, dy, TRUE, wallGetExpoImmediateMove(s->display));
ws->prevCursorX = ws->newCursorX;
ws->prevCursorY = ws->newCursorY;
@@ -2267,7 +2182,7 @@ static void wallDonePaintScreen(CompScreen * s)
ws->prevCursorY = ws->newCursorY;
}
-static
+static
Bool wallSetScreenOptionCore(CompScreen *screen, char *name, CompOptionValue *value)
{
WALL_SCREEN(screen);
@@ -2312,38 +2227,6 @@ Bool wallSetScreenOptionCore(CompScreen *screen, char *name, CompOptionValue *va
return status;
}
-#if 0
-static void
-wallInitFlipScreenEdges(CompScreen *s)
-{
- WALL_DISPLAY(s->display);
- WALL_SCREEN(s);
-
- if (wallGetEdgeflipPointer(s) || wallGetEdgeflipMove(s) ||
- wallGetEdgeflipDnd(s))
- {
- if (!ws->activatedEdges)
- {
- addScreenAction(s, wallGetFlipLeft(s->display));
- addScreenAction(s, wallGetFlipRight(s->display));
- addScreenAction(s, wallGetFlipUp(s->display));
- addScreenAction(s, wallGetFlipDown(s->display));
- ws->activatedEdges = TRUE;
- }
- }
- else
- {
- if (ws->activatedEdges)
- {
- removeScreenAction(s, wallGetFlipLeft(s->display));
- removeScreenAction(s, wallGetFlipRight(s->display));
- removeScreenAction(s, wallGetFlipUp(s->display));
- removeScreenAction(s, wallGetFlipDown(s->display));
- ws->activatedEdges = FALSE;
- }
- }
-}
-#endif
static Bool wallInitDisplay(CompPlugin * p, CompDisplay * d)
{
@@ -2407,17 +2290,11 @@ static Bool wallInitScreen(CompPlugin * p, CompScreen * s)
if (!ws)
return FALSE;
-// s->projectionStyle = COMP_PERSPECTIVE_GLOBAL;
-
ws->windowPrivateIndex = allocateWindowPrivateIndex(s);
ws->boxTimeout = 0;
- ws->timer = 0;
ws->anyClick = FALSE;
- ws->destx = 0;
- ws->desty = 0;
-
ws->moving = FALSE;
ws->activatedEdges = FALSE;
@@ -2448,11 +2325,9 @@ static Bool wallInitScreen(CompPlugin * p, CompScreen * s)
WRAP(ws, s, preparePaintScreen, wallPreparePaintScreen);
WRAP(ws, s, paintWindow, wallPaintWindow);
WRAP(ws, s, damageWindowRect, wallDamageWindowRect);
-// WRAP(ws, s, setClipPlanes, wallSetClipPlanes);
WRAP(ws, s, setScreenOption, wallSetScreenOptionCore);
s->privates[wd->screenPrivateIndex].ptr = ws;
-// wallInitFlipScreenEdges(s);
// calculate the width of the switcher window
float border = 10.0f;
@@ -2496,23 +2371,12 @@ static void wallFiniScreen(CompPlugin * p, CompScreen * s)
wallDestroyCairoContext(s, ws->highlightContext);
wallDestroyCairoContext(s, ws->arrowContext);
-#if 0
- if (ws->activatedEdges)
- {
- removeScreenAction(s, wallGetFlipLeft(s->display));
- removeScreenAction(s, wallGetFlipRight(s->display));
- removeScreenAction(s, wallGetFlipUp(s->display));
- removeScreenAction(s, wallGetFlipDown(s->display));
- }
-#endif
-
UNWRAP(ws, s, paintScreen);
UNWRAP(ws, s, donePaintScreen);
UNWRAP(ws, s, paintTransformedScreen);
UNWRAP(ws, s, preparePaintScreen);
UNWRAP(ws, s, paintWindow);
UNWRAP(ws, s, damageWindowRect);
-// UNWRAP(ws, s, setClipPlanes);
UNWRAP(ws, s, setScreenOption);
free(ws);