File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 66#include " treelandlockscreen.h"
77
88#include < QDebug>
9+ #include < QProcess>
910#include < QGuiApplication>
1011
1112#include < DDBusSender>
@@ -54,12 +55,16 @@ bool ShutdownApplet::requestShutdown(const QString &type)
5455 m_lockscreen->shutdown ();
5556 }
5657 } else {
57- DDBusSender ()
58+ if (type == QStringLiteral (" Lock" )) {
59+ QProcess::execute (" bash -c \" originmap=$(setxkbmap -query | grep option | awk -F ' ' '{print $2}');/usr/bin/setxkbmap -option grab:break_actions&&/usr/bin/xdotool key XF86Ungrab&&dbus-send --print-reply --dest=org.deepin.dde.LockFront1 /org/deepin/dde/LockFront1 org.deepin.dde.LockFront1.Show&&setxkbmap -option $originmap\" " );
60+ } else {
61+ DDBusSender ()
5862 .service (" org.deepin.dde.ShutdownFront1" )
5963 .interface (" org.deepin.dde.ShutdownFront1" )
6064 .path (" /org/deepin/dde/ShutdownFront1" )
61- .method (" Show " )
65+ .method (type )
6266 .call ();
67+ }
6368 }
6469
6570 return true ;
You can’t perform that action at this time.
0 commit comments