(surface, model_manager)
| 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 | |
| 79 | def 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) |
nothing calls this directly
no test coverage detected