Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以在scim的输入法插件中使用libdbus的api监听其他应用程序发送的dbus信号吗? #43

Open
hantengc opened this issue Sep 29, 2024 · 4 comments

Comments

@hantengc
Copy link

scim本身是基于socket实现的事件循环,我想要在scim的输入法引擎插件中实现一套libdbus的api用来监听信号
` std::thread t(this
{
while (1)
{
dbus_connection_read_write_dispatch(dbus_connection, -1);
} });

    t.detach();`

也有单开线程防止阻塞主事件循环,但是还是收不到信号。

请问scim对其是有什么限制吗?是否有其他方法可以做到呢?

@hantengc
Copy link
Author

@tzhuan

@tzhuan
Copy link
Member

tzhuan commented Sep 30, 2024

The SCIM project was lunched in 2002, earlier than the D-Bus project (2006), so I don't think SCIM has any reason or intent to limit the use of D-Bus. Since I completely don't understand D-Bus, I can't provide meaningful advice.

@hantengc
Copy link
Author

The SCIM project was lunched in 2002, earlier than the D-Bus project (2006), so I don't think SCIM has any reason or intent to limit the use of D-Bus. Since I completely don't understand D-Bus, I can't provide meaningful advice.

scim的事件循环是依赖的socket吗?

@tzhuan
Copy link
Member

tzhuan commented Sep 30, 2024

The scim socket event loop is inside the SocketServer::run():

SocketServer::run ()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants