File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/frontend/ibusfrontend Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ std::string getSocketPath(bool isWayland) {
8888 if (isWayland) {
8989 displaynumber = " wayland-0" ;
9090 if (auto display = getEnvironment (" WAYLAND_DISPLAY" )) {
91- displaynumber = *display;
91+ std::filesystem::path displayPath (*display);
92+ displaynumber = displayPath.filename ().c_str ();
9293 }
9394 } else if (auto displayEnv = getEnvironment (" DISPLAY" )) {
9495 std::string_view display = *displayEnv;
@@ -908,9 +909,13 @@ void IBusFrontendModule::becomeIBus(bool recheck) {
908909 RawConfig config;
909910 auto address = bus ()->address ();
910911 if (isInFlatpak ()) {
912+ FCITX_IBUS_DEBUG () << " Running in flatpak, DBus Address is " << address;
911913 if (address.find (" /run/flatpak/bus" ) != std::string::npos) {
912914 auto userBus =
913915 standardPath_.userDirectory (StandardPathsType::Runtime) / " bus" ;
916+ FCITX_IBUS_DEBUG () << " Detect flatpak masked address, try to guess "
917+ " host address as "
918+ << userBus;
914919
915920 struct stat statbuf;
916921
@@ -921,6 +926,7 @@ void IBusFrontendModule::becomeIBus(bool recheck) {
921926 }
922927 }
923928 }
929+ FCITX_IBUS_DEBUG () << " Write IBus bus address as: " << address;
924930 // This is a small hack to make ibus think that address is changed.
925931 // Otherwise it won't retry connection since we always use session bus
926932 // instead of start our own one.
You can’t perform that action at this time.
0 commit comments