Merge branch 'server-1.4-branch' into xorg-server-1.4-apple

This commit is contained in:
Jeremy Huddleston 2008-01-03 13:26:22 -08:00
commit c9dff90ce8
6 changed files with 21 additions and 5 deletions

View file

@ -76,7 +76,7 @@ teardown(void)
struct config_dbus_core_hook *hook; struct config_dbus_core_hook *hook;
if (bus_info.timer) { if (bus_info.timer) {
TimerCancel(bus_info.timer); TimerFree(bus_info.timer);
bus_info.timer = NULL; bus_info.timer = NULL;
} }
@ -116,6 +116,8 @@ message_filter(DBusConnection *connection, DBusMessage *message, void *data)
bus_info.connection = NULL; bus_info.connection = NULL;
teardown(); teardown();
if (bus_info.timer)
TimerFree(bus_info.timer);
bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL);
return DBUS_HANDLER_RESULT_HANDLED; return DBUS_HANDLER_RESULT_HANDLED;
@ -186,6 +188,7 @@ static CARD32
reconnect_timer(OsTimerPtr timer, CARD32 time, pointer arg) reconnect_timer(OsTimerPtr timer, CARD32 time, pointer arg)
{ {
if (connect_to_bus()) { if (connect_to_bus()) {
TimerFree(bus_info.timer);
bus_info.timer = NULL; bus_info.timer = NULL;
return 0; return 0;
} }

View file

@ -92,6 +92,8 @@ add_option(InputOption **options, const char *key, const char *value)
for (; *options; options = &(*options)->next) for (; *options; options = &(*options)->next)
; ;
*options = xcalloc(sizeof(**options), 1); *options = xcalloc(sizeof(**options), 1);
if (!*options) /* Yeesh. */
return;
(*options)->key = xstrdup(key); (*options)->key = xstrdup(key);
(*options)->value = xstrdup(value); (*options)->value = xstrdup(value);
(*options)->next = NULL; (*options)->next = NULL;
@ -156,7 +158,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
char *path = NULL, *driver = NULL, *name = NULL, *xkb_rules = NULL; char *path = NULL, *driver = NULL, *name = NULL, *xkb_rules = NULL;
char *xkb_model = NULL, *xkb_layout = NULL, *xkb_variant = NULL; char *xkb_model = NULL, *xkb_layout = NULL, *xkb_variant = NULL;
char *xkb_options = NULL, *config_info = NULL; char *xkb_options = NULL, *config_info = NULL;
InputOption *options = NULL; InputOption *options = NULL, *tmpo = NULL;
DeviceIntPtr dev; DeviceIntPtr dev;
DBusError error; DBusError error;
int type = TYPE_NONE; int type = TYPE_NONE;
@ -232,6 +234,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
if (NewInputDeviceRequest(options, &dev) != Success) { if (NewInputDeviceRequest(options, &dev) != Success) {
DebugF("[config/hal] NewInputDeviceRequest failed\n"); DebugF("[config/hal] NewInputDeviceRequest failed\n");
dev = NULL;
goto unwind; goto unwind;
} }
@ -255,6 +258,12 @@ unwind:
xfree(xkb_options); xfree(xkb_options);
if (config_info) if (config_info)
xfree(config_info); xfree(config_info);
while (!dev && (tmpo = options)) {
options = tmpo->next;
xfree(tmpo->key);
xfree(tmpo->value);
xfree(tmpo);
}
out_error: out_error:
dbus_error_free(&error); dbus_error_free(&error);

View file

@ -473,7 +473,8 @@ InitAndStartDevices(void)
for (dev = inputInfo.off_devices; dev; dev = dev->next) { for (dev = inputInfo.off_devices; dev; dev = dev->next) {
DebugF("(dix) initialising device %d\n", dev->id); DebugF("(dix) initialising device %d\n", dev->id);
ActivateDevice(dev); if (!dev->inited)
ActivateDevice(dev);
} }
for (dev = inputInfo.off_devices; dev; dev = next) for (dev = inputInfo.off_devices; dev; dev = next)
{ {

View file

@ -394,6 +394,7 @@ ephyrUnsetInternalDamage (ScreenPtr pScreen)
pPixmap = (*pScreen->GetScreenPixmap) (pScreen); pPixmap = (*pScreen->GetScreenPixmap) (pScreen);
DamageUnregister (&pPixmap->drawable, scrpriv->pDamage); DamageUnregister (&pPixmap->drawable, scrpriv->pDamage);
DamageDestroy (scrpriv->pDamage);
RemoveBlockAndWakeupHandlers (ephyrInternalDamageBlockHandler, RemoveBlockAndWakeupHandlers (ephyrInternalDamageBlockHandler,
ephyrInternalDamageWakeupHandler, ephyrInternalDamageWakeupHandler,

View file

@ -258,7 +258,8 @@ typedef struct
device->public.processInputProc = proc; \ device->public.processInputProc = proc; \
oldprocs->processInputProc = \ oldprocs->processInputProc = \
oldprocs->realInputProc = device->public.realInputProc; \ oldprocs->realInputProc = device->public.realInputProc; \
device->public.realInputProc = proc; \ if (proc != device->public.enqueueInputProc) \
device->public.realInputProc = proc; \
oldprocs->unwrapProc = device->unwrapProc; \ oldprocs->unwrapProc = device->unwrapProc; \
device->unwrapProc = unwrapproc; device->unwrapProc = unwrapproc;

View file

@ -354,7 +354,8 @@ InitConnectionLimits(void)
#endif #endif
#if !defined(WIN32) #if !defined(WIN32)
ConnectionTranslation = (int *)xnfalloc(sizeof(int)*(lastfdesc + 1)); if (!ConnectionTranslation)
ConnectionTranslation = (int *)xnfalloc(sizeof(int)*(lastfdesc + 1));
#else #else
InitConnectionTranslation(); InitConnectionTranslation();
#endif #endif