[PATCH] Move panel to different screens on multihead
Marco Martin
notmart at gmail.com
Sun Jun 1 17:04:29 CEST 2008
On 6/1/08, Tony Murray <murraytony at gmail.com> wrote:
> This is my first KDE patch so please let me know if coding style/methods
> need to be changed.
> Aaron poked me into looking into this and I was able to come up with a patch
> that moves the panel from one screen to the other. This patch worked
> surprisingly well and I was unable to make it behave badly in testing with
> my two screens.
i don't see particular problems with that, even if i can't test
because don't have a multiscreen setup, maybe if somebody can test it,
but i would commit it (can do if you don't have an account)
> Another bug right now is the panelcontroller doesn't always come up on the
> same screen as the panel (when I connect a screen with xrandr, the panel
> doens't move to it but the panelcontroller thinks it is on the 2nd screen).
> End result, I push the cashew on screen 1 and config bar comes up on screen
> 2. After I move the panel to either screen (after applying my patch) it
> works ok. Just the inital attach causes issues.
hmm, will search around, probably there is an hardcoded 0 position
somewhere, can't chack now but should be something like that
Cheers,
Marco Martin
>
> ---
> trunk/KDE/kdebase/workspace/plasma/plasma/panelcontroller.cpp.orig
> 2008-06-01 02:32:00.000000000 -0500
> +++
> trunk/KDE/kdebase/workspace/plasma/plasma/panelcontroller.cpp
> 2008-06-01 02:32:26.000000000 -0500
> @@ -670,6 +670,14 @@
> return;
> }
>
> + if (!screenGeom.contains(event->globalPos())) {
> + //move panel to new screen if dragged there
> + QDesktopWidget *desktop = QApplication::desktop();
> + int newScreen =
> desktop->screenNumber(event->globalPos());
> + kDebug() << "Mouse drag left panel's screen" <<
> d->containment->screen() << "to screen" << newScreen;
> + d->containment->setScreen(newScreen);
> + }
> +
> Plasma::FormFactor oldFormFactor = d->containment->formFactor();
> Plasma::FormFactor newFormFactor = d->containment->formFactor();
> const Plasma::Location oldLocation = d->containment->location();
>
>
> _______________________________________________
> Panel-devel mailing list
> Panel-devel at kde.org
> https://mail.kde.org/mailman/listinfo/panel-devel
>
>
More information about the Panel-devel
mailing list