KWin handling of plasma desktop windows

Guillaume Pothier gpothier at gmail.com
Thu Oct 16 15:10:55 CEST 2008


Hi, this message is cross-posted to kwin and plasma-devel as
coordination is needed.
Currently both kwin and plasma adjust the geometry of plasma's
DesktopViews in response to screen configuration changes. The problem
is that kwin does not adjust them correctly. With two monitors, there
is one DesktopView per screen. Sometimes (but not always as there is a
race condition), kwin sets one of the DesktopViews to the whole
desktop, ie over both screens. The problem is in
Client::checkWorkspacePosition() in geometry.cpp:
if( isDesktop())
        {
        if (geometry() == workspace()->clientArea( ScreenArea, this ))
            {
            return;
            }

        QRect area = workspace()->clientArea( FullArea, this );
        if( geometry() != area )
            setGeometry( area );
        return;
        }

One solution is to skip the first test (if (geometry() == ...) and to
replace FullArea by ScreenArea in the following. I don't know if it
would reliably work. Another solution would be for kwin to not touch
plasma's DesktopViews at all, letting plasma setting their geometries.
I think it is the best approach. There are two ways to achieve this:
make kwin not touch NET::Desktop windows (ie. remove everything except
the return statement in the code above), or use the NET::Override
attribute for plasma's DesktopViews and make kwin ignore those. Note
that I tried the "ignore desktop windows" approach and it seem to work
well.
What is the best solution?

Cheers,
g


More information about the Plasma-devel mailing list