[okular] [Bug 421634] New: Presentation mode misrendering with two monitors and screen scaling

Oliver Sander bugzilla_noreply at kde.org
Sat May 16 20:13:25 BST 2020


https://bugs.kde.org/show_bug.cgi?id=421634

            Bug ID: 421634
           Summary: Presentation mode misrendering with two monitors and
                    screen scaling
           Product: okular
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: okular-devel at kde.org
          Reporter: oliver.sander at tu-dresden.de
  Target Milestone: ---

Created attachment 128524
  --> https://bugs.kde.org/attachment.cgi?id=128524&action=edit
Screenshot showing the misrendering

I have a setup with a built-in laptop monitor and one external monitor. Both
are set to 1920x1080 resolution.  They are combined to a single virtual
desktop, the external one (set to be the primary display) is stacked on top of
the laptop monitor.

I use a screen scaling factor of 1.5 for both monitors:

~> echo $QT_SCREEN_SCALE_FACTORS 
eDP-1=1.5;DP-1=1.5;HDMI-1=1.5;HDMI-2=1.5;

Presentation mode on the laptop screen works as expected.  On the external
screen, however, I see garbage on 2/3 of the screen (see attachment).

I started debugging and noticed that the size of m_lastRenderedPixmap in the
PresentationWidget::paintEvent method depends on what screen the presentation
mode is activated on.  That size is set in PresentationWidget::generatePage to
1.5 times the widget size.  On the laptop screen, the widget size is reported
as being 1280x720 which, multiplied by 1.5, yields the correct 1920x1080.  On
the external monitor, however, the same code reports a widget size of 1920x1080
right away.  Multiply that by 1.5, and m_lastRenderedPixmap ends up with a size
of 2880x1620.  That seems odd to me.

Now at this point I am stuck.  Can somebody explain to me why I get two
different widget sizes depending on what monitor my widget is on?  And which
one of the two is correct anyway?

In the documentation of QWidget I read: "Do not use [the height function] to
find the height of a screen on a multiple screen desktop."  But the explanation
given there claims that the height method would give me the height of the
complete virtual desktop, which is not the case.  Can somebody who knows Qt
please enlighten me?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list