MCPcopy
hub / github.com/PyQt5/PyQt / IsSupport

Function IsSupport

Demo/WeltHideWindow.py:41–60  ·  view source on GitHub ↗

判断是否支持

()

Source from the content-addressed store, hash-verified

39
40
41def IsSupport():
42 """判断是否支持"""
43 if platform.system() == "Linux":
44 name = os.environ.get("XDG_SESSION_DESKTOP", "") + os.environ.get(
45 "XDG_CURRENT_DESKTOP", ""
46 )
47 if name.lower().find("gnome") != -1:
48 print("gnome desktop")
49 return False
50
51 wid = getoutput("xprop -root _NET_SUPPORTING_WM_CHECK").split(" # ")[-1]
52 print("wid:", wid)
53 if wid:
54 name = getoutput("xprop -id %s _NET_WM_NAME" % wid)
55 print("name:", name)
56 if name.lower().find("gnome") != -1:
57 print("gnome desktop")
58 return False
59
60 return True
61
62
63class WeltHideWindow(QWidget):

Callers 1

WeltHideWindow.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected