On Monday, May 30, 2016 11:36:54 AM CEST Kurt Hindenburg wrote:
> There are a number of lines that division by zero could happen in
> frameworks/kwindowsystem/src/platforms/xcb/kwindowsystem.cpp  if
> displayGeometry returns a 0 QRect.  I think that is what is happening with
> bug 349512.

urgh. That means that there are no QScreens with a size.

> 
> viewportToDesktop, viewportWindowToDesktop, desktopToViewport
> 
> I’m not clear on the best way to prevent this.  Forcing displayGeometry to
> never return a 0 QRect (which seem the best) or by checking all the
> locations of division by 0.

If the size is 0/0 then returning a false size looks incorrect to me. On the 
other hand it means that we are in an intermediate state - no screens is not a 
valid setup.

So my suggestion would be to change line 75 to only update the displayGeometry 
if region.boundingRect() is not empty.

Cheers
Martin

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to