diff options
author | Danny Baumann <dannybaumann@web.de> | 2008-02-12 09:21:08 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2008-02-12 09:21:08 +0100 |
commit | a1d9b5534f23fc72515f1de84745c704cce1b6b0 (patch) | |
tree | 7ff7fb1000943c0009286abb872e3f19c32fb476 /shelf.c | |
parent | ffd454953121bf8eed6b338ea97aa491001e3073 (diff) | |
download | shelf-a1d9b5534f23fc72515f1de84745c704cce1b6b0.tar.gz shelf-a1d9b5534f23fc72515f1de84745c704cce1b6b0.tar.bz2 |
Use linked list for doing window-id-for-ipw check.
Initialize grabbedWindow.
Diffstat (limited to 'shelf.c')
-rw-r--r-- | shelf.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -108,14 +108,16 @@ static int displayPrivateIndex; static CompWindow * shelfGetRealWindow (CompWindow *w) { - CompWindow *rw; + ShelfedWindowInfo *run; + + SHELF_SCREEN (w->screen); - for (rw = w->screen->windows; rw; rw = rw->next) + for (run = ss->shelfedWindows; run; run = run->next) { - SHELF_WINDOW (rw); - if (sw->info && sw->info->ipw == w->id) - return rw; + if (w->id == run->ipw) + return run->w; } + return NULL; } @@ -357,7 +359,7 @@ shelfCreateIPW (CompWindow *w) w->serverHeight + w->input.top + w->input.bottom, 0, CopyFromParent, InputOnly, CopyFromParent, CWOverrideRedirect, &attrib); - + sw->info->ipw = ipw; } @@ -605,7 +607,6 @@ handleButtonRelease (CompWindow *w) moveInputFocusToWindow (w); removeScreenGrab (s, ss->grabIndex, NULL); ss->grabIndex = 0; - ss->grabbedWindow = 0; } } @@ -809,6 +810,7 @@ shelfInitScreen (CompPlugin *p, ss->lastPointerY = 0; ss->noLastPointer = TRUE; + ss->grabbedWindow = None; ss->shelfedWindows = NULL; WRAP (ss, s, preparePaintScreen, shelfPreparePaintScreen); |