diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-01-04 15:09:14 +0200 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-01-04 18:55:59 +0200 |
| commit | 2581294a993c791de680be85ee359fe9e28d58b6 (patch) | |
| tree | 2c5b9b6e07f0e649f918c23e1045d130cf4f7f44 /monsterwm.c | |
| parent | d934e6c1ce545555d1eec3e9da70b62dc7ddad4f (diff) | |
do not move fullscreen windows
when fullscreen windows on screen disable
* move_up()
* move_down()
* swpa_master()
Diffstat (limited to 'monsterwm.c')
| -rw-r--r-- | monsterwm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/monsterwm.c b/monsterwm.c index 7ce843c..7d19345 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -372,8 +372,10 @@ void maprequest(XEvent *e) { */ void move_down() { if (!current || !head->next) return; + for (client *t=head; t; t=t->next) if (t->isfullscreen) return; + /* p is previous, n is next, if current is head n is last, c is current */ - client *p, *n = (current->next) ? current->next : head; + client *p = NULL, *n = (current->next) ? current->next : head; for (p=head; p && p->next != current; p=p->next); /* if there's a previous client then p->next should be what's after c * ..->[p]->[c]->[n]->.. ==> ..->[p]->[n]->[c]->.. @@ -412,9 +414,11 @@ void move_down() { */ void move_up() { if (!current || !head->next) return; + for (client *t=head; t; t=t->next) if (t->isfullscreen) return; + client *pp = NULL, *p; /* p is previous from current or last if current is head */ - for (p=head; p->next; p=p->next) if (p->next == current) break; + for (p=head; p->next && p->next != current; p=p->next); /* pp is previous from p, or null if current is head and thus p is last */ if (p->next) for (pp=head; pp; pp=pp->next) if (pp->next == p) break; /* if p has a previous client then the next client should be current (current is c) @@ -603,6 +607,7 @@ void spawn(const Arg *arg) { void swap_master() { if (!current || !head->next || mode == MONOCLE) return; + for (client *t=head; t; t=t->next) if (t->isfullscreen) return; /* if current is head swap with next window */ if (current == head) move_down(); /* if not head, then head is always behind us, so move_up until is head */ |
