Skip to content

[gui] let use some classes in batch mode#21907

Merged
linev merged 3 commits intoroot-project:masterfrom
linev:gui_batch_fixes
Apr 15, 2026
Merged

[gui] let use some classes in batch mode#21907
linev merged 3 commits intoroot-project:masterfrom
linev:gui_batch_fixes

Conversation

@linev
Copy link
Copy Markdown
Member

@linev linev commented Apr 14, 2026

  1. Let work with "dummy" TGPicture objects in batch. Even if pixmap is empty - return pointer on existing object to suppress warnings in the TG... constructors
  2. Correctly set ref counter in TGGC constructor. Otherwise instance can be created with wrong refcount value.
  3. In TGLabel set fHasOwnFont flag only when really new TGGC object is allocated. Otherwise in destructor TGLabel tries to delete instance which is not owned. Appears in batch mode

This PR will help to run GUI tests in batch mode like prepared in #21882

linev added 3 commits April 14, 2026 10:12
In batch mode fNormGC is 0 and therefore not equal to the GetDefaultGC(). But in destructor fHasOwnFont used to delete gc object which not allocated by TGLabel
In any situation such created TGGC instance should have proper ref count value
In batch real pixmap manipulation is not possible.
But all instances of TGPicture are created.
In normal mode they are "hidden", but in batch one can return pointer on the picture to suppress many
errors printout in the TG.. classes

By the way - by the first call of `TGPicturePool::GetPicture()` also dummy ` TGPicture` is returned
@github-actions
Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 8h 20m 38s ⏱️
 3 833 tests  3 831 ✅  1 💤 1 ❌
76 555 runs  76 536 ✅ 18 💤 1 ❌

For more details on these failures, see this check.

Results for commit fb1d269.

Copy link
Copy Markdown
Member

@bellenot bellenot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@linev linev merged commit 6827f40 into root-project:master Apr 15, 2026
33 of 36 checks passed
@linev linev deleted the gui_batch_fixes branch April 15, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants