swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.5k stars 1.11k forks source link

Using krunner as $menu #3604

Open staalmannen opened 5 years ago

staalmannen commented 5 years ago

Hi I just tested KRunner on sway to see if I can use that instead of j4-dmenu-desktop (like I do on X11 Plasma/i3) and it does execute now (before that did not happen). The problem, however, is that the search box ends up in the middle of the screen and does not get focus (I can not type anything in the search box).

This issue might be related to other "focus problems" I have had with some KDE applications on sway (like trying to compose an e-mail with KMail is impossible because the address field and subject field do not get focused and I can not type in them).

sway version 1.0-rc1-12-g478b128c (Feb 5 2019, branch 'makepkg')

In my sway config file:

set $menu qdbus org.kde.krunner /App display bindsym $mod+d exec $menu

I use kdeinit5 in my sway startup script, which most likely is needed

emersion commented 5 years ago

Maybe related to https://github.com/swaywm/sway/issues/1865

Can you try to remove these lines in wlroots to see if it fixes the issue: https://github.com/swaywm/wlroots/blob/51bfdd620e70c41e1a9fb4ce7831eddfb1bf893b/xwayland/xwm.c#L1192

aufkrawall commented 4 years ago

Does KRunner start as Wayland window for you? It always starts as XWayland here, despite of setting QT_QPA_PLATFORM=wayland.

declantsien commented 4 years ago

QT_QPA_PLATFORM=wayland

It's QT_QPA_PLATFORM=wayland-egl. And it works without xWayland.

declantsien commented 4 years ago

I liked krunner too. And I just test it too on Archlinux I first installed krunner package, found that qdbus org.kde.krunner /App display didn't work. Then I install plasma-workspace which has a krunner binary. And I have QT_QPA_PLATFORM=wayland-egl in my .pam_environment file.

> krunner brought up the search box. And I can type.

Yeah. the window is located in the vertical/horizontal center of the screen I guess that is a known issue.

aufkrawall commented 4 years ago

Indeed: When directly calling krunner executable, it works as Wayland UI. Nice find!