File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ See Git checking messages for full history.
66- removed support for Python 3.8
77- added support for Python 3.14
88- Linux: fixed a threadding issue in ` .close() ` when calling ` XCloseDisplay() ` (#251 )
9+ - Linux: minor optimization when checking for a X extension status (#251 )
910- :heart : contributors: @
1011
1112## 9.0.2 (2024-09-01)
Original file line number Diff line number Diff line change @@ -352,22 +352,22 @@ def close(self) -> None:
352352
353353 def _is_extension_enabled (self , name : str , / ) -> bool :
354354 """Return True if the given *extension* is enabled on the server."""
355- with lock :
356- major_opcode_return = c_int ()
357- first_event_return = c_int ()
358- first_error_return = c_int ()
355+ major_opcode_return = c_int ()
356+ first_event_return = c_int ()
357+ first_error_return = c_int ()
359358
360- try :
359+ try :
360+ with lock :
361361 self .xlib .XQueryExtension (
362362 self ._handles .display ,
363363 name .encode ("latin1" ),
364364 byref (major_opcode_return ),
365365 byref (first_event_return ),
366366 byref (first_error_return ),
367367 )
368- except ScreenShotError :
369- return False
370- return True
368+ except ScreenShotError :
369+ return False
370+ return True
371371
372372 def _set_cfunctions (self ) -> None :
373373 """Set all ctypes functions and attach them to attributes."""
You can’t perform that action at this time.
0 commit comments