src/core/linux/SDL_ibus.c
changeset 9646 9d4917e2d909
parent 9645 b1e7169d1dcb
child 9712 a964d651f1dd
     1.1 --- a/src/core/linux/SDL_ibus.c	Sun Feb 01 21:08:54 2015 +0000
     1.2 +++ b/src/core/linux/SDL_ibus.c	Fri Feb 27 21:17:29 2015 +0000
     1.3 @@ -123,7 +123,7 @@
     1.4  }
     1.5  
     1.6  static DBusHandlerResult
     1.7 -IBus_MessageFilter(DBusConnection *conn, DBusMessage *msg, void *user_data)
     1.8 +IBus_MessageHandler(DBusConnection *conn, DBusMessage *msg, void *user_data)
     1.9  {
    1.10      SDL_DBusContext *dbus = (SDL_DBusContext *)user_data;
    1.11          
    1.12 @@ -341,6 +341,8 @@
    1.13      const char *path = NULL;
    1.14      SDL_bool result = SDL_FALSE;
    1.15      DBusMessage *msg;
    1.16 +    DBusObjectPathVTable ibus_vtable = {0};
    1.17 +    ibus_vtable.message_function = &IBus_MessageHandler;
    1.18  
    1.19      ibus_conn = dbus->connection_open_private(addr, NULL);
    1.20  
    1.21 @@ -388,7 +390,7 @@
    1.22          SDL_AddHintCallback(SDL_HINT_IME_INTERNAL_EDITING, &IBus_SetCapabilities, NULL);
    1.23          
    1.24          dbus->bus_add_match(ibus_conn, "type='signal',interface='org.freedesktop.IBus.InputContext'", NULL);
    1.25 -        dbus->connection_add_filter(ibus_conn, &IBus_MessageFilter, dbus, NULL);
    1.26 +        dbus->connection_try_register_object_path(ibus_conn, input_ctx_path, &ibus_vtable, dbus, NULL);
    1.27          dbus->connection_flush(ibus_conn);
    1.28      }
    1.29  
    1.30 @@ -668,7 +670,7 @@
    1.31          dbus->connection_read_write(ibus_conn, 0);
    1.32      
    1.33          while (dbus->connection_dispatch(ibus_conn) == DBUS_DISPATCH_DATA_REMAINS) {
    1.34 -            /* Do nothing, actual work happens in IBus_MessageFilter */
    1.35 +            /* Do nothing, actual work happens in IBus_MessageHandler */
    1.36          }
    1.37      }
    1.38  }