Commit 39d220b4 authored by Michail Vourlakos's avatar Michail Vourlakos

block screen filtering for global menu applet

--when the user has enabled PLASMA_USE_QT_SCALING
under X11 environment the screen and window geometries
can not be trusted for comparison. In such case
the global menu should be always visible

BUG: 404500

Test Plan: check that global menu still works properly

Reviewers: #plasma, davidedmundson, broulik

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 3c02226e
......@@ -260,7 +260,17 @@ void AppMenuModel::onWindowChanged(WId id)
if (m_currentWindowId == id) {
KWindowInfo info(id, NET::WMState | NET::WMGeometry);
const bool contained = m_screenGeometry.isNull() || m_screenGeometry.contains(info.geometry().center());
//! HACK: if the user has enabled screen scaling under X11 environment
//! then the window and screen geometries can not be trusted for comparison
//! before windows coordinates be adjusted properly.
//! BUG: 404500
QPoint windowCenter = info.geometry().center();
if (KWindowSystem::isPlatformX11()) {
windowCenter /= qApp->devicePixelRatio();
const bool contained = m_screenGeometry.isNull() || m_screenGeometry.contains(windowCenter);
setVisible(contained && !info.isMinimized());
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment