diff options
author | Danny Baumann <dannybaumann@web.de> | 2008-02-12 08:06:59 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2008-02-12 08:06:59 +0100 |
commit | 4b244f577765cf5047fa0092399d77b2becc235e (patch) | |
tree | e2efd887ff2dd0e046ac7ec43cadc335ec244651 /shelf.c | |
parent | 2782fdc25283e35eb0c46a0924709f973c330fc4 (diff) | |
download | shelf-4b244f577765cf5047fa0092399d77b2becc235e.tar.gz shelf-4b244f577765cf5047fa0092399d77b2becc235e.tar.bz2 |
Use linked list to always keep IPW stacked right above its window.
Not currently working yet, intermediate checkin.
Diffstat (limited to 'shelf.c')
-rw-r--r-- | shelf.c | 38 |
1 files changed, 37 insertions, 1 deletions
@@ -322,6 +322,20 @@ shelfAdjustIPW (CompWindow *w) XMapWindow (w->screen->display->display, sw->info->ipw); } +static void +shelfAdjustIPWStacking (CompScreen *s) +{ + ShelfedWindowInfo *run; + + SHELF_SCREEN (s); + + for (run = ss->shelfedWindows; run; run = run->next) + { + if (!run->w->next || run->w->next->id != run->ipw) + shelfAdjustIPW (run->w); + } +} + /* Create an input prevention window */ static void shelfCreateIPW (CompWindow *w) @@ -613,7 +627,7 @@ static void shelfHandleEvent (CompDisplay *d, XEvent *event) { - CompWindow *w; + CompWindow *w, *oldPrev, *oldNext; CompScreen *s; SHELF_DISPLAY (d); @@ -638,11 +652,33 @@ shelfHandleEvent (CompDisplay *d, case MotionNotify: handleMotionEvent (d, event); break; + case ConfigureNotify: + w = findWindowAtDisplay (d, event->xconfigure.window); + if (w) + { + oldPrev = w->prev; + oldNext = w->next; + } + break; } UNWRAP (sd, d, handleEvent); (*d->handleEvent) (d, event); WRAP (sd, d, handleEvent, shelfHandleEvent); + + switch (event->type) + { + case ConfigureNotify: + if (w) /* already assigned above */ + { + if (w->prev != oldPrev || w->next != oldNext) + { + /* restacking occured, ensure ipw stacking */ + shelfAdjustIPWStacking (w->screen); + } + } + break; + } } /* The window was damaged, adjust the damage to fit the actual area we |