summaryrefslogtreecommitdiff
path: root/dodge.c
diff options
context:
space:
mode:
Diffstat (limited to 'dodge.c')
-rw-r--r--dodge.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/dodge.c b/dodge.c
index 150e5ad..049845b 100644
--- a/dodge.c
+++ b/dodge.c
@@ -54,6 +54,7 @@ typedef struct _DodgeWindow
int pos; /* North South East West */
+ Bool selected;
Bool isdodge;
} DodgeWindow;
@@ -281,7 +282,7 @@ dodgeMarkDodgeWindows (CompScreen *s)
for (w = s->windows; w; w = w->next)
{
DODGE_WINDOW (w);
- if(matchEval(dodgeGetWindowTypes (s->display),w) &&
+ if((matchEval(dodgeGetWindowTypes (s->display),w) || dw->selected) &&
!(w->invisible || w->destroyed || w->hidden || w->minimized))
{
if (dw)
@@ -383,6 +384,22 @@ dodgePreparePaintScreen (CompScreen *s,
}
static Bool
+dodgeMark (CompDisplay *d,
+ CompAction *action,
+ CompActionState state,
+ CompOption *option,
+ int nOption)
+{
+ Window xid;
+ CompWindow *w;
+
+ xid = getIntOptionNamed (option, nOption, "window", 0);
+ w = findWindowAtDisplay (d, xid);
+ DODGE_WINDOW(w);
+ dw->selected = !dw->selected;
+ return TRUE;
+}
+static Bool
dodgeToggle (CompDisplay *d,
CompAction *action,
CompActionState state,
@@ -477,6 +494,7 @@ dodgeInitDisplay (CompPlugin *p,
dodgeSetDodgeToggleKeyInitiate (d, dodgeToggle);
dodgeSetDodgeToggleButtonInitiate (d, dodgeToggle);
dodgeSetDodgeToggleEdgeInitiate (d, dodgeToggle);
+ dodgeSetDodgeSelectKeyInitiate (d, dodgeMark);
dd->mpFunc = d->base.privates[mousepollindex].ptr;
return TRUE;
@@ -542,6 +560,7 @@ dodgeInitWindow (CompPlugin *p,
dw->vx = 0;
dw->vy = 0;
dw->isdodge = FALSE;
+ dw->selected = FALSE;
w->base.privates[ds->windowPrivateIndex].ptr = dw;
return TRUE;