summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-02-12 09:21:08 +0100
committerDanny Baumann <dannybaumann@web.de>2008-02-12 09:21:08 +0100
commita1d9b5534f23fc72515f1de84745c704cce1b6b0 (patch)
tree7ff7fb1000943c0009286abb872e3f19c32fb476
parentffd454953121bf8eed6b338ea97aa491001e3073 (diff)
downloadshelf-a1d9b5534f23fc72515f1de84745c704cce1b6b0.tar.gz
shelf-a1d9b5534f23fc72515f1de84745c704cce1b6b0.tar.bz2
Use linked list for doing window-id-for-ipw check.
Initialize grabbedWindow.
-rw-r--r--shelf.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/shelf.c b/shelf.c
index 16525f7..e450f1a 100644
--- a/shelf.c
+++ b/shelf.c
@@ -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);