fix: 修复开机后虚拟键盘自动启动的问题
虚拟键盘仅在GNOME的桌面环境中自启动,desktop文件中已经给出相关配置,AM未进行判断 Log: 修复开机后虚拟键盘自动启动 Influence: 虚拟键盘自动开机启动 Bug: https://pms.uniontech.com/bug-view-175031.html Change-Id: I7c66535f819655ffb1c9609cb23a6dc3a7e6f415
This commit is contained in:
		@ -533,7 +533,20 @@ QStringList StartManager::getAutostartList()
 | 
				
			|||||||
            if (autostartList.contains(entry.absoluteFilePath()))
 | 
					            if (autostartList.contains(entry.absoluteFilePath()))
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            autostartList.push_back(entry.absoluteFilePath());
 | 
					            // 需要检查desktop文件中的Hidden,OnlyShowIn和NotShowIn字段,再决定是否需要自启动
 | 
				
			||||||
 | 
					            auto isNeedAutoStart = [ ](const std::string &_fileName){
 | 
				
			||||||
 | 
					                DesktopInfo info(_fileName);
 | 
				
			||||||
 | 
					                if (!info.isValidDesktop())
 | 
				
			||||||
 | 
					                    return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (info.getIsHidden())
 | 
				
			||||||
 | 
					                    return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                return info.getShowIn(std::vector<std::string>());
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (isNeedAutoStart(entry.absoluteFilePath().toStdString()))
 | 
				
			||||||
 | 
					                autostartList.push_back(entry.absoluteFilePath());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user