[vlc-devel] [PATCH] qt display geometry fixes

Lyndon Brown jnqnfe at gmail.com
Fri Sep 18 19:59:14 CEST 2020


I only have a limited amount of understanding in this particular area,
so I'm struggling to evaluate your concern here. I simply saw a
deprecation warning in the build output and went off to research what
the replacement was, going off of the hint given in the deprecation
warning.

My understanding, if I remember correctly what I dug up in my research
(two weeks ago), was that the `QGuiApplication::primaryScreen()-
>availableGeometry()` call is a suitable/direct equivalent to the
deprecated `qApp->desktop()->availableGeometry()` call, at least with
that latter call being made with no param as is the case. Thus no
change in existing functionality.

With the latter two commits, behaviour is changed to retrieve and use
the screen that is associated with the widget, if one is, otherwise
falling back to the primary screen. I would assume this would be better
for multi-monitor setups, *if* the widget has become associated with a
particular screen at the time when the restoreWidgetPosition() call is
made. If not, then behaviour is unchanged. I have no knowledge of
when/how widgets actually become associated with a screen, so am unable
to assess whether or not this will actually help.

I am uncertain whether you are actually suggesting that the change here
changes behaviour and in a bad way, or whether you accept that the
deprecation fix is correct, but you're questioning the fundamental
design of the function in using such a call.
 

On Fri, 2020-09-18 at 10:30 +0200, Pierre Lamot wrote:
> I don't think this is a good idea to return 
> QGuiApplication::primaryScreen() by default, because a widget might
> not 
> be associated to a screen (before it's creation is complete for 
> instance)
> 
> On 2020-09-17 23:13, Lyndon Brown wrote:
> > three patches are attached.
> > 
> > the first directly fixes the deprecation warning currently being
> > printed in build output.
> > 
> > the second patch adds some useful helpers as used in the third.
> > 
> > the third patch was inspired by a solution i'd seen elsewhere when
> > researching how to tackle fixing the deprecation issue. i would
> > assume
> > that this change may be a positive one for people with multiple
> > monitors. that does not include me, so i'm unable to verify.
> > 
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list