https://bugs.kde.org/show_bug.cgi?id=438277
--- Comment #11 from Sebastian E. <kde-b...@foobarlibre.net> ---
Alignment at bottom is not sufficient to reproduce the issue. There also must
be no screen at the top left of the virtual geometry.

https://invent.kde.org/plasma/plasma-workspace/-/blob/9d2051b0ec2d4857a61d17d9d3f766614c0f42d7/klipper/klipperpopup.cpp

So, the constructor gets the window info of a QMenu that's just been
initialized and then calls QGuiApplication::screenAt to query the screen at its
center. I don't know what's the initial size of a QMenu, but I assume the
coordinates of its center are not much more than (50, 50).

So because there is no screen in our case, the constructor returns early,
leaving m_popupProxy uninitialized. Because m_dirty is initially true,
rebuild() will be called on the aboutToShow signal, where m_popupProxy is
dereferenced while being null. Boom.

Aside from that, the intent of the code seems to be to determine the maximum
width and height of the popup. Uhm, well, the code could as well just take a
random screen from QGuiApplication::screens(). The correct thing to do would be
to iterate QGuiApplication::screens() and collect the minimum width and height.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to