Review Request: Backport multihead fixes

Guillaume Pothier gpothier at gmail.com
Wed Mar 25 00:02:40 CET 2009


On Tue, Mar 24, 2009 at 6:46 PM, Aaron J. Seigo <aseigo at kde.org> wrote:
> the question becomes: do we want to introduce some logic (which will likely
> get a bit complex) to make things work differently?


Yes, I think it is very much needed. Actually I thought it was already
implemented as it has always been working for me (even in KDE3 IIRC),
but as you suggested it might actually have been a "bug" caused by
inconsistent screen numbering.

Maybe a very rough sketch for the logic could be:

On screen removed() {
    For each panel that resides on an inexistent screen {
        If corresponding edge is free on NearestScreen() {
            place panel on that edge, using the same proportions or
size as it had. But do not save that new location
        } else { do nothing }
}}

On screen added() {
    For each panel {
        if panel's current screen is not the same as the one saved {
            Restore panel's location
}}}

I didn't look at the code so I'm not sure about the "do not save that
new location" part.
About NearestScreen(), it could just actually be the next configured
screen, like (s+1)%N, or something like that, if we do not have
information about where the removed screen was.

Anyway, this logic would at least take care of the quite common case
where there is only one panel.

Cheers,
g


More information about the Plasma-devel mailing list