summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/thumbnail.c
diff options
context:
space:
mode:
authorracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-24 10:58:19 +0000
committerracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-24 10:58:19 +0000
commit045ba4cb32fa3e1c16216ff8809bd40db9c2ed77 (patch)
treea5f6f2d27646d56bdcf42ddc15c05ce8da8c25e4 /beryl-plugins/src/thumbnail.c
parentcf2abe773b6536e55c6d76d5444fac69ccf70773 (diff)
downloadmarex-dev-045ba4cb32fa3e1c16216ff8809bd40db9c2ed77.tar.gz
marex-dev-045ba4cb32fa3e1c16216ff8809bd40db9c2ed77.tar.bz2
indent.sh on plugins
git-svn-id: file:///beryl/trunk@3081 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/thumbnail.c')
-rw-r--r--beryl-plugins/src/thumbnail.c885
1 files changed, 437 insertions, 448 deletions
diff --git a/beryl-plugins/src/thumbnail.c b/beryl-plugins/src/thumbnail.c
index 25b87fa..1d2e9d8 100644
--- a/beryl-plugins/src/thumbnail.c
+++ b/beryl-plugins/src/thumbnail.c
@@ -108,15 +108,17 @@
static int displayPrivateIndex;
-typedef struct _ThumbDisplay {
- int screenPrivateIndex;
+typedef struct _ThumbDisplay
+{
+ int screenPrivateIndex;
HandleEventProc handleEvent;
Atom winIconGeometryAtom;
} ThumbDisplay;
-typedef struct _Thumbnail {
+typedef struct _Thumbnail
+{
int x;
int y;
int width;
@@ -128,17 +130,18 @@ typedef struct _Thumbnail {
CompWindow *dock;
} Thumbnail;
-typedef struct _ThumbScreen {
- int windowPrivateIndex;
+typedef struct _ThumbScreen
+{
+ int windowPrivateIndex;
CompTimeoutHandle mouseTimeout;
CompTimeoutHandle displayTimeout;
PreparePaintScreenProc preparePaintScreen;
- PaintScreenProc paintScreen;
- PaintWindowProc paintWindow;
+ PaintScreenProc paintScreen;
+ PaintWindowProc paintWindow;
DonePaintScreenProc donePaintScreen;
- DamageWindowRectProc damageWindowRect;
+ DamageWindowRectProc damageWindowRect;
CompWindow *dock;
CompWindow *pointedWin;
@@ -149,10 +152,11 @@ typedef struct _ThumbScreen {
CompTexture glowTexture;
CompTexture windowTexture;
- CompOption opt[THUMB_SCREEN_OPTION_NUM];
+ CompOption opt[THUMB_SCREEN_OPTION_NUM];
} ThumbScreen;
-typedef struct _IconGeometry {
+typedef struct _IconGeometry
+{
int x;
int y;
int width;
@@ -160,29 +164,29 @@ typedef struct _IconGeometry {
Bool isSet;
} IconGeometry;
-typedef struct _ThumbWindow {
+typedef struct _ThumbWindow
+{
IconGeometry ig;
} ThumbWindow;
-static void
-updateWindowIconGeometry (CompWindow *w)
+static void updateWindowIconGeometry(CompWindow * w)
{
THUMB_DISPLAY(w->screen->display);
THUMB_WINDOW(w);
Atom actual;
- int result, format;
- unsigned long n, left;
- unsigned char *data;
- unsigned long *mydata;
+ int result, format;
+ unsigned long n, left;
+ unsigned char *data;
+ unsigned long *mydata;
- result = XGetWindowProperty (w->screen->display->display,
- w->id, td->winIconGeometryAtom, 0L, 4L,
- FALSE, XA_CARDINAL, &actual, &format, &n,
- &left, &data);
+ result = XGetWindowProperty(w->screen->display->display,
+ w->id, td->winIconGeometryAtom, 0L, 4L,
+ FALSE, XA_CARDINAL, &actual, &format, &n,
+ &left, &data);
- mydata = (unsigned long *) data;
+ mydata = (unsigned long *)data;
tw->ig.isSet = FALSE;
@@ -193,14 +197,14 @@ updateWindowIconGeometry (CompWindow *w)
tw->ig.width = mydata[2];
tw->ig.height = mydata[3];
tw->ig.isSet = TRUE;
- XFree (data);
+ XFree(data);
}
}
-static void
-damageThumbRegion (CompScreen *s, Thumbnail *t)
+static void damageThumbRegion(CompScreen * s, Thumbnail * t)
{
REGION region;
+
region.extents.x1 = t->x - t->offset;
region.extents.y1 = t->y - t->offset;
region.extents.x2 = region.extents.x1 + t->width + (t->offset * 2);
@@ -215,8 +219,7 @@ damageThumbRegion (CompScreen *s, Thumbnail *t)
(sqrt((((a)[0] - (b)[0]) * ((a)[0] - (b)[0])) + \
(((a)[1] - (b)[1]) * ((a)[1] - (b)[1]))))
-static void
-thumbUpdateThumbnail( CompScreen *s)
+static void thumbUpdateThumbnail(CompScreen * s)
{
THUMB_SCREEN(s);
@@ -227,7 +230,7 @@ thumbUpdateThumbnail( CompScreen *s)
return;
if (ts->thumb.win)
- damageThumbRegion(s,&ts->thumb);
+ damageThumbRegion(s, &ts->thumb);
ts->oldThumb = ts->thumb;
ts->thumb.win = ts->pointedWin;
@@ -238,6 +241,7 @@ thumbUpdateThumbnail( CompScreen *s)
float maxSize = ts->opt[THUMB_SCREEN_OPTION_SIZE].value.i;
double scale = 1.0;
+
// do we nee to scale the window down?
if (WIN_W(ts->thumb.win) > maxSize || WIN_H(ts->thumb.win) > maxSize)
{
@@ -254,15 +258,18 @@ thumbUpdateThumbnail( CompScreen *s)
THUMB_WINDOW(ts->thumb.win);
int igMidPoint[2] = { tw->ig.x + (tw->ig.width / 2),
- tw->ig.y + (tw->ig.height / 2)};
+ tw->ig.y + (tw->ig.height / 2)
+ };
int tMidPoint[2];
int tPos[2];
int tmpPos[2];
float distance = 1000000;
int off = ts->opt[THUMB_SCREEN_OPTION_BORDER].value.i;
- int oDev = screenGetOutputDev(s,tw->ig.x,tw->ig.y,tw->ig.width,tw->ig.height);
- int ox1,oy1,ox2,oy2,ow,oh;
+ int oDev = screenGetOutputDev(s, tw->ig.x, tw->ig.y, tw->ig.width,
+ tw->ig.height);
+ int ox1, oy1, ox2, oy2, ow, oh;
+
if (s->nOutputDev == 1 || oDev > s->nOutputDev)
{
ox1 = 0;
@@ -300,7 +307,7 @@ thumbUpdateThumbnail( CompScreen *s)
tmpPos[0] = ox1 + off;
if (tmpPos[0] + off + ts->thumb.width > ox2)
{
- if (ts->thumb.width + (2*off) < ow)
+ if (ts->thumb.width + (2 * off) < ow)
tmpPos[0] = ox2 - ts->thumb.width - off;
else
tmpPos[0] = ox1 + off;
@@ -313,18 +320,18 @@ thumbUpdateThumbnail( CompScreen *s)
{
tPos[0] = tmpPos[0];
tPos[1] = tmpPos[1];
- distance = GET_DISTANCE(igMidPoint,tMidPoint);
+ distance = GET_DISTANCE(igMidPoint, tMidPoint);
}
// below
tmpPos[1] = WIN_Y(ts->dock) + WIN_H(ts->dock) + off;
tMidPoint[1] = tmpPos[1] + (ts->thumb.height / 2.0);
if (tmpPos[1] + ts->thumb.height + off < oy2 &&
- GET_DISTANCE(igMidPoint,tMidPoint) < distance)
+ GET_DISTANCE(igMidPoint, tMidPoint) < distance)
{
tPos[0] = tmpPos[0];
tPos[1] = tmpPos[1];
- distance = GET_DISTANCE(igMidPoint,tMidPoint);
+ distance = GET_DISTANCE(igMidPoint, tMidPoint);
}
// left
@@ -333,7 +340,7 @@ thumbUpdateThumbnail( CompScreen *s)
tmpPos[1] = oy1 + off;
if (tmpPos[1] + off + ts->thumb.height > oy2)
{
- if (ts->thumb.height + (2*off) < oh)
+ if (ts->thumb.height + (2 * off) < oh)
tmpPos[1] = oy2 - ts->thumb.height - off;
else
tmpPos[1] = oy1 + off;
@@ -342,23 +349,22 @@ thumbUpdateThumbnail( CompScreen *s)
tmpPos[0] = WIN_X(ts->dock) - ts->thumb.width - off;
tMidPoint[0] = tmpPos[0] + (ts->thumb.width / 2.0);
- if (tmpPos[0] > ox1 &&
- GET_DISTANCE(igMidPoint,tMidPoint) < distance)
+ if (tmpPos[0] > ox1 && GET_DISTANCE(igMidPoint, tMidPoint) < distance)
{
tPos[0] = tmpPos[0];
tPos[1] = tmpPos[1];
- distance = GET_DISTANCE(igMidPoint,tMidPoint);
+ distance = GET_DISTANCE(igMidPoint, tMidPoint);
}
// right
tmpPos[0] = WIN_X(ts->dock) + WIN_W(ts->dock) + off;
tMidPoint[0] = tmpPos[0] + (ts->thumb.width / 2.0);
if (tmpPos[0] + ts->thumb.width + off < ox2 &&
- GET_DISTANCE(igMidPoint,tMidPoint) < distance)
+ GET_DISTANCE(igMidPoint, tMidPoint) < distance)
{
tPos[0] = tmpPos[0];
tPos[1] = tmpPos[1];
- distance = GET_DISTANCE(igMidPoint,tMidPoint);
+ distance = GET_DISTANCE(igMidPoint, tMidPoint);
}
ts->thumb.x = tPos[0];
@@ -368,22 +374,21 @@ thumbUpdateThumbnail( CompScreen *s)
ts->thumb.opacity = 0.0;
- damageThumbRegion(s,&ts->thumb);
+ damageThumbRegion(s, &ts->thumb);
}
-static Bool
-thumbShowThumbnail (void *vs)
+static Bool thumbShowThumbnail(void *vs)
{
CompScreen *s = (CompScreen *) vs;
+
THUMB_SCREEN(s);
ts->showingThumb = TRUE;
thumbUpdateThumbnail(s);
- damageThumbRegion(s,&ts->thumb);
+ damageThumbRegion(s, &ts->thumb);
return TRUE;
}
-static Bool
-checkPosition (CompWindow *w)
+static Bool checkPosition(CompWindow * w)
{
THUMB_SCREEN(w->screen);
@@ -392,7 +397,8 @@ checkPosition (CompWindow *w)
// TODO: We need a faster calculation here
Bool onViewport = FALSE;
Region reg = XCreateRegion();
- XIntersectRegion(w->region,&w->screen->region,reg);
+
+ XIntersectRegion(w->region, &w->screen->region, reg);
if (reg->numRects)
onViewport = TRUE;
XDestroyRegion(reg);
@@ -403,8 +409,7 @@ checkPosition (CompWindow *w)
return TRUE;
}
-static Bool
-thumbUpdateMouse (void *vs)
+static Bool thumbUpdateMouse(void *vs)
{
CompScreen *s = (CompScreen *) vs;
@@ -417,9 +422,8 @@ thumbUpdateMouse (void *vs)
Window child_return;
XQueryPointer(s->display->display, s->root,
- &root_return, &child_return,
- &rootX, &rootY, &winX,
- &winY, &mask_return);
+ &root_return, &child_return,
+ &rootX, &rootY, &winX, &winY, &mask_return);
CompWindow *w = findWindowAtDisplay(s->display, child_return);
@@ -439,7 +443,8 @@ thumbUpdateMouse (void *vs)
CompWindow *cw = s->windows;
CompWindow *found = NULL;
- for (;cw && !found;cw = cw->next)
+
+ for (; cw && !found; cw = cw->next)
{
THUMB_WINDOW(cw);
if (!tw->ig.isSet)
@@ -447,15 +452,15 @@ thumbUpdateMouse (void *vs)
if (cw->attrib.map_state != IsViewable && !cw->thumbPixmap)
continue;
if (cw->state & CompWindowStateSkipTaskbarMask)
- continue;
+ continue;
if (cw->state & CompWindowStateSkipPagerMask)
- continue;
+ continue;
if (!cw->managed)
continue;
if (rootX >= tw->ig.x && rootX < tw->ig.x + tw->ig.width &&
rootY >= tw->ig.y && rootY < tw->ig.y + tw->ig.height &&
- checkPosition(cw))
+ checkPosition(cw))
{
found = cw;
}
@@ -471,16 +476,18 @@ thumbUpdateMouse (void *vs)
if (ts->pointedWin != found)
{
compRemoveTimeout(ts->displayTimeout);
- ts->displayTimeout = compAddTimeout(
- ts->opt[THUMB_SCREEN_OPTION_DELAY].value.i,
- thumbShowThumbnail, s);
+ ts->displayTimeout =
+ compAddTimeout(ts->
+ opt[THUMB_SCREEN_OPTION_DELAY].
+ value.i, thumbShowThumbnail,
+ s);
}
}
else
{
ts->displayTimeout =
- compAddTimeout(ts->opt[THUMB_SCREEN_OPTION_DELAY].value.i,
- thumbShowThumbnail, s);
+ compAddTimeout(ts->opt[THUMB_SCREEN_OPTION_DELAY].
+ value.i, thumbShowThumbnail, s);
}
}
ts->pointedWin = found;
@@ -498,7 +505,8 @@ thumbUpdateMouse (void *vs)
ts->showingThumb = FALSE;
}
- } else
+ }
+ else
{
ts->dock = NULL;
if (ts->displayTimeout)
@@ -510,57 +518,57 @@ thumbUpdateMouse (void *vs)
ts->showingThumb = FALSE;
}
- ts->mouseTimeout = compAddTimeout(THUMB_MOUSE_UPDATE_SPEED, thumbUpdateMouse, s);
+ ts->mouseTimeout =
+ compAddTimeout(THUMB_MOUSE_UPDATE_SPEED, thumbUpdateMouse, s);
return FALSE;
}
-static void
-thumbScreenInitOptions (ThumbScreen *ts)
+static void thumbScreenInitOptions(ThumbScreen * ts)
{
- CompOption *o;
-
- o = &ts->opt[THUMB_SCREEN_OPTION_SIZE];
- o->name = "thumb_size";
- o->shortDesc = N_("Thumbnail size");
- o->longDesc = N_("Thumbnail window size");
- o->type = CompOptionTypeInt;
- o->value.i = THUMB_SIZE_DEFAULT;
- o->rest.i.min = THUMB_SIZE_MIN;
- o->rest.i.max = THUMB_SIZE_MAX;
- o->group = N_("Settings");
- o->subGroup = "";
- o->advanced = False;
- o->displayHints = "";
-
-
- o = &ts->opt[THUMB_SCREEN_OPTION_DELAY];
- o->name = "show_delay";
- o->shortDesc = N_("Show delay");
- o->longDesc = N_("Time (in ms) before thumbnail is shown when hovering "
- "over a task button (10-10000)");
- o->type = CompOptionTypeInt;
- o->value.i = THUMB_DELAY_DEFAULT;
- o->rest.i.min = THUMB_DELAY_MIN;
- o->rest.i.max = THUMB_DELAY_MAX;
- o->group = N_("Settings");
- o->subGroup = "";
- o->advanced = False;
- o->displayHints = "";
+ CompOption *o;
+
+ o = &ts->opt[THUMB_SCREEN_OPTION_SIZE];
+ o->name = "thumb_size";
+ o->shortDesc = N_("Thumbnail size");
+ o->longDesc = N_("Thumbnail window size");
+ o->type = CompOptionTypeInt;
+ o->value.i = THUMB_SIZE_DEFAULT;
+ o->rest.i.min = THUMB_SIZE_MIN;
+ o->rest.i.max = THUMB_SIZE_MAX;
+ o->group = N_("Settings");
+ o->subGroup = "";
+ o->advanced = False;
+ o->displayHints = "";
+
+
+ o = &ts->opt[THUMB_SCREEN_OPTION_DELAY];
+ o->name = "show_delay";
+ o->shortDesc = N_("Show delay");
+ o->longDesc = N_("Time (in ms) before thumbnail is shown when hovering "
+ "over a task button (10-10000)");
+ o->type = CompOptionTypeInt;
+ o->value.i = THUMB_DELAY_DEFAULT;
+ o->rest.i.min = THUMB_DELAY_MIN;
+ o->rest.i.max = THUMB_DELAY_MAX;
+ o->group = N_("Settings");
+ o->subGroup = "";
+ o->advanced = False;
+ o->displayHints = "";
o = &ts->opt[THUMB_SCREEN_OPTION_BORDER];
- o->name = "border";
- o->shortDesc = N_("Thumbnail border size");
- o->longDesc = N_("Size of thumbnail border");
- o->type = CompOptionTypeInt;
- o->value.i = THUMB_BORDER_DEFAULT;
- o->rest.i.min = THUMB_BORDER_MIN;
- o->rest.i.max = THUMB_BORDER_MAX;
- o->group = N_("Settings");
- o->subGroup = "";
- o->advanced = False;
- o->displayHints = "";
-
- o = &ts->opt[THUMB_SCREEN_OPTION_COLOR];
+ o->name = "border";
+ o->shortDesc = N_("Thumbnail border size");
+ o->longDesc = N_("Size of thumbnail border");
+ o->type = CompOptionTypeInt;
+ o->value.i = THUMB_BORDER_DEFAULT;
+ o->rest.i.min = THUMB_BORDER_MIN;
+ o->rest.i.max = THUMB_BORDER_MAX;
+ o->group = N_("Settings");
+ o->subGroup = "";
+ o->advanced = False;
+ o->displayHints = "";
+
+ o = &ts->opt[THUMB_SCREEN_OPTION_COLOR];
o->name = "thumb_color";
o->group = N_("Settings");
o->subGroup = N_("");
@@ -589,176 +597,173 @@ thumbScreenInitOptions (ThumbScreen *ts)
o->rest.f.precision = THUMB_FADE_PRECISION;
o = &ts->opt[THUMB_SCREEN_OPTION_CURRENT_VIEWPORT];
- o->name = "current_viewport";
- o->shortDesc = N_("Taskbar shows only windows of current viewport");
- o->longDesc = N_("Set it if the taskbar shows only windows of current viewport");
- o->type = CompOptionTypeBool;
- o->value.b = THUMB_CURRENT_VIEWPORT_DEFAULT;
- o->group = N_("Settings");
- o->subGroup = N_("Taskbar");
- o->advanced = False;
- o->displayHints = "";
+ o->name = "current_viewport";
+ o->shortDesc = N_("Taskbar shows only windows of current viewport");
+ o->longDesc =
+ N_
+ ("Set it if the taskbar shows only windows of current viewport");
+ o->type = CompOptionTypeBool;
+ o->value.b = THUMB_CURRENT_VIEWPORT_DEFAULT;
+ o->group = N_("Settings");
+ o->subGroup = N_("Taskbar");
+ o->advanced = False;
+ o->displayHints = "";
o = &ts->opt[THUMB_SCREEN_OPTION_ALWAYS_TOP];
- o->name = "always_on_top";
- o->shortDesc = N_("Paint thumbnails always on top");
- o->longDesc = N_("Paint thumbnails always on top of the desktop");
- o->type = CompOptionTypeBool;
- o->value.b = THUMB_ALWAYS_TOP_DEFAULT;
- o->group = N_("Settings");
- o->subGroup = N_("Taskbar");
- o->advanced = False;
- o->displayHints = "";
+ o->name = "always_on_top";
+ o->shortDesc = N_("Paint thumbnails always on top");
+ o->longDesc = N_("Paint thumbnails always on top of the desktop");
+ o->type = CompOptionTypeBool;
+ o->value.b = THUMB_ALWAYS_TOP_DEFAULT;
+ o->group = N_("Settings");
+ o->subGroup = N_("Taskbar");
+ o->advanced = False;
+ o->displayHints = "";
o = &ts->opt[THUMB_SCREEN_OPTION_WINDOW_LIKE];
- o->name = "window_like";
- o->shortDesc = N_("Paint window like background");
- o->longDesc = N_("Paint window like background instead of glow");
- o->type = CompOptionTypeBool;
- o->value.b = THUMB_WINDOW_LIKE_DEFAULT;
- o->group = N_("Settings");
- o->subGroup = "";
- o->advanced = False;
- o->displayHints = "";
+ o->name = "window_like";
+ o->shortDesc = N_("Paint window like background");
+ o->longDesc = N_("Paint window like background instead of glow");
+ o->type = CompOptionTypeBool;
+ o->value.b = THUMB_WINDOW_LIKE_DEFAULT;
+ o->group = N_("Settings");
+ o->subGroup = "";
+ o->advanced = False;
+ o->displayHints = "";
o = &ts->opt[THUMB_SCREEN_OPTION_MIPMAP];
- o->name = "mipmap";
- o->shortDesc = N_("Generate Mipmaps");
- o->longDesc = N_("Generate mipmaps when possible for higher quality "
- "scaling");
- o->type = CompOptionTypeBool;
- o->value.b = THUMB_MIPMAP_DEFAULT;
- o->group = N_("Settings");
- o->subGroup = "";
- o->advanced = TRUE;
- o->displayHints = "";
+ o->name = "mipmap";
+ o->shortDesc = N_("Generate Mipmaps");
+ o->longDesc = N_("Generate mipmaps when possible for higher quality "
+ "scaling");
+ o->type = CompOptionTypeBool;
+ o->value.b = THUMB_MIPMAP_DEFAULT;
+ o->group = N_("Settings");
+ o->subGroup = "";
+ o->advanced = TRUE;
+ o->displayHints = "";
}
-static CompOption *
-thumbGetScreenOptions (CompScreen *screen,
- int *count)
+static CompOption *thumbGetScreenOptions(CompScreen * screen, int *count)
{
if (screen)
{
- THUMB_SCREEN (screen);
+ THUMB_SCREEN(screen);
- *count = NUM_OPTIONS (ts);
+ *count = NUM_OPTIONS(ts);
return ts->opt;
}
else
{
- ThumbScreen * ts = malloc(sizeof(ThumbScreen));
+ ThumbScreen *ts = malloc(sizeof(ThumbScreen));
+
thumbScreenInitOptions(ts);
- *count = NUM_OPTIONS (ts);
+ *count = NUM_OPTIONS(ts);
return ts->opt;
}
}
static Bool
-thumbSetScreenOption (CompScreen *screen,
- char *name,
- CompOptionValue *value)
+thumbSetScreenOption(CompScreen * screen, char *name, CompOptionValue * value)
{
- CompOption *o;
- int index;
+ CompOption *o;
+ int index;
- THUMB_SCREEN (screen);
+ THUMB_SCREEN(screen);
- o = compFindOption (ts->opt, NUM_OPTIONS (ts), name, &index);
- if (!o)
- return FALSE;
+ o = compFindOption(ts->opt, NUM_OPTIONS(ts), name, &index);
+ if (!o)
+ return FALSE;
- switch (index)
- {
- case THUMB_SCREEN_OPTION_SIZE:
- case THUMB_SCREEN_OPTION_DELAY:
- case THUMB_SCREEN_OPTION_BORDER:
- if (compSetIntOption (o, value))
- {
- return TRUE;
- }
- break;
- case THUMB_SCREEN_OPTION_COLOR:
- if (compSetColorOption(o, value))
- {
- return TRUE;
- }
- break;
- case THUMB_SCREEN_OPTION_FADE:
- if (compSetFloatOption(o, value))
- {
- return TRUE;
- }
- break;
- case THUMB_SCREEN_OPTION_ALWAYS_TOP:
- case THUMB_SCREEN_OPTION_CURRENT_VIEWPORT:
- case THUMB_SCREEN_OPTION_WINDOW_LIKE:
- case THUMB_SCREEN_OPTION_MIPMAP:
- if (compSetBoolOption(o, value))
- {
- return TRUE;
- }
- default:
- break;
- }
+ switch (index)
+ {
+ case THUMB_SCREEN_OPTION_SIZE:
+ case THUMB_SCREEN_OPTION_DELAY:
+ case THUMB_SCREEN_OPTION_BORDER:
+ if (compSetIntOption(o, value))
+ {
+ return TRUE;
+ }
+ break;
+ case THUMB_SCREEN_OPTION_COLOR:
+ if (compSetColorOption(o, value))
+ {
+ return TRUE;
+ }
+ break;
+ case THUMB_SCREEN_OPTION_FADE:
+ if (compSetFloatOption(o, value))
+ {
+ return TRUE;
+ }
+ break;
+ case THUMB_SCREEN_OPTION_ALWAYS_TOP:
+ case THUMB_SCREEN_OPTION_CURRENT_VIEWPORT:
+ case THUMB_SCREEN_OPTION_WINDOW_LIKE:
+ case THUMB_SCREEN_OPTION_MIPMAP:
+ if (compSetBoolOption(o, value))
+ {
+ return TRUE;
+ }
+ default:
+ break;
+ }
- return FALSE;
+ return FALSE;
}
-static void
-thumbHandleEvent (CompDisplay *d,
- XEvent *event)
+static void thumbHandleEvent(CompDisplay * d, XEvent * event)
{
- THUMB_DISPLAY (d);
+ THUMB_DISPLAY(d);
- UNWRAP (td, d, handleEvent);
- (*d->handleEvent) (d, event);
- WRAP (td, d, handleEvent, thumbHandleEvent);
+ UNWRAP(td, d, handleEvent);
+ (*d->handleEvent) (d, event);
+ WRAP(td, d, handleEvent, thumbHandleEvent);
CompWindow *w;
- switch (event->type)
+ switch (event->type)
{
- case PropertyNotify:
- if (event->xproperty.atom == td->winIconGeometryAtom)
+ case PropertyNotify:
+ if (event->xproperty.atom == td->winIconGeometryAtom)
+ {
+ w = findWindowAtDisplay(d, event->xproperty.window);
+ if (w)
{
- w = findWindowAtDisplay(d, event->xproperty.window);
- if (w)
- {
- updateWindowIconGeometry(w);
- }
+ updateWindowIconGeometry(w);
}
- break;
- case ButtonPress:
- {
- CompScreen *s = findScreenAtDisplay (d, event->xbutton.root);
- if (!s)
- break;
+ }
+ break;
+ case ButtonPress:
+ {
+ CompScreen *s = findScreenAtDisplay(d, event->xbutton.root);
- THUMB_SCREEN(s);
- ts->dock = NULL;
- if (ts->displayTimeout)
- {
- compRemoveTimeout(ts->displayTimeout);
- ts->displayTimeout = 0;
- }
- ts->pointedWin = 0;
- ts->showingThumb = FALSE;
- }
- break;
- default:
+ if (!s)
break;
+
+ THUMB_SCREEN(s);
+ ts->dock = NULL;
+ if (ts->displayTimeout)
+ {
+ compRemoveTimeout(ts->displayTimeout);
+ ts->displayTimeout = 0;
+ }
+ ts->pointedWin = 0;
+ ts->showingThumb = FALSE;
+ }
+ break;
+ default:
+ break;
}
}
-static void
-thumbPaintThumb(CompScreen *s,Thumbnail *t)
+static void thumbPaintThumb(CompScreen * s, Thumbnail * t)
{
THUMB_SCREEN(s);
DrawWindowGeometryProc oldDrawWindowGeometry;
@@ -789,103 +794,104 @@ thumbPaintThumb(CompScreen *s,Thumbnail *t)
int off = t->offset;
glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
if (ts->opt[THUMB_SCREEN_OPTION_WINDOW_LIKE].value.b)
{
- glColor4f(1.0,1.0,1.0,t->opacity);
+ glColor4f(1.0, 1.0, 1.0, t->opacity);
enableTexture(s, &ts->windowTexture, COMP_TEXTURE_FILTER_GOOD);
}
else
{
glColor4us(ts->opt[THUMB_SCREEN_OPTION_COLOR].value.c[0],
- ts->opt[THUMB_SCREEN_OPTION_COLOR].value.c[1],
- ts->opt[THUMB_SCREEN_OPTION_COLOR].value.c[2],
- ts->opt[THUMB_SCREEN_OPTION_COLOR].value.c[3] * t->opacity);
+ ts->opt[THUMB_SCREEN_OPTION_COLOR].value.c[1],
+ ts->opt[THUMB_SCREEN_OPTION_COLOR].value.c[2],
+ ts->opt[THUMB_SCREEN_OPTION_COLOR].value.c[3] *
+ t->opacity);
enableTexture(s, &ts->glowTexture, COMP_TEXTURE_FILTER_GOOD);
}
glBegin(GL_QUADS);
- glTexCoord2f(1,0);
- glVertex2f(wx,wy);
- glVertex2f(wx,wy+height);
- glVertex2f(wx+width,wy+height);
- glVertex2f(wx+width,wy);
-
- glTexCoord2f(0,1);
- glVertex2f(wx-off,wy-off);
- glTexCoord2f(0,0);
- glVertex2f(wx-off,wy);
- glTexCoord2f(1,0);
- glVertex2f(wx,wy);
- glTexCoord2f(1,1);
- glVertex2f(wx,wy-off);
-
- glTexCoord2f(1,1);
- glVertex2f(wx+width,wy-off);
- glTexCoord2f(1,0);
- glVertex2f(wx+width,wy);
- glTexCoord2f(0,0);
- glVertex2f(wx+width+off,wy);
- glTexCoord2f(0,1);
- glVertex2f(wx+width+off,wy-off);
-
- glTexCoord2f(0,0);
- glVertex2f(wx-off,wy+height);
- glTexCoord2f(0,1);
- glVertex2f(wx-off,wy+height+off);
- glTexCoord2f(1,1);
- glVertex2f(wx,wy+height+off);
- glTexCoord2f(1,0);
- glVertex2f(wx,wy+height);
-
- glTexCoord2f(1,0);
- glVertex2f(wx+width,wy+height);
- glTexCoord2f(1,1);
- glVertex2f(wx+width,wy+height+off);
- glTexCoord2f(0,1);
- glVertex2f(wx+width+off,wy+height+off);
- glTexCoord2f(0,0);
- glVertex2f(wx+width+off,wy+height);
-
- glTexCoord2f(1,1);
- glVertex2f(wx,wy-off);
- glTexCoord2f(1,0);
- glVertex2f(wx,wy);
- glTexCoord2f(1,0);
- glVertex2f(wx+width,wy);
- glTexCoord2f(1,1);
- glVertex2f(wx+width,wy-off);
-
- glTexCoord2f(1,0);
- glVertex2f(wx,wy+height);
- glTexCoord2f(1,1);
- glVertex2f(wx,wy+height+off);
- glTexCoord2f(1,1);
- glVertex2f(wx+width,wy+height+off);
- glTexCoord2f(1,0);
- glVertex2f(wx+width,wy+height);
-
- glTexCoord2f(0,0);
- glVertex2f(wx-off,wy);
- glTexCoord2f(0,0);
- glVertex2f(wx-off,wy+height);
- glTexCoord2f(1,0);
- glVertex2f(wx,wy+height);
- glTexCoord2f(1,0);
- glVertex2f(wx,wy);
-
- glTexCoord2f(1,0);
- glVertex2f(wx+width,wy);
- glTexCoord2f(1,0);
- glVertex2f(wx+width,wy+height);
- glTexCoord2f(0,0);
- glVertex2f(wx+width+off,wy+height);
- glTexCoord2f(0,0);
- glVertex2f(wx+width+off,wy);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx, wy);
+ glVertex2f(wx, wy + height);
+ glVertex2f(wx + width, wy + height);
+ glVertex2f(wx + width, wy);
+
+ glTexCoord2f(0, 1);
+ glVertex2f(wx - off, wy - off);
+ glTexCoord2f(0, 0);
+ glVertex2f(wx - off, wy);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx, wy);
+ glTexCoord2f(1, 1);
+ glVertex2f(wx, wy - off);
+
+ glTexCoord2f(1, 1);
+ glVertex2f(wx + width, wy - off);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx + width, wy);
+ glTexCoord2f(0, 0);
+ glVertex2f(wx + width + off, wy);
+ glTexCoord2f(0, 1);
+ glVertex2f(wx + width + off, wy - off);
+
+ glTexCoord2f(0, 0);
+ glVertex2f(wx - off, wy + height);
+ glTexCoord2f(0, 1);
+ glVertex2f(wx - off, wy + height + off);
+ glTexCoord2f(1, 1);
+ glVertex2f(wx, wy + height + off);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx, wy + height);
+
+ glTexCoord2f(1, 0);
+ glVertex2f(wx + width, wy + height);
+ glTexCoord2f(1, 1);
+ glVertex2f(wx + width, wy + height + off);
+ glTexCoord2f(0, 1);
+ glVertex2f(wx + width + off, wy + height + off);
+ glTexCoord2f(0, 0);
+ glVertex2f(wx + width + off, wy + height);
+
+ glTexCoord2f(1, 1);
+ glVertex2f(wx, wy - off);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx, wy);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx + width, wy);
+ glTexCoord2f(1, 1);
+ glVertex2f(wx + width, wy - off);
+
+ glTexCoord2f(1, 0);
+ glVertex2f(wx, wy + height);
+ glTexCoord2f(1, 1);
+ glVertex2f(wx, wy + height + off);
+ glTexCoord2f(1, 1);
+ glVertex2f(wx + width, wy + height + off);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx + width, wy + height);
+
+ glTexCoord2f(0, 0);
+ glVertex2f(wx - off, wy);
+ glTexCoord2f(0, 0);
+ glVertex2f(wx - off, wy + height);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx, wy + height);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx, wy);
+
+ glTexCoord2f(1, 0);
+ glVertex2f(wx + width, wy);
+ glTexCoord2f(1, 0);
+ glVertex2f(wx + width, wy + height);
+ glTexCoord2f(0, 0);
+ glVertex2f(wx + width + off, wy + height);
+ glTexCoord2f(0, 0);
+ glVertex2f(wx + width + off, wy);
glEnd();
@@ -899,8 +905,8 @@ thumbPaintThumb(CompScreen *s,Thumbnail *t)
}
glDisable(GL_BLEND);
- glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
- screenTexEnvMode (s,GL_REPLACE);
+ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+ screenTexEnvMode(s, GL_REPLACE);
glColor4usv(defaultColor);
@@ -931,6 +937,7 @@ static void thumbPreparePaintScreen(CompScreen * s, int ms)
THUMB_SCREEN(s);
float val = ms;
+
val /= 1000;
val /= ts->opt[THUMB_SCREEN_OPTION_FADE].value.f;
@@ -948,16 +955,16 @@ static void thumbPreparePaintScreen(CompScreen * s, int ms)
if (ts->showingThumb && ts->thumb.win == ts->pointedWin)
{
- ts->thumb.opacity = MIN(1.0,ts->thumb.opacity + val);
+ ts->thumb.opacity = MIN(1.0, ts->thumb.opacity + val);
}
if (!ts->showingThumb || ts->thumb.win != ts->pointedWin)
{
- ts->thumb.opacity = MAX(0.0,ts->thumb.opacity - val);
+ ts->thumb.opacity = MAX(0.0, ts->thumb.opacity - val);
}
- ts->oldThumb.opacity = MAX(0.0,ts->oldThumb.opacity - val);
+ ts->oldThumb.opacity = MAX(0.0, ts->oldThumb.opacity - val);
UNWRAP(ts, s, preparePaintScreen);
- (*s->preparePaintScreen) (s,ms);
+ (*s->preparePaintScreen) (s, ms);
WRAP(ts, s, preparePaintScreen, thumbPreparePaintScreen);
}
@@ -966,9 +973,9 @@ static void thumbDonePaintScreen(CompScreen * s)
THUMB_SCREEN(s);
if (ts->thumb.opacity > 0.0 && ts->thumb.opacity < 1.0)
- damageThumbRegion(s,&ts->thumb);
+ damageThumbRegion(s, &ts->thumb);
if (ts->oldThumb.opacity > 0.0 && ts->oldThumb.opacity < 1.0)
- damageThumbRegion(s,&ts->oldThumb);
+ damageThumbRegion(s, &ts->oldThumb);
UNWRAP(ts, s, donePaintScreen);
(*s->donePaintScreen) (s);
@@ -976,15 +983,13 @@ static void thumbDonePaintScreen(CompScreen * s)
}
static Bool
-thumbPaintScreen (CompScreen *s,
- const ScreenPaintAttrib *sAttrib,
- Region region,
- int output,
- unsigned int mask)
+thumbPaintScreen(CompScreen * s,
+ const ScreenPaintAttrib * sAttrib,
+ Region region, int output, unsigned int mask)
{
- Bool status;
+ Bool status;
- THUMB_SCREEN (s);
+ THUMB_SCREEN(s);
unsigned int newMask = mask;
@@ -992,123 +997,115 @@ thumbPaintScreen (CompScreen *s,
(ts->thumb.opacity > 0.0 && ts->thumb.win))
newMask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK;
- UNWRAP (ts, s, paintScreen);
+ UNWRAP(ts, s, paintScreen);
status = (*s->paintScreen) (s, sAttrib, region, output, newMask);
- WRAP (ts, s, paintScreen, thumbPaintScreen);
+ WRAP(ts, s, paintScreen, thumbPaintScreen);
if (ts->opt[THUMB_SCREEN_OPTION_ALWAYS_TOP].value.b)
{
if (ts->oldThumb.opacity > 0.0 && ts->oldThumb.win)
{
glPushMatrix();
- prepareXCoords(s, output,-DEFAULT_Z_CAMERA);
- thumbPaintThumb(s,&ts->oldThumb);
+ prepareXCoords(s, output, -DEFAULT_Z_CAMERA);
+ thumbPaintThumb(s, &ts->oldThumb);
glPopMatrix();
}
if (ts->thumb.opacity > 0.0 && ts->thumb.win)
{
glPushMatrix();
- prepareXCoords(s, output,-DEFAULT_Z_CAMERA);
- thumbPaintThumb(s,&ts->thumb);
+ prepareXCoords(s, output, -DEFAULT_Z_CAMERA);
+ thumbPaintThumb(s, &ts->thumb);
glPopMatrix();
}
}
- return status;
+ return status;
}
static Bool
-thumbPaintWindow (CompWindow *w,
- const WindowPaintAttrib *attrib,
- Region region,
- unsigned int mask)
+thumbPaintWindow(CompWindow * w,
+ const WindowPaintAttrib * attrib,
+ Region region, unsigned int mask)
{
- CompScreen *s = w->screen;
- Bool status;
+ CompScreen *s = w->screen;
+ Bool status;
- THUMB_SCREEN (s);
+ THUMB_SCREEN(s);
- UNWRAP (ts, s, paintWindow);
+ UNWRAP(ts, s, paintWindow);
status = (*s->paintWindow) (w, attrib, region, mask);
- WRAP (ts, s, paintWindow, thumbPaintWindow);
+ WRAP(ts, s, paintWindow, thumbPaintWindow);
if (!ts->opt[THUMB_SCREEN_OPTION_ALWAYS_TOP].value.b)
{
if (ts->oldThumb.opacity > 0.0 && ts->oldThumb.win &&
ts->oldThumb.dock == w)
{
- thumbPaintThumb(s,&ts->oldThumb);
+ thumbPaintThumb(s, &ts->oldThumb);
}
if (ts->thumb.opacity > 0.0 && ts->thumb.win && ts->thumb.dock == w)
{
- thumbPaintThumb(s,&ts->thumb);
+ thumbPaintThumb(s, &ts->thumb);
}
}
- return status;
+ return status;
}
-static Bool
-thumbDamageWindowRect (CompWindow *w,
- Bool initial,
- BoxPtr rect)
+static Bool thumbDamageWindowRect(CompWindow * w, Bool initial, BoxPtr rect)
{
- Bool status;
+ Bool status;
- THUMB_SCREEN (w->screen);
+ THUMB_SCREEN(w->screen);
if (ts->thumb.win == w && ts->thumb.opacity > 0.0)
- damageThumbRegion(w->screen,&ts->thumb);
+ damageThumbRegion(w->screen, &ts->thumb);
if (ts->oldThumb.win == w && ts->oldThumb.opacity > 0.0)
- damageThumbRegion(w->screen,&ts->oldThumb);
+ damageThumbRegion(w->screen, &ts->oldThumb);
- UNWRAP (ts, w->screen, damageWindowRect);
- status = (*w->screen->damageWindowRect) (w, initial, rect);
- WRAP (ts, w->screen, damageWindowRect, thumbDamageWindowRect);
+ UNWRAP(ts, w->screen, damageWindowRect);
+ status = (*w->screen->damageWindowRect) (w, initial, rect);
+ WRAP(ts, w->screen, damageWindowRect, thumbDamageWindowRect);
- return status;
+ return status;
}
-static Bool
-thumbInitDisplay (CompPlugin *p,
- CompDisplay *d)
+static Bool thumbInitDisplay(CompPlugin * p, CompDisplay * d)
{
- ThumbDisplay *td;
+ ThumbDisplay *td;
- td = malloc (sizeof (ThumbDisplay));
- if (!td)
+ td = malloc(sizeof(ThumbDisplay));
+ if (!td)
return FALSE;
- td->screenPrivateIndex = allocateScreenPrivateIndex (d);
- if (td->screenPrivateIndex < 0)
- {
- free (td);
+ td->screenPrivateIndex = allocateScreenPrivateIndex(d);
+ if (td->screenPrivateIndex < 0)
+ {
+ free(td);
return FALSE;
- }
+ }
- td->winIconGeometryAtom = XInternAtom (d->display,
- "_NET_WM_ICON_GEOMETRY", FALSE);
+ td->winIconGeometryAtom = XInternAtom(d->display,
+ "_NET_WM_ICON_GEOMETRY", FALSE);
- WRAP (td, d, handleEvent, thumbHandleEvent);
+ WRAP(td, d, handleEvent, thumbHandleEvent);
- d->privates[displayPrivateIndex].ptr = td;
+ d->privates[displayPrivateIndex].ptr = td;
- return TRUE;
+ return TRUE;
}
-static void
-thumbFiniDisplay (CompPlugin *p,
- CompDisplay *d)
+static void thumbFiniDisplay(CompPlugin * p, CompDisplay * d)
{
- THUMB_DISPLAY (d);
+ THUMB_DISPLAY(d);
- freeScreenPrivateIndex (d, td->screenPrivateIndex);
+ freeScreenPrivateIndex(d, td->screenPrivateIndex);
- UNWRAP (td, d, handleEvent);
+ UNWRAP(td, d, handleEvent);
- free (td);
+ free(td);
}
static Bool thumbInitWindow(CompPlugin * p, CompWindow * w)
@@ -1136,14 +1133,14 @@ static void thumbFiniWindow(CompPlugin * p, CompWindow * w)
if (ts->thumb.win == w)
{
- damageThumbRegion(w->screen,&ts->thumb);
+ damageThumbRegion(w->screen, &ts->thumb);
ts->thumb.win = NULL;
ts->thumb.opacity = 0;
}
if (ts->oldThumb.win == w)
{
- damageThumbRegion(w->screen,&ts->oldThumb);
+ damageThumbRegion(w->screen, &ts->oldThumb);
ts->oldThumb.win = NULL;
ts->oldThumb.opacity = 0;
}
@@ -1154,27 +1151,25 @@ static void thumbFiniWindow(CompPlugin * p, CompWindow * w)
}
-static Bool
-thumbInitScreen (CompPlugin *p,
- CompScreen *s)
+static Bool thumbInitScreen(CompPlugin * p, CompScreen * s)
{
- ThumbScreen *ts;
+ ThumbScreen *ts;
- THUMB_DISPLAY (s->display);
+ THUMB_DISPLAY(s->display);
- ts = calloc (1,sizeof (ThumbScreen));
- if (!ts)
+ ts = calloc(1, sizeof(ThumbScreen));
+ if (!ts)
return FALSE;
ts->windowPrivateIndex = allocateWindowPrivateIndex(s);
- thumbScreenInitOptions (ts);
+ thumbScreenInitOptions(ts);
- WRAP (ts, s, paintScreen, thumbPaintScreen);
- WRAP (ts, s, damageWindowRect, thumbDamageWindowRect);
- WRAP (ts, s, preparePaintScreen, thumbPreparePaintScreen);
- WRAP (ts, s, donePaintScreen, thumbDonePaintScreen);
- WRAP (ts, s, paintWindow, thumbPaintWindow);
+ WRAP(ts, s, paintScreen, thumbPaintScreen);
+ WRAP(ts, s, damageWindowRect, thumbDamageWindowRect);
+ WRAP(ts, s, preparePaintScreen, thumbPreparePaintScreen);
+ WRAP(ts, s, donePaintScreen, thumbDonePaintScreen);
+ WRAP(ts, s, paintWindow, thumbPaintWindow);
ts->dock = NULL;
ts->pointedWin = NULL;
@@ -1183,82 +1178,78 @@ thumbInitScreen (CompPlugin *p,
ts->oldThumb.win = NULL;
ts->showingThumb = FALSE;
- s->privates[td->screenPrivateIndex].ptr = ts;
+ s->privates[td->screenPrivateIndex].ptr = ts;
ts->mouseTimeout =
- compAddTimeout(THUMB_MOUSE_UPDATE_SPEED, thumbUpdateMouse, s);
+ compAddTimeout(THUMB_MOUSE_UPDATE_SPEED, thumbUpdateMouse, s);
- initTexture (s, &ts->glowTexture);
- initTexture (s, &ts->windowTexture);
+ initTexture(s, &ts->glowTexture);
+ initTexture(s, &ts->windowTexture);
- imageToTexture (s, &ts->glowTexture,glowTex,32,32);
- imageToTexture (s, &ts->windowTexture,windowTex,32,32);
+ imageToTexture(s, &ts->glowTexture, glowTex, 32, 32);
+ imageToTexture(s, &ts->windowTexture, windowTex, 32, 32);
- return TRUE;
+ return TRUE;
}
-static void
-thumbFiniScreen (CompPlugin *p,
- CompScreen *s)
+static void thumbFiniScreen(CompPlugin * p, CompScreen * s)
{
- THUMB_SCREEN (s);
+ THUMB_SCREEN(s);
- UNWRAP (ts, s, paintScreen);
- UNWRAP (ts, s, damageWindowRect);
- UNWRAP (ts, s, preparePaintScreen);
- UNWRAP (ts, s, donePaintScreen);
- UNWRAP (ts, s, paintWindow);
+ UNWRAP(ts, s, paintScreen);
+ UNWRAP(ts, s, damageWindowRect);
+ UNWRAP(ts, s, preparePaintScreen);
+ UNWRAP(ts, s, donePaintScreen);
+ UNWRAP(ts, s, paintWindow);
if (ts->mouseTimeout)
- compRemoveTimeout (ts->mouseTimeout);
+ compRemoveTimeout(ts->mouseTimeout);
- finiTexture (s, &ts->glowTexture);
- finiTexture (s, &ts->windowTexture);
+ finiTexture(s, &ts->glowTexture);
+ finiTexture(s, &ts->windowTexture);
- free (ts);
+ free(ts);
}
-static Bool
-thumbInit (CompPlugin *p)
+static Bool thumbInit(CompPlugin * p)
{
- displayPrivateIndex = allocateDisplayPrivateIndex ();
- if (displayPrivateIndex < 0)
+ displayPrivateIndex = allocateDisplayPrivateIndex();
+ if (displayPrivateIndex < 0)
return FALSE;
- return TRUE;
+ return TRUE;
}
-static void
-thumbFini (CompPlugin *p)
+static void thumbFini(CompPlugin * p)
{
- if (displayPrivateIndex >= 0)
- freeDisplayPrivateIndex (displayPrivateIndex);
+ if (displayPrivateIndex >= 0)
+ freeDisplayPrivateIndex(displayPrivateIndex);
}
CompPluginVTable thumbVTable = {
- "thumbnail",
- N_("Window thumbnails"),
- N_("Window thumbnails at the taskbar"),
- thumbInit,
- thumbFini,
- thumbInitDisplay,
- thumbFiniDisplay,
- thumbInitScreen,
- thumbFiniScreen,
- thumbInitWindow,
- thumbFiniWindow,
- 0, /* thumbGetDisplayOptions */
- 0, /* thumbSetDisplayOption */
- thumbGetScreenOptions,
- thumbSetScreenOption,
- 0, /* Deps */
- 0, /* nDeps */
- 0, /* Features */
- 0, /* nFeatures */
+ "thumbnail",
+ N_("Window thumbnails"),
+ N_("Window thumbnails at the taskbar"),
+ thumbInit,
+ thumbFini,
+ thumbInitDisplay,
+ thumbFiniDisplay,
+ thumbInitScreen,
+ thumbFiniScreen,
+ thumbInitWindow,
+ thumbFiniWindow,
+ 0, /* thumbGetDisplayOptions */
+ 0, /* thumbSetDisplayOption */
+ thumbGetScreenOptions,
+ thumbSetScreenOption,
+ 0, /* Deps */
+ 0, /* nDeps */
+ 0, /* Features */
+ 0, /* nFeatures */
BERYL_ABI_INFO,
"thumbnail",
"misc",
@@ -1268,9 +1259,7 @@ CompPluginVTable thumbVTable = {
};
-CompPluginVTable *
-getCompPluginInfo (void)
+CompPluginVTable *getCompPluginInfo(void)
{
- return &thumbVTable;
+ return &thumbVTable;
}
-