main: grab the keyboard D-Bus interface at startup
https://bugzilla.gnome.org/show_bug.cgi?id=658065
This commit is contained in:
parent
22dcb46bff
commit
98fa71ba18
@ -199,7 +199,6 @@ function Keyboard() {
|
|||||||
Keyboard.prototype = {
|
Keyboard.prototype = {
|
||||||
_init: function () {
|
_init: function () {
|
||||||
DBus.session.exportObject('/org/gnome/Caribou/Keyboard', this);
|
DBus.session.exportObject('/org/gnome/Caribou/Keyboard', this);
|
||||||
DBus.session.acquire_name('org.gnome.Caribou.Keyboard', 0, null, null);
|
|
||||||
|
|
||||||
this._timestamp = global.get_current_time();
|
this._timestamp = global.get_current_time();
|
||||||
this.actor = new St.BoxLayout({ name: 'keyboard', vertical: true, reactive: true });
|
this.actor = new St.BoxLayout({ name: 'keyboard', vertical: true, reactive: true });
|
||||||
|
11
src/main.c
11
src/main.c
@ -117,6 +117,17 @@ shell_dbus_init (gboolean replace)
|
|||||||
g_print ("failed to acquire org.freedesktop.Notifications: %s\n", error->message);
|
g_print ("failed to acquire org.freedesktop.Notifications: %s\n", error->message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ...and the on-screen keyboard service */
|
||||||
|
if (!dbus_g_proxy_call (bus, "RequestName", &error,
|
||||||
|
G_TYPE_STRING, "org.gnome.Caribou.Keyboard",
|
||||||
|
G_TYPE_UINT, DBUS_NAME_FLAG_REPLACE_EXISTING | request_name_flags,
|
||||||
|
G_TYPE_INVALID,
|
||||||
|
G_TYPE_UINT, &request_name_result,
|
||||||
|
G_TYPE_INVALID))
|
||||||
|
{
|
||||||
|
g_print ("failed to acquire org.freedesktop.Notifications: %s\n", error->message);
|
||||||
|
}
|
||||||
|
|
||||||
g_object_unref (bus);
|
g_object_unref (bus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user