Skip to content

Port PresentationWidget to QScreen

QDesktopWidget will probably not survive Qt6 (?), so port to QScreen.

  • QDesktopWidget -> QScreen
  • After setting new screen/geometry, forget them and let resizeEvent() handle any updates.
  • Specifically, don’t connect to screen size change signals.
  • Specifically, setScreen() only sets the new widget position and then waits for resizeEvent().
  • This also means applyNewScreenSize() and repositionContent() can be collapsed into resizeEvent().
  • Replace recalcGeometry() by setScreen(defaultScreen()), where defaultScreen() only checks the configuration.

Screen switching, extracted to !236 (merged):

Steps to reproduce screen switching problem:

  1. Get two screens and launch presentation mode.
  2. Find the screen selector in the presentation toolbar and try to switch the screen.
  3. Go to the task manager/panel (if needed Alt+Tab to the desktop), right-click → More Actions[x] Fullscreen, uncheck fullscreen.
  4. Visually, the presentation widget should not change, but it is behind the task manager/panel now.
  5. Try to switch the screen again.

Observed results:

    1. Presentation widget stays on the old screen. Debugging this revealed that the geometry of the presentation widget is reset to the old value when you call show() or showFullScreen() again. Problem: While the widget is fullscreen, it thinks in screens, not in geometry.
    1. Presentation widget switches the screen.

Fix:

Before changing the geometry, temporarily disable the fullscreen flag of the widget. (setScreen())

Edited by Laura David Hurka

Merge request reports

Loading