File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ def __init__(
4040 self ,
4141 / ,
4242 * ,
43+ backend : str = "default" ,
4344 compression_level : int = 6 ,
4445 with_cursor : bool = False ,
4546 # Linux only
@@ -51,6 +52,11 @@ def __init__(
5152 self .compression_level = compression_level
5253 self .with_cursor = with_cursor
5354 self ._monitors : Monitors = []
55+ # If there isn't a factory that removed the "backend" argument, make sure that it was set to "default".
56+ # Factories that do backend-specific dispatch should remove that argument.
57+ if backend != "default" :
58+ msg = 'The only valid backend on this platform is "default".'
59+ raise ScreenShotError (msg )
5460
5561 def __enter__ (self ) -> MSSBase : # noqa:PYI034
5662 """For the cool call `with MSS() as mss:`."""
Original file line number Diff line number Diff line change @@ -1179,6 +1179,10 @@ def xcb_setup_roots(r: XcbSetup) -> list[_Pointer]:
11791179 return list_xcb (libxcb .xcb_setup_roots_iterator , libxcb .xcb_screen_next , r )
11801180
11811181
1182+ def xcb_randr_get_screen_resources_crtcs (r : _Pointer ) -> Array :
1183+ return array_xcb (randr .xcb_randr_get_screen_resources_crtcs , randr .xcb_randr_get_screen_resources_crtcs_length , r )
1184+
1185+
11821186def xcb_randr_get_screen_resources_current_crtcs (r : _Pointer ) -> Array :
11831187 return array_xcb (
11841188 randr .xcb_randr_get_screen_resources_current_crtcs , randr .xcb_randr_get_screen_resources_current_crtcs_length , r
You can’t perform that action at this time.
0 commit comments