MCPcopy Create free account
hub / github.com/NyarchLinux/DesktopPuppet / update_loop

Function update_loop

src/main.py:74–85  ·  view source on GitHub ↗
(surface, model_manager)

Source from the content-addressed store, hash-verified

72 if surface is None:
73 return
74 Gdk.Surface.set_input_region(surface, Region(RectangleInt(0, 0, 0, 0)))
75
76 server.start_interaction_server()
77 threading.Thread(target=update_loop, args=(surface,model_manager)).start()
78
79def update_loop(surface, model_manager):
80 last_input_region = (0,0,0,0)
81 reset_interval = 0
82 while os.path.exists(LOCKFILE):
83 reset_interval += 1
84 x,y,w,h = model_manager.get_updated_area()
85 model_manager.update_cursor_position()
86 if (x,y,w,h) != last_input_region or reset_interval % 30 == 0:
87 Gdk.Surface.set_input_region(surface, Region(RectangleInt(x,y,w,h)))
88 last_input_region = (x,y,w,h)

Callers

nothing calls this directly

Calls 2

get_updated_areaMethod · 0.80

Tested by

no test coverage detected