Bug 306383 - Toplevel::windowType() contains superfluous hacks
Summary: Toplevel::windowType() contains superfluous hacks
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 4.9.1
Platform: unspecified Linux
: NOR task
Target Milestone: 4.9.2
Assignee: KWin default assignee
URL: https://git.reviewboard.kde.org/r/106...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-07 05:47 UTC by Martin Flöser
Modified: 2012-09-07 05:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.9.2
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Flöser 2012-09-07 05:47:50 UTC
The method Toplevel::windowType() contains several hacks which are outdated and should be dropped to improve the performance:
* hack to map a NET::Menu to NET::TopMenu
* hack for changing window type of an openoffice.org 1.x dialog (for bug #66065)

The first hack is not needed as the TopMenu is for one thing no longer supported and even if it still were supported it is quite unlikely that someone is still running a version of kicker which does not support the hint.

The oo.o check can be dropped as the problem mentioned in the referenced bug report does no longer exists and the check would not work anyway as the window class changed to libreoffice and of course it should not have ended as a hack in the source code but as a window rule.

Removing that code will result in a little bit faster effects as this method is quite in the hot path of the effect chain.
Comment 1 Martin Flöser 2012-09-07 05:53:56 UTC
Git commit c65cf6556a973d5cef625668997178d4cc29f476 by Martin Gräßlin.
Committed on 06/09/2012 at 08:02.
Pushed by graesslin into branch 'KDE/4.9'.

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.

M  +0    -8    kwin/toplevel.cpp

http://commits.kde.org/kde-workspace/c65cf6556a973d5cef625668997178d4cc29f476
Comment 2 Martin Flöser 2012-09-07 05:53:56 UTC
Git commit 002251486f6dbf0de2a961de75c6632b794a9634 by Martin Gräßlin.
Committed on 06/09/2012 at 08:11.
Pushed by graesslin into branch 'KDE/4.9'.

Drop openoffice.org 1.x related hack for windowType detection

The oo.o related hack can be removed for several reasons:
1. The dialog in question from bug 66065 is nowadays a utility
2. The window class name changed to libreoffice
3. It's not the task of the window manager to workaround bugs in Clients
Related: bug 66065
FIXED-IN: 4.9.2

M  +0    -5    kwin/toplevel.cpp

http://commits.kde.org/kde-workspace/002251486f6dbf0de2a961de75c6632b794a9634