+
    ^jK  c                    a  0 t $ ^ RIHt ^ RIt^ RIHu Ht ^ RI	t	^ RI
t
^ RIt^ RIt^ RItR]	P                  R&   ]! ^Z^d4      tRsR]R&   R R ltR	 R
 ltR R ltR R ltR R lt]P0                  ! RR7      R R l4       tR# )    )annotationsN0STALL_GUARD_NOTIFYzsubprocess.Popen[bytes] | None_xvfbc                    V ^8  d   QhRRRR/# )   displaystrreturnbool )formats   "H/home/user/overdeck-gateway-renew-test/modules/systray/tests/conftest.py__annotate__r      s     	 	C 	D 	    c                    \         P                  ! R RV .\         P                  \         P                  RR7      P                  ^ 8H  # )xdpyinfoz-displayF)stdoutstderrcheck)
subprocessrunDEVNULL
returncode)r   s   &r   _display_is_upr      sA    W-%%%%		

 *	r   c                   V ^8  d   QhRR/# )r   r
   z*tuple[subprocess.Popen[bytes], str] | Noner   )r   s   "r   r   r      s      G r   c            
        \          F  p RV  2p\        P                  ! RVRRRRR.\        P                  \        P                  R7      p\        P
                  ! 4       R	,           p\        P
                  ! 4       V8  dB   VP                  4       e   M.\        V4      '       d   W!3u # \        P                  ! R4       K[  \        V4       K  	  R
# )zClaim a private display by starting on it; X sockets are abstract, so a
filesystem probe of /tmp/.X11-unix misses servers that already hold one.:Xvfbz-screenr   1280x1024x24z	-nolistentcp)r   r   g      $@Ng?)
PRIVATE_DISPLAY_NUMBERSr   Popenr   time	monotonicpollr   sleep_stop)numberr   processdeadlines       r   _start_private_xvfbr+      s     *fX,""Wink5Q%%%%

 >>#d*nn)||~)g&&''JJtg * r   c                    V ^8  d   QhRRRR/# )r   r)   zsubprocess.Popen[bytes]r
   Noner   )r   s   "r   r   r   2   s      * t r   c                    V P                  4       e   R # V P                  4         V P                  ^R7       R #   \        P                   d    T P                  4         R # i ; iN)timeout)r%   	terminatewaitr   TimeoutExpiredkill)r)   s   &r   r'   r'   2   sN    ||~!Q$$ s   : %A#"A#c                    V ^8  d   QhRRRR/# r   configzpytest.Configr
   r-   r   )r   s   "r   r   r   <   s     , ,] ,t ,r   c           	        \         P                  P                  R4      R8X  d|   \         P                  P                  RR4      p\         Uu0 uF  pRV 2kK
  	  ppW9  d<   \        P
                  ! R\        \        4       R\        \        4       RV: R	24      hR
# \        P                  ! R4      f   \        P
                  ! R4      h\        4       pVf7   \        P
                  ! R\        \        4       R\        \        4       24      hVw  spV\         P                  R&   \         P                  P                  RR
4       R
# u upi )zKeep GTK widgets off the developer's session display.

Components fall back to a fake GTK only when a test injects one; the rest build
real widgets, which map windows on whatever DISPLAY the shell exported.
SYSTRAY_AI_GUI_TESTS1DISPLAY r   z'GUI suite needs a private display from -z, got DISPLAY=z'; run it through tests/run_gui_tests.shNr   z?Xvfb is required so GTK tests never draw on the session displayz"no usable private X11 display in :z-:WAYLAND_DISPLAY)osenvirongetr!   pytest
UsageErrorminmaxshutilwhichr+   r   pop)r7   r   r(   allowedstarteds   &    r   pytest_configurerK   <   s.    
zz~~,-4**..B/.EF.EFQvh<.EF!##9#>U:V9WWX./0wk J88 
 	||F# abb!#G05L1M0N O+,-/
 	

 NE7#BJJyJJNN$d++ Gs   Ec                    V ^8  d   QhRRRR/# r6   r   )r   s   "r   r   r   ]   s     	 	} 	 	r   c                    \         f   R # \         P                  4         \         P                  ^R7       R s R #   \        P                   d    \         P                  4         R s R # i ; ir/   )r   r1   r2   r   r3   r4   )r7   s   &r   pytest_unconfigurerN   ]   sS    }	OO

1
 E $$ 

Es   : )A)(A)T)autousec                    V ^8  d   QhRRRR/# )r   monkeypatchzpytest.MonkeyPatchr
   r-   r   )r   s   "r   r   r   j   s     M M/A Md Mr   c                    \         P                  P                  R 4      R8X  d   R# V P                  RR 4       V P                  RR 4       R# )r9   r:   Nzui.theme._gtk_prefer_dark_themec                     R # Nr   r   r   r   <lambda>/_no_real_gtk_unless_gui_suite.<locals>.<lambda>m   s    4r   zui.theme._gsettings_getc                    R # rT   r   )schemakeys   &&r   rU   rV   n   s    tr   )r?   r@   rA   setattr)rQ   s   &r   _no_real_gtk_unless_gui_suiter[   i   s>    	zz~~,-49<H13KLr   )__conditional_annotations__
__future__r   builtins@py_builtins_pytest.assertion.rewrite	assertionrewrite
@pytest_arr?   rF   r   r#   rB   r@   ranger!   r   __annotations__r   r+   r'   rK   rN   fixturer[   )r\   s   @r   <module>rg      s    " "   	     $'

  C. (,% ,	*,B	 M Mr   