* Copyright 2001, 2002 Ximian, Inc.
*
* This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
+ * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Library General Public
+ * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
/* deviceeventcontroller.c: implement the DeviceEventController interface */
{
const char *dest = dbus_message_get_destination (message);
GSList *l;
+ dbus_bool_t result;
gchar *bus_name_dup;
dbus_message_ref (message);
dbus_pending_call_set_notify (pending, reset_hung_process, message,
"Ping");
if (!message)
return NULL;
- dbus_connection_send_with_reply (bus, message, &pending, -1);
+ result = dbus_connection_send_with_reply (bus, message, &pending, -1);
dbus_message_unref (message);
- if (!pending)
+ if (!result || !pending)
return NULL;
bus_name_dup = g_strdup (dest);
dbus_pending_call_set_notify (pending, reset_hung_process_from_ping,
Accessibility_KeyDefinition *kd = (Accessibility_KeyDefinition *)g_malloc(sizeof(Accessibility_KeyDefinition));
if (!spi_dbus_message_iter_get_struct(&iter_array, DBUS_TYPE_INT32, &kd->keycode, DBUS_TYPE_INT32, &kd->keysym, DBUS_TYPE_STRING, &keystring, DBUS_TYPE_INVALID))
{
+ g_free (kd);
break;
}
kd->keystring = g_strdup (keystring);
if (!spi_dbus_message_iter_get_struct(&iter_array, DBUS_TYPE_INT32, &kd->keycode, DBUS_TYPE_INT32, &kd->keysym, DBUS_TYPE_STRING, &keystring, DBUS_TYPE_INVALID))
{
+ g_free(kd);
break;
}
kd->keystring = g_strdup (keystring);
fprintf (stderr, "Keystring synthesis failure, string=%s\n",
keystring);
break;
+ case Accessibility_KEY_LOCKMODIFIERS:
+ spi_dec_plat_lock_modifiers (controller, keycode);
+ break;
+ case Accessibility_KEY_UNLOCKMODIFIERS:
+ spi_dec_plat_unlock_modifiers (controller, keycode);
+ break;
}
reply = dbus_message_new_method_return (message);
return reply;
object_class->finalize = spi_device_event_controller_object_finalize;
#ifdef HAVE_X11
- if (g_getenv ("DISPLAY"))
+ if (g_getenv ("DISPLAY") != NULL && g_getenv ("WAYLAND_DISPLAY") == NULL)
spi_dec_setup_x11 (klass);
else
#endif