Skip to content

Conversation

@uwes-ufo
Copy link
Contributor

@uwes-ufo uwes-ufo commented Dec 1, 2025

Description

In addition to #2619, this pull request offers dynamic switching between exclusive and managed fullscreen modes. This can be done by right-clicking the fullscreen button or by pressing Shift+F11.

Currently, switching between exclusive and managed fullscreen modes results in a brief screen flicker. Because exclusive fullscreen mode offers limited window functionality, the screen flickers every time, for example, a tooltip appears. #2619 keeps the screen permanently in managed fullscreen mode, thus preventing the flickering. Exclusive fullscreen mode, on the other hand, offers better performance, which translates into potentially higher frame rates.

I know the implementation is somewhat unusual… I based it on this Stack Overflow question.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • Housekeeping

How Has This Been Tested?

Test Configuration:

  • Operating system: <Name, version number>
  • Graphics Card: <Manufacturer (likely Intel, NVidia, AMD?), Model (HD, Geforce, Radeon..., with model number), driver version?>

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Great PR! Please pay attention to the following items before merging:

Files matching src/**/*.cpp:

  • Are possibly unused includes removed?

This is an automatically generated QA checklist based on modified files.

@uwes-ufo
Copy link
Contributor Author

uwes-ufo commented Dec 1, 2025

The change to src/gui/locationDialogGui.ui doesn't seem to be related. I'll check it out...

@10110111
Copy link
Contributor

10110111 commented Dec 1, 2025

Exclusive fullscreen mode, on the other hand, offers better performance, which translates into potentially higher frame rates.

The change looks quite hacky. Do you actually get any tangible benefits from this mode?

@10110111
Copy link
Contributor

10110111 commented Dec 1, 2025

Graphics Card: <Manufacturer (likely Intel, NVidia, AMD?), Model (HD, Geforce, Radeon..., with model number), driver version?>

I'd rather have this filled...

@uwes-ufo
Copy link
Contributor Author

uwes-ufo commented Dec 1, 2025

This PR addresses the same issue as #2619. It resolves issues #2166, #2472, and #2484. It's again Windows on an Intel UHD 620. Here, you tested the issue and asked how it works. I don't know the exact details either, but in my opinion, the number of buffers used is irrelevant to this problem. The single buffer has the side effect of permanently putting the graphics card into managed fullscreen mode, thus preventing a switch between exclusive and managed modes, which would trigger the flickering.

The change looks quite hacky.

Ja! It's strange, at the very least. I even find it ugly.

Do you actually get any tangible benefits from this mode?

  • Managed mode has no blinking effect.
  • Exclusive mode is faster.

@10110111
Copy link
Contributor

10110111 commented Dec 1, 2025

Exclusive mode is faster

How much faster?

@uwes-ufo
Copy link
Contributor Author

uwes-ufo commented Dec 1, 2025

  • 60 BPS to 40 BPS without atmo
  • 40 BPS to 30 BPS with atmo

on my hardware.

@alex-w alex-w added this to the 25.4 milestone Dec 1, 2025
@alex-w alex-w added this to GUI Dec 1, 2025
@github-project-automation github-project-automation bot moved this to Backlog in GUI Dec 1, 2025
@alex-w
Copy link
Member

alex-w commented Dec 2, 2025

  • 60 BPS to 40 BPS without atmo
  • 40 BPS to 30 BPS with atmo

on my hardware.

What about BPS without patch?

@uwes-ufo
Copy link
Contributor Author

uwes-ufo commented Dec 2, 2025

  • no --single-buffer ~> exclusive fullscreen ~> blink effect + sometimes no mouse pointer

    • without atmo - 60 fps
    • with atmo - 40 fps
  • --single-buffer ~> managed fullscreen ~> no blink effect + reliable mouse pointer

    • without atmo - 40 fps
    • with atmo - 30 fps

This pull request provides an alternative to --single-buffer, which can be toggled during Stellarium's execution.

@10110111
Copy link
Contributor

10110111 commented Dec 2, 2025

So basically, this PR makes it possible to switch between different broken states: one blinking, another 25% slower.

Have you tried reaching out to Intel? Maybe they could provide a real fix for their drivers (they might not even know of the blinking problem). No other vendor has this blinking problem, neither should Intel.

@10110111
Copy link
Contributor

10110111 commented Dec 2, 2025

I wonder if we can, instead of all this hackery, just force the tooltips to be parts of the scene, just as most of the other dialogs.

@uwes-ufo
Copy link
Contributor Author

uwes-ufo commented Dec 2, 2025

I wonder if we can, instead of all this hackery, just force the tooltips to be parts of the scene, just as most of the other dialogs.

That would be an elegant solution to the problem.

I've noticed something else: Sometimes there's no mouse pointer in exclusive fullscreen mode, but the mouse works when you use it blindly.

@gzotti
Copy link
Member

gzotti commented Dec 2, 2025

That's a very old FAQ. Do you have some software cursor enabled like "mouse trail"?

@uwes-ufo
Copy link
Contributor Author

uwes-ufo commented Dec 2, 2025

I have two practically identical laptops; all the software is essentially cloned. On one computer, the mouse cursor disappears, but not on the other...

I can confirm that the problem with the mouse pointer is related to the mouse trail.

@10110111
Copy link
Contributor

10110111 commented Dec 3, 2025

Apparently, it is possible to have scene-based tooltips. For this QGraphicsScene::helpEvent in StelGraphicsScene should be overridden to show the tooltips in a custom way.

@10110111
Copy link
Contributor

10110111 commented Dec 3, 2025

Note that the default tooltips have some special features like animation of one tooltip position into another when moving cursor from one control to another (instead of disappearing and appearing in the new place), as well as fade-in and fade-out effect (at least under KWin, and we have similar animations for screen buttons). These shouldn't be lost when the custom tooltips are implemented. But of course, a proof of concept could ignore these.

@alex-w alex-w modified the milestones: 25.4, 26.1 Dec 15, 2025
On many Intel GPUs under Windows, when in full-screen mode, opening of a
popup window for the tooltip by QToolTip switches the screen from
exclusive full screen mode to a managed one, which results in flicker.

This patch instead shows the tooltip as a QGraphicsScene item, which
avoids creating of a separate window.
@10110111
Copy link
Contributor

I've made a proof of concept for the in-scene tooltips, see #4704.

@uwes-ufo
Copy link
Contributor Author

#4704 looks promising.

I've restored the original tooltips in managed fullscreen mode for debugging purposes, for easier comparison.

uwes-ufo and others added 19 commits December 28, 2025 17:46
…etween_exclusive_and_managed_full-screen_mode
…etween_exclusive_and_managed_full-screen_mode
…etween_exclusive_and_managed_full-screen_mode
…etween_exclusive_and_managed_full-screen_mode
…etween_exclusive_and_managed_full-screen_mode
…etween_exclusive_and_managed_full-screen_mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants