Skip to content

Download progress-bar drawing can leak GDI state into neighboring list cells

Summary

The current eMule-main download and downloading-clients progress-bar drawing paths should be rechecked against eMuleAI v1.4 fixes for status bars bleeding into neighboring columns and gray backgrounds after horizontal scrolling with the fully-flat progress style.

Current Main Evidence

  • srchybrid\DownloadListCtrl.cpp still draws file and source progress bars through cached status bitmaps and status DCs without the explicit flat-bar DC state isolation present in eMuleAI.
  • srchybrid\DownloadClientsCtrl.cpp still calls CUpDownClient::DrawStatusBar(...) directly for the Obtained Parts column.
  • Current main has stale-row lifetime guards from the BUG-040, BUG-044, and BUG-056 line, but those fixes do not cover drawing-state leakage or invalid narrow rectangles.

eMuleAI Reference

eMuleAI v1.4 notes two relevant fixes:

  • Downloading Clients / Obtained Parts progress bars no longer bleed into neighboring columns or render incorrectly gray.
  • Downloads list gray text backgrounds after horizontal scrolling are fixed when the progress bar style is fully flat.

In source, eMuleAI validates progress-bar dimensions and uses SaveDC / RestoreDC around flat-bar drawing in the affected list controls.

Stock/Community Comparison

The stock/community 0.72 code follows the older drawing model and does not appear to carry the eMuleAI v1.4 safeguards. This is therefore a local UI hardening candidate, not a stock parity requirement.

Broadband Fit

This is low drift: it should not change protocol behavior, queue policy, or file state. It is worth keeping as a small UI correctness fix because broadband validation now exercises heavy list scrolling and many-source states.

Resolution

Implemented on main with a small progress-bar drawing seam. The Downloads file/source rows and Downloading Clients obtained-parts column now skip invalid target rectangles and isolate flat-bar CDC state with SaveDC / RestoreDC.

Acceptance Criteria

  • [x] progress columns validate non-positive rectangles before drawing
  • [x] flat-bar drawing does not leak text/background state into later subitems
  • [x] Downloading Clients and expanded download-source rows redraw cleanly after horizontal scrolling
  • [x] existing stale-row pointer guards remain intact
  • [x] targeted seam regression covers the affected rectangle and flat-bar isolation policy; app builds cover the MFC/GDI call sites