@@ -6,7 +6,9 @@ package desktopappinfo
66
77import (
88 "bytes"
9+ "encoding/json"
910 "errors"
11+ "io/ioutil"
1012 "os"
1113 "os/exec"
1214 "path/filepath"
@@ -612,6 +614,37 @@ func startCommand(ai *DesktopAppInfo, cmdline string, files []string, launchCont
612614
613615 var snId string
614616 startupNotify := ai .GetStartupNotify ()
617+ // 名单中的应用强制startupNotify,
618+ forceStartupNotifyList := []string {
619+ "com.alibabainc.dingtalk.desktop" ,
620+ "com.qq.im.deepin.desktop" ,
621+ "com.qq.weixin.deepin.desktop" ,
622+ "com.qq.weixin.work.deepin.desktop" ,
623+ "wemeetapp.desktop" ,
624+ "wps-office-prometheus.desktop" ,
625+ "cn.codemao.kitten3.desktop" ,
626+ "cn.codemao.wood.desktop" ,
627+ "cn.scratch.scratch.desktop" ,
628+ "com.51dzt.deepin.desktop" ,
629+ "com.macromediaflash8.deepin.desktop" ,
630+ "com.meitu.mtxx.deepin.desktop" ,
631+ "com.mspaint.deepin.desktop" ,
632+ "com.qq.tenvideo.desktop" ,
633+ "com.youku.deepin.desktop" ,
634+ "com.youkuido.deepin.desktop" ,
635+ "gimp.desktop" ,
636+ "mu.codewith.mu-editor.desktop" ,
637+ }
638+ const startupNotifyListPath = "/var/lib/apps/startupNotifyList.json"
639+ c , err := ioutil .ReadFile (startupNotifyListPath )
640+ if err == nil {
641+ _ = json .Unmarshal (c , & forceStartupNotifyList )
642+ }
643+ for _ , d := range forceStartupNotifyList {
644+ if strings .Contains (ai .GetFileName (), d ) {
645+ startupNotify = true
646+ }
647+ }
615648 if startupNotify && launchContext != nil &&
616649 launchContext .GetTimestamp () != 0 {
617650 snId , _ = launchContext .GetStartupNotifyId (ai , files )
0 commit comments