Commit 0e575a20 authored by David Redondo's avatar David Redondo 🏎
Browse files

Activate KRunner instead of running the binary

Currently when we invoke KRunner and it is already running we will start binary,
KDBusService will check if it is already registered and then call
org.freedesktop.Application.Activate. Cutting the middle out should improve the
time that it takes to show KRunner and make it less likely that key strokes are
lost. If KRunner is not running we, can rely on dbus activiation to start KRunner.
Unfortunately we cannnot call Activate with dbus-send because it doesn't support
it's argument type. Instead we can just use the existing display method.
CCBUG: 416145
parent 5d1078df
......@@ -31,8 +31,7 @@ target_compile_definitions(krunner PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}
install(TARGETS krunner ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES ${krunner_dbusAppXML} DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} )
configure_file(krunner.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/krunner.desktop @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/krunner.desktop DESTINATION ${DATA_INSTALL_DIR}/kglobalaccel)
install(FILES krunner.desktop DESTINATION ${DATA_INSTALL_DIR}/kglobalaccel)
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KRunnerAppDBusInterface")
configure_package_config_file(KRunnerAppDBusInterfaceConfig.cmake.in
......
[Desktop Entry]
Exec=@CMAKE_INSTALL_PREFIX@/bin/krunner
Exec=dbus-send --type=method_call --dest=org.kde.krunner /App org.kde.krunner.App.display
Name=KRunner
Name[ar]=مشغّل.ك
Name[ast]=KRunner
......@@ -59,7 +59,7 @@ Actions=RunClipboard
X-KDE-Wayland-Interfaces=org_kde_plasma_window_management
[Desktop Action RunClipboard]
Exec=krunner -c
Exec=dbus-send --type=method_call --dest=org.kde.krunner /App org.kde.krunner.App.displayWithClipboardContents
Name=Run command on clipboard contents
Name[az]=Əmri, mübadilə buferindən başlatmaq
Name[ca]=Executa una ordre al contingut del porta-retalls
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment