summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/display.c32
-rw-r--r--src/main.c2
-rw-r--r--src/plugin.c3
3 files changed, 8 insertions, 29 deletions
diff --git a/src/display.c b/src/display.c
index 7b512005..1811d3f3 100644
--- a/src/display.c
+++ b/src/display.c
@@ -96,8 +96,6 @@ int pointerY = 0;
#define NUM_OPTIONS(d) (sizeof ((d)->opt) / sizeof (CompOption))
-CompDisplay *compDisplays = 0;
-
static char *displayPrivateIndices = 0;
static int displayPrivateLen = 0;
@@ -105,10 +103,10 @@ static int
reallocDisplayPrivate (int size,
void *closure)
{
- CompDisplay *d = compDisplays;
+ CompDisplay *d;
void *privates;
- if (d)
+ for (d = core.displays; d; d = d->next)
{
privates = realloc (d->base.privates, size * sizeof (CompPrivate));
if (!privates)
@@ -1553,13 +1551,14 @@ paintScreen (CompScreen *s,
}
}
+/* MULTIDPYERROR: only works with one display present */
void
eventLoop (void)
{
XEvent event;
int timeDiff;
struct timeval tv;
- CompDisplay *display = compDisplays;
+ CompDisplay *display = core.displays;
CompScreen *s;
int time, timeToNextRedraw = 0;
CompWindow *w;
@@ -1887,8 +1886,6 @@ errorHandler (Display *dpy,
#ifdef DEBUG
char str[128];
- char *name = 0;
- int o;
#endif
errors++;
@@ -1897,24 +1894,8 @@ errorHandler (Display *dpy,
XGetErrorDatabaseText (dpy, "XlibMessage", "XError", "", str, 128);
fprintf (stderr, "%s", str);
- o = e->error_code - compDisplays->damageError;
- switch (o) {
- case BadDamage:
- name = "BadDamage";
- break;
- default:
- break;
- }
-
- if (name)
- {
- fprintf (stderr, ": %s\n ", name);
- }
- else
- {
- XGetErrorText (dpy, e->error_code, str, 128);
- fprintf (stderr, ": %s\n ", str);
- }
+ XGetErrorText (dpy, e->error_code, str, 128);
+ fprintf (stderr, ": %s\n ", str);
XGetErrorDatabaseText (dpy, "XlibMessage", "MajorCode", "%d", str, 128);
fprintf (stderr, str, e->request_code);
@@ -2380,7 +2361,6 @@ addDisplay (const char *name)
}
addDisplayToCore (d);
- compDisplays = d;
d->escapeKeyCode = XKeysymToKeycode (dpy, XStringToKeysym ("Escape"));
d->returnKeyCode = XKeysymToKeycode (dpy, XStringToKeysym ("Return"));
diff --git a/src/main.c b/src/main.c
index 6bc88fb1..2f1aa894 100644
--- a/src/main.c
+++ b/src/main.c
@@ -264,8 +264,6 @@ main (int argc, char **argv)
programArgc = argc;
programArgv = argv;
- compDisplays = NULL;
-
signal (SIGHUP, signalHandler);
signal (SIGCHLD, signalHandler);
signal (SIGINT, signalHandler);
diff --git a/src/plugin.c b/src/plugin.c
index 0f9071ce..bbd26c20 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -724,7 +724,8 @@ getPluginABI (const char *name)
if (!p || !p->vTable->getObjectOptions)
return 0;
- option = (*p->vTable->getObjectOptions) (p, &compDisplays->base,
+ /* MULTIDPYERROR: ABI options should be moved into core */
+ option = (*p->vTable->getObjectOptions) (p, &core.displays->base,
&nOption);
return getIntOptionNamed (option, nOption, "abi", 0);