@@ -94,6 +94,7 @@ def _taskbar_buttons(app, width, stats=None):
9494def draw_desktop (app , frame_size = None ):
9595 """Draw the desktop background pattern."""
9696 h , w = _resolve_frame_size (app , frame_size )
97+ bounds = (h , w )
9798 attr = theme_attr ("desktop" )
9899 pattern = getattr (getattr (app , "theme" , None ), "desktop_pattern" , DESKTOP_PATTERN )
99100
@@ -105,12 +106,13 @@ def draw_desktop(app, frame_size=None):
105106 line = _desktop_line_cache ['line' ]
106107
107108 for row in range (MENU_BAR_HEIGHT , h - BOTTOM_BARS_HEIGHT + 1 ):
108- safe_addstr (app .stdscr , row , 0 , line , attr )
109+ safe_addstr (app .stdscr , row , 0 , line , attr , _bounds = bounds )
109110
110111
111112def draw_icons (app , frame_size = None ):
112113 """Draw desktop icons (3x4 art + label)."""
113- h , _ = _resolve_frame_size (app , frame_size )
114+ h , w = _resolve_frame_size (app , frame_size )
115+ bounds = (h , w )
114116 for idx , icon in enumerate (app .icons ):
115117 # Use dynamic position helper
116118 x , y = app .get_icon_screen_pos (idx )
@@ -138,24 +140,25 @@ def draw_icons(app, frame_size=None):
138140 attr |= curses .A_BOLD
139141
140142 for row , line in enumerate (art_lines ):
141- safe_addstr (app .stdscr , y + row , x , line , attr )
143+ safe_addstr (app .stdscr , y + row , x , line , attr , _bounds = bounds )
142144 label = str (icon .get ("label" , "" )).center (max (art_width , 2 ))
143- safe_addstr (app .stdscr , y + render_height , x , label , attr )
145+ safe_addstr (app .stdscr , y + render_height , x , label , attr , _bounds = bounds )
144146
145147
146148def draw_taskbar (app , frame_size = None ):
147149 """Draw taskbar row with minimized window buttons."""
148150 h , w = _resolve_frame_size (app , frame_size )
151+ bounds = (h , w )
149152 taskbar_y = h - BOTTOM_BARS_HEIGHT
150153 attr = theme_attr ("taskbar" )
151-
154+
152155 # Always clear the taskbar line
153- safe_addstr (app .stdscr , taskbar_y , 0 , ' ' * w , attr )
154-
156+ safe_addstr (app .stdscr , taskbar_y , 0 , ' ' * w , attr , _bounds = bounds )
157+
155158 stats = _window_stats (app )
156159 buttons = _taskbar_buttons (app , w , stats = stats )
157160 for start_x , _end_x , label , _win in buttons :
158- safe_addstr (app .stdscr , taskbar_y , start_x , f'[{ label } ]' , attr | curses .A_BOLD )
161+ safe_addstr (app .stdscr , taskbar_y , start_x , f'[{ label } ]' , attr | curses .A_BOLD , _bounds = bounds )
159162
160163
161164def draw_statusbar (app , version , frame_size = None ):
@@ -175,4 +178,4 @@ def draw_statusbar(app, version, frame_size=None):
175178 max_status_len = w - status_x
176179 if max_status_len <= 0 :
177180 return
178- safe_addstr (app .stdscr , statusbar_y , status_x , status_text [:max_status_len ], attr )
181+ safe_addstr (app .stdscr , statusbar_y , status_x , status_text [:max_status_len ], attr , _bounds = ( h , w ) )
0 commit comments