summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/move.c
diff options
context:
space:
mode:
authorkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-12-02 16:26:33 +0000
committerkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-12-02 16:26:33 +0000
commitc31c5e2d5c6b525350c2f807095f8b2819a59bd5 (patch)
treead9bf35f3a435cdb444fff636424005fb608b4ce /beryl-plugins/src/move.c
parentd85d0131318217e03b20d15639fced7af7957eb5 (diff)
downloadmarex-dev-c31c5e2d5c6b525350c2f807095f8b2819a59bd5.tar.gz
marex-dev-c31c5e2d5c6b525350c2f807095f8b2819a59bd5.tar.bz2
indent -i8 -kr . All whitespace-changes.
See man indent for details of what -kr does. git-svn-id: file:///beryl/trunk@1499 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/move.c')
-rw-r--r--beryl-plugins/src/move.c1367
1 files changed, 704 insertions, 663 deletions
diff --git a/beryl-plugins/src/move.c b/beryl-plugins/src/move.c
index 5f7fa41..73ecc3d 100644
--- a/beryl-plugins/src/move.c
+++ b/beryl-plugins/src/move.c
@@ -58,21 +58,16 @@
#define MOVE_SNAPBACK_DISTANCE_MIN 1
#define MOVE_SNAPBACK_DISTANCE_MAX 100
-struct _MoveKeys
-{
- char *name;
- int dx;
- int dy;
-} mKeys[] =
-{
- {
- "Left", -1, 0},
- {
- "Right", 1, 0},
- {
- "Up", 0, -1},
- {
- "Down", 0, 1}
+struct _MoveKeys {
+ char *name;
+ int dx;
+ int dy;
+} mKeys[] = {
+ {
+ "Left", -1, 0}, {
+ "Right", 1, 0}, {
+ "Up", 0, -1}, {
+ "Down", 0, 1}
};
#define NUM_KEYS (sizeof (mKeys) / sizeof (mKeys[0]))
@@ -91,35 +86,33 @@ static int displayPrivateIndex;
#define MOVE_DISPLAY_OPTION_SNAPBACK_DISTANCE 7
#define MOVE_DISPLAY_OPTION_NUM 8
-typedef struct _MoveDisplay
-{
- int screenPrivateIndex;
- HandleEventProc handleEvent;
+typedef struct _MoveDisplay {
+ int screenPrivateIndex;
+ HandleEventProc handleEvent;
- CompOption opt[MOVE_DISPLAY_OPTION_NUM];
+ CompOption opt[MOVE_DISPLAY_OPTION_NUM];
- CompWindow *w;
- int x;
- int y;
+ CompWindow *w;
+ int x;
+ int y;
- KeyCode key[NUM_KEYS];
+ KeyCode key[NUM_KEYS];
- GLushort moveOpacity;
- GLushort opacifyMinOpacity;
+ GLushort moveOpacity;
+ GLushort opacifyMinOpacity;
} MoveDisplay;
-typedef struct _MoveScreen
-{
- PaintWindowProc paintWindow;
+typedef struct _MoveScreen {
+ PaintWindowProc paintWindow;
- int grabIndex;
+ int grabIndex;
- Cursor moveCursor;
+ Cursor moveCursor;
- unsigned int origState;
+ unsigned int origState;
- int snapOffY;
- int snapBackY;
+ int snapOffY;
+ int snapBackY;
} MoveScreen;
#define GET_MOVE_DISPLAY(d) \
@@ -137,746 +130,794 @@ typedef struct _MoveScreen
#define NUM_OPTIONS(s) (sizeof ((s)->opt) / sizeof (CompOption))
static Bool
-moveInitiate (CompDisplay * d,
- CompAction * action,
- CompActionState state, CompOption * option, int nOption)
+moveInitiate(CompDisplay * d,
+ CompAction * action,
+ CompActionState state, CompOption * option, int nOption)
{
- CompWindow *w;
- Window xid;
+ CompWindow *w;
+ Window xid;
- MOVE_DISPLAY (d);
+ MOVE_DISPLAY(d);
- xid = getIntOptionNamed (option, nOption, "window", 0);
+ xid = getIntOptionNamed(option, nOption, "window", 0);
- w = findWindowAtDisplay (d, xid);
- if (w)
- {
- XRectangle workArea;
- unsigned int mods;
- int x, y, head;
+ w = findWindowAtDisplay(d, xid);
+ if (w) {
+ XRectangle workArea;
+ unsigned int mods;
+ int x, y, head;
- MOVE_SCREEN (w->screen);
+ MOVE_SCREEN(w->screen);
- head = screenGetOutputDevForWindow (w);
- screenGetOutputDevWorkArea (w->screen, head, &workArea);
+ head = screenGetOutputDevForWindow(w);
+ screenGetOutputDevWorkArea(w->screen, head, &workArea);
- mods = getIntOptionNamed (option, nOption, "modifiers", 0);
+ mods = getIntOptionNamed(option, nOption, "modifiers", 0);
- x = getIntOptionNamed (option, nOption, "x",
- w->attrib.x + (w->width / 2));
- y = getIntOptionNamed (option, nOption, "y",
- w->attrib.y + (w->height / 2));
+ x = getIntOptionNamed(option, nOption, "x",
+ w->attrib.x + (w->width / 2));
+ y = getIntOptionNamed(option, nOption, "y",
+ w->attrib.y + (w->height / 2));
- if (otherScreenGrabExist (w->screen, "move", 0))
- return FALSE;
+ if (otherScreenGrabExist(w->screen, "move", 0))
+ return FALSE;
- if (md->w)
- return FALSE;
+ if (md->w)
+ return FALSE;
- if (w->type & (CompWindowTypeDesktopMask |
- CompWindowTypeDockMask | CompWindowTypeFullscreenMask))
- return FALSE;
+ if (w->type & (CompWindowTypeDesktopMask |
+ CompWindowTypeDockMask |
+ CompWindowTypeFullscreenMask))
+ return FALSE;
- if (w->attrib.override_redirect)
- return FALSE;
+ if (w->attrib.override_redirect)
+ return FALSE;
- if (state & CompActionStateInitButton)
- action->state |= CompActionStateTermButton;
+ if (state & CompActionStateInitButton)
+ action->state |= CompActionStateTermButton;
- md->x = 0;
- md->y = 0;
+ md->x = 0;
+ md->y = 0;
- d->lastPointerX = x;
- d->lastPointerY = y;
+ d->lastPointerX = x;
+ d->lastPointerY = y;
- ms->origState = w->state;
+ ms->origState = w->state;
- ms->snapBackY = w->serverY - workArea.y;
- ms->snapOffY = y - workArea.y;
+ ms->snapBackY = w->serverY - workArea.y;
+ ms->snapOffY = y - workArea.y;
- if (!ms->grabIndex)
- ms->grabIndex =
- pushScreenGrab (w->screen, ms->moveCursor, "move");
+ if (!ms->grabIndex)
+ ms->grabIndex =
+ pushScreenGrab(w->screen, ms->moveCursor,
+ "move");
- if (ms->grabIndex)
- {
- md->w = w;
+ if (ms->grabIndex) {
+ md->w = w;
- (w->screen->windowGrabNotify) (w, x, y, mods,
- CompWindowGrabMoveMask |
- CompWindowGrabButtonMask);
+ (w->screen->windowGrabNotify) (w, x, y, mods,
+ CompWindowGrabMoveMask
+ |
+ CompWindowGrabButtonMask);
- if (state & CompActionStateInitKey)
- {
- int xRoot, yRoot;
+ if (state & CompActionStateInitKey) {
+ int xRoot, yRoot;
- xRoot = w->attrib.x + (w->width / 2);
- yRoot = w->attrib.y + (w->height / 2);
+ xRoot = w->attrib.x + (w->width / 2);
+ yRoot = w->attrib.y + (w->height / 2);
- warpPointer (d, xRoot - d->pointerX, yRoot - d->pointerY);
- }
- }
- }
+ warpPointer(d, xRoot - d->pointerX,
+ yRoot - d->pointerY);
+ }
+ }
+ }
- return FALSE;
+ return FALSE;
}
static Bool
-moveTerminate (CompDisplay * d,
- CompAction * action,
- CompActionState state, CompOption * option, int nOption)
+moveTerminate(CompDisplay * d,
+ CompAction * action,
+ CompActionState state, CompOption * option, int nOption)
{
- MOVE_DISPLAY (d);
+ MOVE_DISPLAY(d);
- if (md->w)
- {
- MOVE_SCREEN (md->w->screen);
+ if (md->w) {
+ MOVE_SCREEN(md->w->screen);
- (md->w->screen->windowUngrabNotify) (md->w);
+ (md->w->screen->windowUngrabNotify) (md->w);
- if (state & CompActionStateCancel)
- moveWindow (md->w,
- md->w->serverX - md->w->attrib.x,
- md->w->serverY - md->w->attrib.y, TRUE, FALSE);
+ if (state & CompActionStateCancel)
+ moveWindow(md->w,
+ md->w->serverX - md->w->attrib.x,
+ md->w->serverY - md->w->attrib.y, TRUE,
+ FALSE);
- syncWindowPosition (md->w);
+ syncWindowPosition(md->w);
- damageScreen (md->w->screen);
+ damageScreen(md->w->screen);
- if (ms->grabIndex)
- {
- removeScreenGrab (md->w->screen, ms->grabIndex, NULL);
- ms->grabIndex = 0;
- }
+ if (ms->grabIndex) {
+ removeScreenGrab(md->w->screen, ms->grabIndex,
+ NULL);
+ ms->grabIndex = 0;
+ }
- md->w = 0;
- }
+ md->w = 0;
+ }
- action->state &= ~(CompActionStateTermKey | CompActionStateTermButton);
+ action->state &=
+ ~(CompActionStateTermKey | CompActionStateTermButton);
- return FALSE;
+ return FALSE;
}
-static void
-moveHandleMotionEvent (CompScreen * s, int xRoot, int yRoot)
+static void moveHandleMotionEvent(CompScreen * s, int xRoot, int yRoot)
{
- MOVE_SCREEN (s);
-
- if (ms->grabIndex)
- {
- CompWindow *w;
- int dx, dy, head;
- XRectangle workArea;
-
- MOVE_DISPLAY (s->display);
-
- w = md->w;
- head = screenGetOutputDev (s, xRoot, yRoot, 0, 0);
- screenGetOutputDevWorkArea (s, head, &workArea);
-
- md->x += xRoot - s->display->lastPointerX;
- md->y += yRoot - s->display->lastPointerY;
-
- if (md->w->syncWait)
- return;
-
- if (w->type & CompWindowTypeFullscreenMask)
- {
- dx = dy = 0;
- }
- else
- {
- int min, max;
-
- dx = md->x;
- dy = md->y;
-
- max = workArea.y + workArea.height;
- min = workArea.y + w->input.top;
-
- if (md->opt[MOVE_DISPLAY_OPTION_CONSTRAIN_Y_TOP].value.b)
- {
- if (w->attrib.y + dy < min)
- dy = min - w->attrib.y;
- if (w->attrib.y + dy > max)
- dy = max - w->attrib.y;
- }
- if (!w->shaded && md->opt[MOVE_DISPLAY_OPTION_CONSTRAIN_Y_BOTTOM].value.b)
- {
- if (w->attrib.y + dy + w->serverHeight > max)
- dy = max - w->attrib.y - w->serverHeight;
- }
-
- if (md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_MAXIMIZED].value.b)
- {
- if (w->state & CompWindowStateMaximizedVertMask)
- {
- if ((yRoot - workArea.y) - ms->snapOffY >=
- md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE].value.i)
- {
- XWindowChanges xwc;
- int width = w->serverWidth;
-
- if (restoreHorzRestoreData (w, &xwc) & CWWidth)
- width = xwc.width;
- restoreVertRestoreData (w, &xwc);
-
- xwc.x = xRoot - (width >> 1);
- xwc.y = yRoot + (w->input.top >> 1);
-
- saveHorzRestoreData (w, &xwc);
- saveVertRestoreData (w, &xwc);
-
- md->x = md->y = 0;
-
- maximizeWindow (w, 0);
-
- ms->snapOffY = ms->snapBackY;
-
- return;
- }
- }
- else if (ms->origState & CompWindowStateMaximizedVertMask)
- {
- if ((yRoot - workArea.y) - ms->snapBackY <
- md->opt[MOVE_DISPLAY_OPTION_SNAPBACK_DISTANCE].value.i)
- {
- if (!otherScreenGrabExist (s, "move", 0))
- {
- int wy;
-
- maximizeWindow (w, ms->origState);
-
- wy = workArea.y + (w->input.top >> 1);
- wy += w->sizeHints.height_inc >> 1;
-
- warpPointer (s->display, 0, wy - s->display->pointerY);
-
- return;
- }
- }
- }
- }
-
- if (w->state & CompWindowStateMaximizedVertMask)
- {
- min = workArea.y + w->input.top;
- max = workArea.y + workArea.height - w->input.bottom -
- w->serverHeight - w->serverBorderWidth * 2;
-
- if (w->attrib.y + dy < min)
- dy = min - w->attrib.y;
- else if (w->attrib.y + dy > max)
- dy = max - w->attrib.y;
- }
-
- if (w->state & CompWindowStateMaximizedHorzMask)
- {
- if (w->attrib.x + w->serverWidth + w->serverBorderWidth < 0)
- return;
-
- min = workArea.x + w->input.left;
- max = workArea.x + workArea.width - w->input.right -
- w->serverWidth - w->serverBorderWidth * 2;
-
- if (w->attrib.x + dx < min)
- dx = min - w->attrib.x;
- else if (w->attrib.x + dx > max)
- dx = max - w->attrib.x;
- }
- }
-
- moveWindow (md->w, dx, dy, TRUE, FALSE);
-
- damageScreen (s);
-
- md->x -= dx;
- md->y -= dy;
- }
+ MOVE_SCREEN(s);
+
+ if (ms->grabIndex) {
+ CompWindow *w;
+ int dx, dy, head;
+ XRectangle workArea;
+
+ MOVE_DISPLAY(s->display);
+
+ w = md->w;
+ head = screenGetOutputDev(s, xRoot, yRoot, 0, 0);
+ screenGetOutputDevWorkArea(s, head, &workArea);
+
+ md->x += xRoot - s->display->lastPointerX;
+ md->y += yRoot - s->display->lastPointerY;
+
+ if (md->w->syncWait)
+ return;
+
+ if (w->type & CompWindowTypeFullscreenMask) {
+ dx = dy = 0;
+ } else {
+ int min, max;
+
+ dx = md->x;
+ dy = md->y;
+
+ max = workArea.y + workArea.height;
+ min = workArea.y + w->input.top;
+
+ if (md->opt[MOVE_DISPLAY_OPTION_CONSTRAIN_Y_TOP].
+ value.b) {
+ if (w->attrib.y + dy < min)
+ dy = min - w->attrib.y;
+ if (w->attrib.y + dy > max)
+ dy = max - w->attrib.y;
+ }
+ if (!w->shaded
+ && md->
+ opt[MOVE_DISPLAY_OPTION_CONSTRAIN_Y_BOTTOM].
+ value.b) {
+ if (w->attrib.y + dy + w->serverHeight >
+ max)
+ dy = max - w->attrib.y -
+ w->serverHeight;
+ }
+
+ if (md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_MAXIMIZED].
+ value.b) {
+ if (w->
+ state &
+ CompWindowStateMaximizedVertMask) {
+ if ((yRoot - workArea.y) -
+ ms->snapOffY >=
+ md->
+ opt
+ [MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE].
+ value.i) {
+ XWindowChanges xwc;
+ int width = w->serverWidth;
+
+ if (restoreHorzRestoreData
+ (w, &xwc) & CWWidth)
+ width = xwc.width;
+ restoreVertRestoreData(w,
+ &xwc);
+
+ xwc.x =
+ xRoot - (width >> 1);
+ xwc.y =
+ yRoot +
+ (w->input.top >> 1);
+
+ saveHorzRestoreData(w,
+ &xwc);
+ saveVertRestoreData(w,
+ &xwc);
+
+ md->x = md->y = 0;
+
+ maximizeWindow(w, 0);
+
+ ms->snapOffY =
+ ms->snapBackY;
+
+ return;
+ }
+ } else if (ms->
+ origState &
+ CompWindowStateMaximizedVertMask)
+ {
+ if ((yRoot - workArea.y) -
+ ms->snapBackY <
+ md->
+ opt
+ [MOVE_DISPLAY_OPTION_SNAPBACK_DISTANCE].
+ value.i) {
+ if (!otherScreenGrabExist
+ (s, "move", 0)) {
+ int wy;
+
+ maximizeWindow(w,
+ ms->
+ origState);
+
+ wy = workArea.y +
+ (w->input.
+ top >> 1);
+ wy +=
+ w->sizeHints.
+ height_inc >>
+ 1;
+
+ warpPointer(s->
+ display,
+ 0,
+ wy -
+ s->
+ display->
+ pointerY);
+
+ return;
+ }
+ }
+ }
+ }
+
+ if (w->state & CompWindowStateMaximizedVertMask) {
+ min = workArea.y + w->input.top;
+ max =
+ workArea.y + workArea.height -
+ w->input.bottom - w->serverHeight -
+ w->serverBorderWidth * 2;
+
+ if (w->attrib.y + dy < min)
+ dy = min - w->attrib.y;
+ else if (w->attrib.y + dy > max)
+ dy = max - w->attrib.y;
+ }
+
+ if (w->state & CompWindowStateMaximizedHorzMask) {
+ if (w->attrib.x + w->serverWidth +
+ w->serverBorderWidth < 0)
+ return;
+
+ min = workArea.x + w->input.left;
+ max =
+ workArea.x + workArea.width -
+ w->input.right - w->serverWidth -
+ w->serverBorderWidth * 2;
+
+ if (w->attrib.x + dx < min)
+ dx = min - w->attrib.x;
+ else if (w->attrib.x + dx > max)
+ dx = max - w->attrib.x;
+ }
+ }
+
+ moveWindow(md->w, dx, dy, TRUE, FALSE);
+
+ damageScreen(s);
+
+ md->x -= dx;
+ md->y -= dy;
+ }
}
-static void
-moveHandleEvent (CompDisplay * d, XEvent * event)
+static void moveHandleEvent(CompDisplay * d, XEvent * event)
{
- CompScreen *s;
-
- MOVE_DISPLAY (d);
-
- switch (event->type)
- {
- case ButtonPress:
- s = findScreenAtDisplay (d, event->xbutton.root);
- if (s)
- {
- MOVE_SCREEN (s);
-
- if (ms->grabIndex)
- {
- moveTerminate (d,
- &md->opt[MOVE_DISPLAY_OPTION_INITIATE].value.action,
- 0, NULL, 0);
- }
- }
- break;
- case KeyPress:
- case KeyRelease:
- s = findScreenAtDisplay (d, event->xkey.root);
- if (s)
- {
- MOVE_SCREEN (s);
-
- if (ms->grabIndex && event->type == KeyPress)
- {
- int i;
-
- for (i = 0; i < NUM_KEYS; i++)
- {
- if (event->xkey.keycode == md->key[i])
- {
- XWarpPointer (d->display, None, None, 0, 0, 0, 0,
- mKeys[i].dx * KEY_MOVE_INC,
- mKeys[i].dy * KEY_MOVE_INC);
- break;
- }
- }
- }
- }
- break;
- case MotionNotify:
- s = findScreenAtDisplay (d, event->xmotion.root);
- if (s)
- moveHandleMotionEvent (s, d->pointerX, d->pointerY);
- break;
- case EnterNotify:
- case LeaveNotify:
- s = findScreenAtDisplay (d, event->xcrossing.root);
- if (s)
- moveHandleMotionEvent (s, d->pointerX, d->pointerY);
- break;
- case ClientMessage:
- if (event->xclient.message_type == d->wmMoveResizeAtom)
- {
- CompWindow *w;
-
- if (event->xclient.data.l[2] == WmMoveResizeMove ||
- event->xclient.data.l[2] == WmMoveResizeMoveKeyboard)
- {
- w = findWindowAtDisplay (d, event->xclient.window);
- if (w)
- {
- CompOption o[4];
- int xRoot, yRoot;
- CompAction *action =
- &md->opt[MOVE_DISPLAY_OPTION_INITIATE].value.action;
-
- o[0].type = CompOptionTypeInt;
- o[0].name = "window";
- o[0].value.i = event->xclient.window;
-
- if (event->xclient.data.l[2] == WmMoveResizeMoveKeyboard)
- {
- moveInitiate (d, action,
- CompActionStateInitKey, o, 1);
- }
- else
- {
- unsigned int mods;
- Window root, child;
- int i;
-
- XQueryPointer (d->display, w->screen->root,
- &root, &child, &xRoot, &yRoot,
- &i, &i, &mods);
-
- /* TODO: not only button 1 */
- if (mods & Button1Mask)
- {
- o[1].type = CompOptionTypeInt;
- o[1].name = "modifiers";
- o[1].value.i = mods;
-
- o[2].type = CompOptionTypeInt;
- o[2].name = "x";
- o[2].value.i = event->xclient.data.l[0];
-
- o[3].type = CompOptionTypeInt;
- o[3].name = "y";
- o[3].value.i = event->xclient.data.l[1];
-
- moveInitiate (d,
- action,
- CompActionStateInitButton, o, 4);
-
- moveHandleMotionEvent (w->screen, xRoot, yRoot);
- }
- }
- }
- }
- }
- break;
- case DestroyNotify:
- if (md->w && md->w->id == event->xdestroywindow.window)
- moveTerminate (d,
- &md->opt[MOVE_DISPLAY_OPTION_INITIATE].value.
- action, 0, NULL, 0);
- break;
- case UnmapNotify:
- if (md->w && md->w->id == event->xunmap.window)
- moveTerminate (d,
- &md->opt[MOVE_DISPLAY_OPTION_INITIATE].value.
- action, 0, NULL, 0);
- default:
- break;
- }
-
- UNWRAP (md, d, handleEvent);
- (*d->handleEvent) (d, event);
- WRAP (md, d, handleEvent, moveHandleEvent);
+ CompScreen *s;
+
+ MOVE_DISPLAY(d);
+
+ switch (event->type) {
+ case ButtonPress:
+ s = findScreenAtDisplay(d, event->xbutton.root);
+ if (s) {
+ MOVE_SCREEN(s);
+
+ if (ms->grabIndex) {
+ moveTerminate(d,
+ &md->
+ opt
+ [MOVE_DISPLAY_OPTION_INITIATE].
+ value.action, 0, NULL, 0);
+ }
+ }
+ break;
+ case KeyPress:
+ case KeyRelease:
+ s = findScreenAtDisplay(d, event->xkey.root);
+ if (s) {
+ MOVE_SCREEN(s);
+
+ if (ms->grabIndex && event->type == KeyPress) {
+ int i;
+
+ for (i = 0; i < NUM_KEYS; i++) {
+ if (event->xkey.keycode ==
+ md->key[i]) {
+ XWarpPointer(d->display,
+ None, None, 0,
+ 0, 0, 0,
+ mKeys[i].dx *
+ KEY_MOVE_INC,
+ mKeys[i].dy *
+ KEY_MOVE_INC);
+ break;
+ }
+ }
+ }
+ }
+ break;
+ case MotionNotify:
+ s = findScreenAtDisplay(d, event->xmotion.root);
+ if (s)
+ moveHandleMotionEvent(s, d->pointerX, d->pointerY);
+ break;
+ case EnterNotify:
+ case LeaveNotify:
+ s = findScreenAtDisplay(d, event->xcrossing.root);
+ if (s)
+ moveHandleMotionEvent(s, d->pointerX, d->pointerY);
+ break;
+ case ClientMessage:
+ if (event->xclient.message_type == d->wmMoveResizeAtom) {
+ CompWindow *w;
+
+ if (event->xclient.data.l[2] == WmMoveResizeMove ||
+ event->xclient.data.l[2] ==
+ WmMoveResizeMoveKeyboard) {
+ w = findWindowAtDisplay(d,
+ event->xclient.
+ window);
+ if (w) {
+ CompOption o[4];
+ int xRoot, yRoot;
+ CompAction *action =
+ &md->
+ opt
+ [MOVE_DISPLAY_OPTION_INITIATE].
+ value.action;
+
+ o[0].type = CompOptionTypeInt;
+ o[0].name = "window";
+ o[0].value.i =
+ event->xclient.window;
+
+ if (event->xclient.data.l[2] ==
+ WmMoveResizeMoveKeyboard) {
+ moveInitiate(d, action,
+ CompActionStateInitKey,
+ o, 1);
+ } else {
+ unsigned int mods;
+ Window root, child;
+ int i;
+
+ XQueryPointer(d->display,
+ w->screen->
+ root, &root,
+ &child,
+ &xRoot,
+ &yRoot, &i,
+ &i, &mods);
+
+ /* TODO: not only button 1 */
+ if (mods & Button1Mask) {
+ o[1].type =
+ CompOptionTypeInt;
+ o[1].name =
+ "modifiers";
+ o[1].value.i =
+ mods;
+
+ o[2].type =
+ CompOptionTypeInt;
+ o[2].name = "x";
+ o[2].value.i =
+ event->xclient.
+ data.l[0];
+
+ o[3].type =
+ CompOptionTypeInt;
+ o[3].name = "y";
+ o[3].value.i =
+ event->xclient.
+ data.l[1];
+
+ moveInitiate(d,
+ action,
+ CompActionStateInitButton,
+ o, 4);
+
+ moveHandleMotionEvent
+ (w->screen,
+ xRoot, yRoot);
+ }
+ }
+ }
+ }
+ }
+ break;
+ case DestroyNotify:
+ if (md->w && md->w->id == event->xdestroywindow.window)
+ moveTerminate(d,
+ &md->
+ opt[MOVE_DISPLAY_OPTION_INITIATE].
+ value.action, 0, NULL, 0);
+ break;
+ case UnmapNotify:
+ if (md->w && md->w->id == event->xunmap.window)
+ moveTerminate(d,
+ &md->
+ opt[MOVE_DISPLAY_OPTION_INITIATE].
+ value.action, 0, NULL, 0);
+ default:
+ break;
+ }
+
+ UNWRAP(md, d, handleEvent);
+ (*d->handleEvent) (d, event);
+ WRAP(md, d, handleEvent, moveHandleEvent);
}
static Bool
-movePaintWindow (CompWindow * w,
- const WindowPaintAttrib * attrib,
- Region region, unsigned int mask)
+movePaintWindow(CompWindow * w,
+ const WindowPaintAttrib * attrib,
+ Region region, unsigned int mask)
{
- WindowPaintAttrib sAttrib;
- CompScreen *s = w->screen;
- Bool status;
+ WindowPaintAttrib sAttrib;
+ CompScreen *s = w->screen;
+ Bool status;
- MOVE_SCREEN (s);
+ MOVE_SCREEN(s);
- if (ms->grabIndex)
- {
- MOVE_DISPLAY (s->display);
+ if (ms->grabIndex) {
+ MOVE_DISPLAY(s->display);
- sAttrib = *attrib;
+ sAttrib = *attrib;
- if (md->w == w && md->moveOpacity != OPAQUE
- && sAttrib.opacity >= md->opacifyMinOpacity)
- {
- /* modify opacity of windows that are not active */
- attrib = &sAttrib;
+ if (md->w == w && md->moveOpacity != OPAQUE
+ && sAttrib.opacity >= md->opacifyMinOpacity) {
+ /* modify opacity of windows that are not active */
+ attrib = &sAttrib;
- sAttrib.opacity = (sAttrib.opacity * md->moveOpacity) >> 16;
- }
- }
+ sAttrib.opacity =
+ (sAttrib.opacity * md->moveOpacity) >> 16;
+ }
+ }
- UNWRAP (ms, s, paintWindow);
- status = (*s->paintWindow) (w, attrib, region, mask);
- WRAP (ms, s, paintWindow, movePaintWindow);
+ UNWRAP(ms, s, paintWindow);
+ status = (*s->paintWindow) (w, attrib, region, mask);
+ WRAP(ms, s, paintWindow, movePaintWindow);
- return status;
+ return status;
}
-static void
-moveDisplayInitOptions (MoveDisplay * md)
+static void moveDisplayInitOptions(MoveDisplay * md)
{
- CompOption *o;
-
- o = &md->opt[MOVE_DISPLAY_OPTION_INITIATE];
- o->name = "initiate";
- o->group=N_("");
-o->subGroup=N_("");
-o->displayHints="";
-o->shortDesc = N_("Initiate Window Move");
- o->longDesc = N_("Start moving window");
- o->type = CompOptionTypeAction;
- o->value.action.initiate = moveInitiate;
- o->value.action.terminate = moveTerminate;
- o->value.action.bell = FALSE;
- o->value.action.edgeMask = 0;
- o->value.action.type = CompBindingTypeButton;
- o->value.action.state = CompActionStateInitButton;
- o->value.action.button.modifiers = MOVE_INITIATE_BUTTON_MODIFIERS_DEFAULT;
- o->value.action.button.button = MOVE_INITIATE_BUTTON_DEFAULT;
- o->value.action.type |= CompBindingTypeKey;
- o->value.action.state |= CompActionStateInitKey;
- o->value.action.key.modifiers = MOVE_INITIATE_KEY_MODIFIERS_DEFAULT;
- o->value.action.key.keysym =
- XStringToKeysym (MOVE_INITIATE_KEY_DEFAULT);
-
- o = &md->opt[MOVE_DISPLAY_OPTION_OPACIFY_MIN_OPACITY];
- o->name = "opacify_min_opacity";
- o->group=N_("");
-o->subGroup=N_("");
-o->displayHints="";
-o->shortDesc = N_("Minimum opacity for opacify");
- o->longDesc =
- N_("Opacify only windows whose opacity is higher than this value");
- o->type = CompOptionTypeInt;
- o->value.i = MOVE_OPACIFY_MIN_OPACITY_DEFAULT;
- o->rest.i.min = MOVE_OPACIFY_MIN_OPACITY_MIN;
- o->rest.i.max = MOVE_OPACIFY_MIN_OPACITY_MAX;
-
- o = &md->opt[MOVE_DISPLAY_OPTION_OPACITY];
- o->name = "opacity";
- o->group=N_("");
-o->subGroup=N_("");
-o->displayHints="";
-o->shortDesc = N_("Opacity");
- o->longDesc = N_("Opacity level of moving windows");
- o->type = CompOptionTypeInt;
- o->value.i = MOVE_OPACITY_DEFAULT;
- o->rest.i.min = MOVE_OPACITY_MIN;
- o->rest.i.max = MOVE_OPACITY_MAX;
-
- o = &md->opt[MOVE_DISPLAY_OPTION_CONSTRAIN_Y_TOP];
- o->name = "constrain_y_top";
- o->group=N_("");
-o->subGroup=N_("");
-o->displayHints="";
-o->shortDesc = N_("Constrain Y to top of screen");
- o->longDesc = N_("Constrain Y coordinate to workspace area at top of screen");
- o->type = CompOptionTypeBool;
- o->value.b = MOVE_CONSTRAIN_Y_TOP_DEFAULT;
-
- o = &md->opt[MOVE_DISPLAY_OPTION_CONSTRAIN_Y_BOTTOM];
- o->name = "constrain_y_bottom";
- o->group=N_("");
-o->subGroup=N_("");
-o->displayHints="";
-o->shortDesc = N_("Constrain Y to bottom");
- o->longDesc =
- N_("Constrain Y coordinate to workspace area at bottom of screen");
- o->type = CompOptionTypeBool;
- o->value.b = MOVE_CONSTRAIN_Y_BOTTOM_DEFAULT;
-
- o = &md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_MAXIMIZED];
- o->name = "snapoff_maximized";
- o->group=N_("");
-o->subGroup=N_("");
-o->displayHints="";
-o->shortDesc = N_("Snapoff maximized windows");
- o->longDesc = N_("Snapoff and auto unmaximized maximized windows "
- "when dragging");
- o->type = CompOptionTypeBool;
- o->value.b = MOVE_SNAPOFF_MAXIMIZED_DEFAULT;
-
- o = &md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE];
- o->name = "snapoff_distance";
- o->group=N_("");
-o->subGroup=N_("");
-o->displayHints="";
-o->shortDesc = N_("Snapoff distance");
- o->longDesc =
- N_("Pointer movement distance after which window is snapped off");
- o->type = CompOptionTypeInt;
- o->value.i = MOVE_SNAPOFF_DISTANCE_DEFAULT;
- o->rest.i.min = MOVE_SNAPOFF_DISTANCE_MIN;
- o->rest.i.max = MOVE_SNAPOFF_DISTANCE_MAX;
-
- o = &md->opt[MOVE_DISPLAY_OPTION_SNAPBACK_DISTANCE];
- o->name = "snapback_distance";
- o->group=N_("");
-o->subGroup=N_("");
-o->displayHints="";
-o->shortDesc = N_("Snapback distance");
- o->longDesc =
- N_("Pointer movement distance to snap window back");
- o->type = CompOptionTypeInt;
- o->value.i = MOVE_SNAPBACK_DISTANCE_DEFAULT;
- o->rest.i.min = MOVE_SNAPBACK_DISTANCE_MIN;
- o->rest.i.max = MOVE_SNAPBACK_DISTANCE_MAX;
+ CompOption *o;
+
+ o = &md->opt[MOVE_DISPLAY_OPTION_INITIATE];
+ o->name = "initiate";
+ o->group = N_("");
+ o->subGroup = N_("");
+ o->displayHints = "";
+ o->shortDesc = N_("Initiate Window Move");
+ o->longDesc = N_("Start moving window");
+ o->type = CompOptionTypeAction;
+ o->value.action.initiate = moveInitiate;
+ o->value.action.terminate = moveTerminate;
+ o->value.action.bell = FALSE;
+ o->value.action.edgeMask = 0;
+ o->value.action.type = CompBindingTypeButton;
+ o->value.action.state = CompActionStateInitButton;
+ o->value.action.button.modifiers =
+ MOVE_INITIATE_BUTTON_MODIFIERS_DEFAULT;
+ o->value.action.button.button = MOVE_INITIATE_BUTTON_DEFAULT;
+ o->value.action.type |= CompBindingTypeKey;
+ o->value.action.state |= CompActionStateInitKey;
+ o->value.action.key.modifiers =
+ MOVE_INITIATE_KEY_MODIFIERS_DEFAULT;
+ o->value.action.key.keysym =
+ XStringToKeysym(MOVE_INITIATE_KEY_DEFAULT);
+
+ o = &md->opt[MOVE_DISPLAY_OPTION_OPACIFY_MIN_OPACITY];
+ o->name = "opacify_min_opacity";
+ o->group = N_("");
+ o->subGroup = N_("");
+ o->displayHints = "";
+ o->shortDesc = N_("Minimum opacity for opacify");
+ o->longDesc =
+ N_
+ ("Opacify only windows whose opacity is higher than this value");
+ o->type = CompOptionTypeInt;
+ o->value.i = MOVE_OPACIFY_MIN_OPACITY_DEFAULT;
+ o->rest.i.min = MOVE_OPACIFY_MIN_OPACITY_MIN;
+ o->rest.i.max = MOVE_OPACIFY_MIN_OPACITY_MAX;
+
+ o = &md->opt[MOVE_DISPLAY_OPTION_OPACITY];
+ o->name = "opacity";
+ o->group = N_("");
+ o->subGroup = N_("");
+ o->displayHints = "";
+ o->shortDesc = N_("Opacity");
+ o->longDesc = N_("Opacity level of moving windows");
+ o->type = CompOptionTypeInt;
+ o->value.i = MOVE_OPACITY_DEFAULT;
+ o->rest.i.min = MOVE_OPACITY_MIN;
+ o->rest.i.max = MOVE_OPACITY_MAX;
+
+ o = &md->opt[MOVE_DISPLAY_OPTION_CONSTRAIN_Y_TOP];
+ o->name = "constrain_y_top";
+ o->group = N_("");
+ o->subGroup = N_("");
+ o->displayHints = "";
+ o->shortDesc = N_("Constrain Y to top of screen");
+ o->longDesc =
+ N_
+ ("Constrain Y coordinate to workspace area at top of screen");
+ o->type = CompOptionTypeBool;
+ o->value.b = MOVE_CONSTRAIN_Y_TOP_DEFAULT;
+
+ o = &md->opt[MOVE_DISPLAY_OPTION_CONSTRAIN_Y_BOTTOM];
+ o->name = "constrain_y_bottom";
+ o->group = N_("");
+ o->subGroup = N_("");
+ o->displayHints = "";
+ o->shortDesc = N_("Constrain Y to bottom");
+ o->longDesc =
+ N_
+ ("Constrain Y coordinate to workspace area at bottom of screen");
+ o->type = CompOptionTypeBool;
+ o->value.b = MOVE_CONSTRAIN_Y_BOTTOM_DEFAULT;
+
+ o = &md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_MAXIMIZED];
+ o->name = "snapoff_maximized";
+ o->group = N_("");
+ o->subGroup = N_("");
+ o->displayHints = "";
+ o->shortDesc = N_("Snapoff maximized windows");
+ o->longDesc = N_("Snapoff and auto unmaximized maximized windows "
+ "when dragging");
+ o->type = CompOptionTypeBool;
+ o->value.b = MOVE_SNAPOFF_MAXIMIZED_DEFAULT;
+
+ o = &md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE];
+ o->name = "snapoff_distance";
+ o->group = N_("");
+ o->subGroup = N_("");
+ o->displayHints = "";
+ o->shortDesc = N_("Snapoff distance");
+ o->longDesc =
+ N_
+ ("Pointer movement distance after which window is snapped off");
+ o->type = CompOptionTypeInt;
+ o->value.i = MOVE_SNAPOFF_DISTANCE_DEFAULT;
+ o->rest.i.min = MOVE_SNAPOFF_DISTANCE_MIN;
+ o->rest.i.max = MOVE_SNAPOFF_DISTANCE_MAX;
+
+ o = &md->opt[MOVE_DISPLAY_OPTION_SNAPBACK_DISTANCE];
+ o->name = "snapback_distance";
+ o->group = N_("");
+ o->subGroup = N_("");
+ o->displayHints = "";
+ o->shortDesc = N_("Snapback distance");
+ o->longDesc = N_("Pointer movement distance to snap window back");
+ o->type = CompOptionTypeInt;
+ o->value.i = MOVE_SNAPBACK_DISTANCE_DEFAULT;
+ o->rest.i.min = MOVE_SNAPBACK_DISTANCE_MIN;
+ o->rest.i.max = MOVE_SNAPBACK_DISTANCE_MAX;
}
-static CompOption *
-moveGetDisplayOptions (CompDisplay * display, int *count)
+static CompOption *moveGetDisplayOptions(CompDisplay * display, int *count)
{
- if (display)
- {
- MOVE_DISPLAY (display);
-
- *count = NUM_OPTIONS (md);
- return md->opt;
- }
- else
- {
- MoveDisplay * md = malloc(sizeof(MoveDisplay));
- moveDisplayInitOptions(md);
- *count=NUM_OPTIONS(md);
- return md->opt;
- }
+ if (display) {
+ MOVE_DISPLAY(display);
+
+ *count = NUM_OPTIONS(md);
+ return md->opt;
+ } else {
+ MoveDisplay *md = malloc(sizeof(MoveDisplay));
+ moveDisplayInitOptions(md);
+ *count = NUM_OPTIONS(md);
+ return md->opt;
+ }
}
static Bool
-moveSetDisplayOption (CompDisplay * display,
- char *name, CompOptionValue * value)
+moveSetDisplayOption(CompDisplay * display,
+ char *name, CompOptionValue * value)
{
- CompOption *o;
- int index;
-
- MOVE_DISPLAY (display);
-
- o = compFindOption (md->opt, NUM_OPTIONS (md), name, &index);
- if (!o)
- return FALSE;
-
- switch (index)
- {
- case MOVE_DISPLAY_OPTION_INITIATE:
- if (setDisplayAction (display, o, value))
- return TRUE;
- break;
- case MOVE_DISPLAY_OPTION_OPACITY:
- if (compSetIntOption (o, value))
- {
- md->moveOpacity = (o->value.i * OPAQUE) / 100;
- return TRUE;
- }
- break;
- case MOVE_DISPLAY_OPTION_OPACIFY_MIN_OPACITY:
- if (compSetIntOption (o, value))
- {
- md->opacifyMinOpacity = (o->value.i * OPAQUE) / 100;
- return TRUE;
- }
- break;
- case MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE:
- case MOVE_DISPLAY_OPTION_SNAPBACK_DISTANCE:
- if (compSetIntOption (o, value))
- return TRUE;
- break;
- case MOVE_DISPLAY_OPTION_CONSTRAIN_Y_TOP:
- case MOVE_DISPLAY_OPTION_CONSTRAIN_Y_BOTTOM:
- case MOVE_DISPLAY_OPTION_SNAPOFF_MAXIMIZED:
- if (compSetBoolOption (o, value))
- return TRUE;
- break;
- default:
- break;
- }
-
- return FALSE;
+ CompOption *o;
+ int index;
+
+ MOVE_DISPLAY(display);
+
+ o = compFindOption(md->opt, NUM_OPTIONS(md), name, &index);
+ if (!o)
+ return FALSE;
+
+ switch (index) {
+ case MOVE_DISPLAY_OPTION_INITIATE:
+ if (setDisplayAction(display, o, value))
+ return TRUE;
+ break;
+ case MOVE_DISPLAY_OPTION_OPACITY:
+ if (compSetIntOption(o, value)) {
+ md->moveOpacity = (o->value.i * OPAQUE) / 100;
+ return TRUE;
+ }
+ break;
+ case MOVE_DISPLAY_OPTION_OPACIFY_MIN_OPACITY:
+ if (compSetIntOption(o, value)) {
+ md->opacifyMinOpacity =
+ (o->value.i * OPAQUE) / 100;
+ return TRUE;
+ }
+ break;
+ case MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE:
+ case MOVE_DISPLAY_OPTION_SNAPBACK_DISTANCE:
+ if (compSetIntOption(o, value))
+ return TRUE;
+ break;
+ case MOVE_DISPLAY_OPTION_CONSTRAIN_Y_TOP:
+ case MOVE_DISPLAY_OPTION_CONSTRAIN_Y_BOTTOM:
+ case MOVE_DISPLAY_OPTION_SNAPOFF_MAXIMIZED:
+ if (compSetBoolOption(o, value))
+ return TRUE;
+ break;
+ default:
+ break;
+ }
+
+ return FALSE;
}
-static Bool
-moveInitDisplay (CompPlugin * p, CompDisplay * d)
+static Bool moveInitDisplay(CompPlugin * p, CompDisplay * d)
{
- MoveDisplay *md;
- int i;
+ MoveDisplay *md;
+ int i;
- md = malloc (sizeof (MoveDisplay));
- if (!md)
- return FALSE;
+ md = malloc(sizeof(MoveDisplay));
+ if (!md)
+ return FALSE;
- md->screenPrivateIndex = allocateScreenPrivateIndex (d);
- if (md->screenPrivateIndex < 0)
- {
- free (md);
- return FALSE;
- }
+ md->screenPrivateIndex = allocateScreenPrivateIndex(d);
+ if (md->screenPrivateIndex < 0) {
+ free(md);
+ return FALSE;
+ }
- md->moveOpacity = (MOVE_OPACITY_DEFAULT * OPAQUE) / 100;
+ md->moveOpacity = (MOVE_OPACITY_DEFAULT * OPAQUE) / 100;
- md->opacifyMinOpacity = (MOVE_OPACIFY_MIN_OPACITY_DEFAULT * OPAQUE) / 100;
+ md->opacifyMinOpacity =
+ (MOVE_OPACIFY_MIN_OPACITY_DEFAULT * OPAQUE) / 100;
- moveDisplayInitOptions (md);
+ moveDisplayInitOptions(md);
- md->w = 0;
+ md->w = 0;
- for (i = 0; i < NUM_KEYS; i++)
- md->key[i] = XKeysymToKeycode (d->display,
- XStringToKeysym (mKeys[i].name));
+ for (i = 0; i < NUM_KEYS; i++)
+ md->key[i] = XKeysymToKeycode(d->display,
+ XStringToKeysym(mKeys[i].
+ name));
- WRAP (md, d, handleEvent, moveHandleEvent);
+ WRAP(md, d, handleEvent, moveHandleEvent);
- d->privates[displayPrivateIndex].ptr = md;
+ d->privates[displayPrivateIndex].ptr = md;
- return TRUE;
+ return TRUE;
}
-static void
-moveFiniDisplay (CompPlugin * p, CompDisplay * d)
+static void moveFiniDisplay(CompPlugin * p, CompDisplay * d)
{
- MOVE_DISPLAY (d);
+ MOVE_DISPLAY(d);
- freeScreenPrivateIndex (d, md->screenPrivateIndex);
+ freeScreenPrivateIndex(d, md->screenPrivateIndex);
- UNWRAP (md, d, handleEvent);
+ UNWRAP(md, d, handleEvent);
- free (md);
+ free(md);
}
-static Bool
-moveInitScreen (CompPlugin * p, CompScreen * s)
+static Bool moveInitScreen(CompPlugin * p, CompScreen * s)
{
- MoveScreen *ms;
+ MoveScreen *ms;
- MOVE_DISPLAY (s->display);
+ MOVE_DISPLAY(s->display);
- ms = malloc (sizeof (MoveScreen));
- if (!ms)
- return FALSE;
+ ms = malloc(sizeof(MoveScreen));
+ if (!ms)
+ return FALSE;
- ms->grabIndex = 0;
+ ms->grabIndex = 0;
- ms->moveCursor = XCreateFontCursor (s->display->display, XC_fleur);
+ ms->moveCursor = XCreateFontCursor(s->display->display, XC_fleur);
- addScreenAction (s, &md->opt[MOVE_DISPLAY_OPTION_INITIATE].value.action);
+ addScreenAction(s,
+ &md->opt[MOVE_DISPLAY_OPTION_INITIATE].value.
+ action);
- WRAP (ms, s, paintWindow, movePaintWindow);
+ WRAP(ms, s, paintWindow, movePaintWindow);
- s->privates[md->screenPrivateIndex].ptr = ms;
+ s->privates[md->screenPrivateIndex].ptr = ms;
- return TRUE;
+ return TRUE;
}
-static void
-moveFiniScreen (CompPlugin * p, CompScreen * s)
+static void moveFiniScreen(CompPlugin * p, CompScreen * s)
{
- MOVE_SCREEN (s);
- MOVE_DISPLAY (s->display);
+ MOVE_SCREEN(s);
+ MOVE_DISPLAY(s->display);
- UNWRAP (ms, s, paintWindow);
+ UNWRAP(ms, s, paintWindow);
- removeScreenAction (s, &md->opt[MOVE_DISPLAY_OPTION_INITIATE].value.action);
+ removeScreenAction(s,
+ &md->opt[MOVE_DISPLAY_OPTION_INITIATE].value.
+ action);
- free (ms);
+ free(ms);
}
-static Bool
-moveInit (CompPlugin * p)
+static Bool moveInit(CompPlugin * p)
{
- displayPrivateIndex = allocateDisplayPrivateIndex ();
- if (displayPrivateIndex < 0)
- return FALSE;
+ displayPrivateIndex = allocateDisplayPrivateIndex();
+ if (displayPrivateIndex < 0)
+ return FALSE;
- return TRUE;
+ return TRUE;
}
-static void
-moveFini (CompPlugin * p)
+static void moveFini(CompPlugin * p)
{
- if (displayPrivateIndex >= 0)
- freeDisplayPrivateIndex (displayPrivateIndex);
+ if (displayPrivateIndex >= 0)
+ freeDisplayPrivateIndex(displayPrivateIndex);
}
CompPluginVTable moveVTable = {
- "move",
- N_("Move Window"),
- N_("Move window"),
- moveInit,
- moveFini,
- moveInitDisplay,
- moveFiniDisplay,
- moveInitScreen,
- moveFiniScreen,
- 0, /* InitWindow */
- 0, /* FiniWindow */
- moveGetDisplayOptions,
- moveSetDisplayOption,
- 0, /* GetScreenOptions */
- 0, /* SetScreenOption */
- NULL,
- 0,
- 0,
- 0,
- BERYL_ABI_INFO,
- "beryl-plugins"
+ "move",
+ N_("Move Window"),
+ N_("Move window"),
+ moveInit,
+ moveFini,
+ moveInitDisplay,
+ moveFiniDisplay,
+ moveInitScreen,
+ moveFiniScreen,
+ 0, /* InitWindow */
+ 0, /* FiniWindow */
+ moveGetDisplayOptions,
+ moveSetDisplayOption,
+ 0, /* GetScreenOptions */
+ 0, /* SetScreenOption */
+ NULL,
+ 0,
+ 0,
+ 0,
+ BERYL_ABI_INFO,
+ "beryl-plugins"
};
-CompPluginVTable *
-getCompPluginInfo (void)
+CompPluginVTable *getCompPluginInfo(void)
{
- return &moveVTable;
+ return &moveVTable;
}