|
7 | 7 | Full-screen magnifier module. |
8 | 8 | """ |
9 | 9 |
|
10 | | -from ctypes import byref # noqa: I001 |
| 10 | +from ctypes import byref |
11 | 11 | from ctypes.wintypes import RECT |
12 | 12 | from typing import override |
13 | 13 |
|
14 | | -from logHandler import log |
15 | | -import ui |
16 | 14 | import systemUtils |
| 15 | +import ui |
| 16 | +from logHandler import log |
| 17 | +from utils.debounce import PREVENT_THREE_HZ_FLASH_MS, debounceLimiter |
17 | 18 | from winBindings import magnification |
| 19 | + |
| 20 | +from .config import _isDebug, getFullscreenMode, isTrueCentered |
18 | 21 | from .magnifier import Magnifier |
| 22 | +from .utils.errorHandling import MagnifierStartError, trackNativeMagnifierErrors |
19 | 23 | from .utils.filterHandler import FilterMatrix |
20 | 24 | from .utils.spotlightManager import SpotlightManager |
21 | 25 | from .utils.types import ( |
| 26 | + Coordinates, |
22 | 27 | Filter, |
23 | | - MagnifiedView, |
24 | 28 | FullScreenMode, |
25 | | - Size, |
| 29 | + MagnifiedView, |
26 | 30 | MagnifierParameters, |
27 | | - Coordinates, |
| 31 | + Size, |
28 | 32 | ) |
29 | | -from .config import getFullscreenMode, isTrueCentered, _isDebug |
30 | | -from .utils.errorHandling import trackNativeMagnifierErrors, MagnifierStartError |
31 | 33 |
|
32 | 34 |
|
33 | 35 | class FullScreenMagnifier(Magnifier): |
@@ -251,6 +253,10 @@ def _getFilterMatrix(self) -> FilterMatrix: |
251 | 253 | case Filter.INVERTED: |
252 | 254 | return FilterMatrix.INVERTED |
253 | 255 |
|
| 256 | + @debounceLimiter( |
| 257 | + cooldownTimeMs=PREVENT_THREE_HZ_FLASH_MS, |
| 258 | + delayTimeMs=PREVENT_THREE_HZ_FLASH_MS, |
| 259 | + ) |
254 | 260 | @trackNativeMagnifierErrors |
255 | 261 | def _applyFilter(self) -> None: |
256 | 262 | """ |
|
0 commit comments