From a38e87afeaf0b46befc7376f01b6569138e8ff40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 6 Sep 2012 08:02:41 +0200 Subject: [PATCH] Drop hack for NET::Menu means NET::TopMenu KDE has not supported the TopMenu in any 4.x release and most of the TopMenu related code has already been dropped from KWin. It is extremely unlikely that there is still a window around which would need this specific check. And even if there were such a check it would be broken. So let's just remove this hack which means less checks in one of the hottest code pathes of KWin. CCBUG: 306383 --- toplevel.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/toplevel.cpp b/toplevel.cpp index 0bb1caca60..1174fa2ac1 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -173,14 +173,6 @@ NET::WindowType Toplevel::windowType(bool direct, int supported_types) const info->setWindowType(wt); // force hint change } // hacks here - if (wt == NET::Menu && cl != NULL) { - // ugly hack to support the times when NET::Menu meant NET::TopMenu - // if it's as wide as the screen, not very high and has its upper-left - // corner a bit above the screen's upper-left cornet, it's a topmenu - if (x() == 0 && y() < 0 && y() > -10 && height() < 100 - && abs(width() - workspace()->clientArea(FullArea, cl).width()) < 10) - wt = NET::TopMenu; - } // TODO change this to rule const char* const oo_prefix = "openoffice.org"; // QByteArray has no startsWith() // oo_prefix is lowercase, because resourceClass() is forced to be lowercase