diff options
author | Chris Michael <cpmichael@osg.samsung.com> | 2016-06-13 16:18:13 -0400 |
---|---|---|
committer | Chris Michael <cpmichael@osg.samsung.com> | 2016-06-13 16:19:46 -0400 |
commit | 28f79d458596213ea33dc68755c87f46a140591b (patch) | |
tree | 7c94c4dd9bc0a42454cb9372b23538b876ec14a2 /src/lib/elput | |
parent | c163e51dd31c5d242b1833d542e1eebdf51d930e (diff) |
elput: Fix issue of VT-Switching not working
This patch fixes an issue where you could not VT-switch away from a
running Enlightenment session by simplifying the vt switch code and
passing the proper arguments to the dbus message.
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/elput')
-rw-r--r-- | src/lib/elput/elput_logind.c | 46 |
1 files changed, 8 insertions, 38 deletions
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c index 22cb1b02cc..fedb2b09e6 100644 --- a/src/lib/elput/elput_logind.c +++ b/src/lib/elput/elput_logind.c | |||
@@ -568,50 +568,20 @@ _logind_close(Elput_Manager *em, int fd) | |||
568 | static Eina_Bool | 568 | static Eina_Bool |
569 | _logind_vt_set(Elput_Manager *em, int vt) | 569 | _logind_vt_set(Elput_Manager *em, int vt) |
570 | { | 570 | { |
571 | Eldbus_Object *obj; | ||
572 | Eldbus_Proxy *proxy; | ||
573 | Eldbus_Message *msg; | 571 | Eldbus_Message *msg; |
574 | char self[PATH_MAX]; | ||
575 | |||
576 | snprintf(self, sizeof(self), "/org/freedesktop/login1/seat/self"); | ||
577 | |||
578 | obj = eldbus_object_get(em->dbus.conn, "org.freedesktop.login1", self); | ||
579 | if (!obj) | ||
580 | { | ||
581 | ERR("Could not get dbus object"); | ||
582 | goto obj_err; | ||
583 | } | ||
584 | |||
585 | proxy = eldbus_proxy_get(obj, "org.freedesktop.login1.Seat"); | ||
586 | if (!proxy) | ||
587 | { | ||
588 | ERR("Could not get dbus proxy"); | ||
589 | goto proxy_err; | ||
590 | } | ||
591 | 572 | ||
592 | msg = eldbus_proxy_method_call_new(proxy, "SwitchTo"); | 573 | msg = |
593 | if (!msg) | 574 | eldbus_message_method_call_new("org.freedesktop.login1", |
594 | { | 575 | "/org/freedesktop/login1/seat/self", |
595 | ERR("Could not create method call for proxy"); | 576 | "org.freedesktop.login1.Seat", "SwitchTo"); |
596 | goto msg_err; | 577 | if (!msg) return EINA_FALSE; |
597 | } | ||
598 | 578 | ||
599 | eldbus_message_arguments_append(msg, "u", &vt); | 579 | if (!eldbus_message_arguments_append(msg, "u", vt)) |
580 | return EINA_FALSE; | ||
600 | 581 | ||
601 | eldbus_proxy_send(proxy, msg, NULL, NULL, -1); | 582 | eldbus_connection_send(em->dbus.conn, msg, NULL, NULL, -1); |
602 | |||
603 | eldbus_message_unref(msg); | ||
604 | eldbus_proxy_unref(proxy); | ||
605 | eldbus_object_unref(obj); | ||
606 | 583 | ||
607 | return EINA_TRUE; | 584 | return EINA_TRUE; |
608 | |||
609 | msg_err: | ||
610 | eldbus_proxy_unref(proxy); | ||
611 | proxy_err: | ||
612 | eldbus_object_unref(obj); | ||
613 | obj_err: | ||
614 | return EINA_FALSE; | ||
615 | } | 585 | } |
616 | 586 | ||
617 | Elput_Interface _logind_interface = | 587 | Elput_Interface _logind_interface = |