Index: src/ibuspanelservice.c |
diff --git a/src/ibuspanelservice.c b/src/ibuspanelservice.c |
index 468aa324d0e1c4115341121a491e95d474a86abf..33949fa139af664bb9146f284c01d491f285af6c 100644 |
--- a/src/ibuspanelservice.c |
+++ b/src/ibuspanelservice.c |
@@ -3,7 +3,7 @@ |
/* ibus - The Input Bus |
* Copyright (c) 2009-2014 Google Inc. All rights reserved. |
* Copyright (C) 2010-2014 Peng Huang <shawn.p.huang@gmail.com> |
- * Copyright (C) 2017 Takao Fujiwara <takao.fujiwara1@gmail.com> |
+ * Copyright (C) 2017-2018 Takao Fujiwara <takao.fujiwara1@gmail.com> |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Lesser General Public |
@@ -936,6 +936,15 @@ _g_object_unref_if_floating (gpointer instance) |
g_object_unref (instance); |
} |
+static gboolean |
+ibus_panel_service_service_authorized_method (IBusService *service, |
+ GDBusConnection *connection) |
+{ |
+ if (ibus_service_get_connection (service) == connection) |
+ return TRUE; |
+ return FALSE; |
+} |
+ |
static void |
ibus_panel_service_service_method_call (IBusService *service, |
GDBusConnection *connection, |
@@ -961,6 +970,9 @@ ibus_panel_service_service_method_call (IBusService *service, |
return; |
} |
+ if (!ibus_panel_service_service_authorized_method (service, connection)) |
+ return; |
+ |
if (g_strcmp0 (method_name, "UpdatePreeditText") == 0) { |
GVariant *variant = NULL; |
guint cursor = 0; |