summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Janlert <janlert@ardendo.se>2008-05-13 20:03:03 +1000
committerMagnus Janlert <janlert@ardendo.se>2008-05-13 20:03:03 +1000
commitaa13ab8bec201f909c1a2a729262435b1215106f (patch)
treef84c0157fc0ebfdf0aeef414415a1d2c9445914a
parentdb042a3dab83e79ea8555b70784336ad3a8a2f51 (diff)
downloadvigo-aa13ab8bec201f909c1a2a729262435b1215106f.tar.gz
vigo-aa13ab8bec201f909c1a2a729262435b1215106f.tar.bz2
Rework goto-bookmark, much less broken now
-rw-r--r--vigo.c41
1 files changed, 10 insertions, 31 deletions
diff --git a/vigo.c b/vigo.c
index 6ae1ad7..b7637e7 100644
--- a/vigo.c
+++ b/vigo.c
@@ -46,7 +46,6 @@ typedef struct _VigoScreen
int grab;
int grabIndex;
CompWindow *grabWin;
- CompWindow *nextFocus;
ActivateWindowProc activateWindow;
} VigoScreen;
@@ -620,29 +619,6 @@ vigoGetWindow (CompWindow *cw,
}
static void
-vigoRefocus (CompWindow *w)
-{
- CompScreen *s = w->screen;
- VIGO_SCREEN (s);
- UNWRAP (vs, s, activateWindow);
- (*s->activateWindow) (w);
- CompWindow *foc = vs->nextFocus;
- if (foc)
- {
- // The warpPointer should not be needed, but there is a bug
- // in the wall plugin apparently, fixed with
- // http://gitweb.compiz-fusion.org/?p=fusion/plugins/wall;a=commit;h=7c3265a7a984cfbf9e16913fd804f53d8b11894f
- warpPointer (s, -10000, -10000);
- warpPointer (s, foc->serverX + 10, foc->serverY + 10);
- // Also, this seems to fail every once in a while
- // havnt been able to find any pattern though
- moveInputFocusToWindow (foc);
- vs->nextFocus = NULL;
- }
- return;
-}
-
-static void
vigoMoveToMark (CompDisplay *d,
char *mark)
{
@@ -668,13 +644,17 @@ vigoMoveToMark (CompDisplay *d,
s = hit->screen;
int x, y;
defaultViewportForWindow (hit, &x, &y);
- if (x != hit->screen->x || y != hit->screen->y)
- {
- VIGO_SCREEN (s);
- vs->nextFocus = hit;
- WRAP (vs, s, activateWindow, vigoRefocus);
+ Bool warp = (x != hit->screen->x || y != hit->screen->y);
+ (*s->activateWindow) (hit);
+ // The warpPointer should not be needed, but there is a bug in the wall
+ // plugin apparently, fixed with
+ // http://gitweb.compiz-fusion.org/?p=fusion/plugins/wall;a=commit;h=7c3265a7a984cfbf9e16913fd804f53d8b11894f
+ // but ill leave the warpPointer there for now
+
+ if (warp) {
+ warpPointer (s, -10000, -10000);
+ warpPointer (s, hit->serverX + 10, hit->serverY + 10);
}
- sendWindowActivationRequest (s, hit->id);
}
}
@@ -968,7 +948,6 @@ vigoInitScreen (CompPlugin *p,
vs->grabIndex = 0;
vs->grab = VIGO_GRAB_NONE;
vs->grabWin = NULL;
- vs->nextFocus = NULL;
if (vs->windowPrivateIndex < 0)
{
free (vs);