Bug 271532 - [Regression][Bisected] 4.6.1 to 4.6.2 libkdeinit4_plasma-desktop.so panel placement
Summary: [Regression][Bisected] 4.6.1 to 4.6.2 libkdeinit4_plasma-desktop.so panel pla...
Status: RESOLVED DUPLICATE of bug 272663
Alias: None
Product: plasma4
Classification: Plasma
Component: multiscreen (show other bugs)
Version: 4.8.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-23 08:42 UTC by Duncan
Modified: 2012-05-22 13:33 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Desktop as it should be (1/3 size, 256-color png) (166.13 KB, image/png)
2011-04-23 08:42 UTC, Duncan
Details
Desktop with bad panel location (1/3 size, 256-color png) (163.99 KB, image/png)
2011-04-23 08:48 UTC, Duncan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2011-04-23 08:42:31 UTC
Created attachment 59229 [details]
Desktop as it should be (1/3 size, 256-color png)

Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

I have dual 1920x1080 monitors in stacked orientation, for a 1920x2160 overall desktop.  Gentoo/~amd64.  kde and in fact my entire system is kept at or near latest release, currently kde 4.6.2, kernel 2.6.38, xorg-server 1.10.1 with the native Radeon driver (classic non-gallium, kms, currently live-git version as that was required for xorg-server-1.10), mesa-7.10.2-r1 (r1 indicates a gentoo bump on the upstream version), etc.

My plasma-desktop layout is setup with the bottom monitor as my "working" monitor and the top one as system-dashboard and auxiliary.  I have two panels, a small auto-hide panel located at the bottom left (so on the bottom monitor), and a large max-width, max-1/3-screen-height horizontal "system monitor dashboard" across the top, so on the top monitor.  (See the attached desktop as it should be image.  FWIW, the sysmon plasmoids are yasp-scripted, from kde-look.)

Unfortunately, with the upgrade from 4.6.1 to 4.6.2, this large panel doesn't appear where it should.  Instead of appearing at the top of the TOP monitor, it appears a few pixels below the top of the BOTTOM monitor!

Unlock/panel-cashew/screen-edge-button/drag/drop/click-out/lock puts it back where it's supposed to be, but ONLY until kde or plasma-desktop restart, and as you can imagine, that routine gets old rather fast!

I'll attach the bad image as a bug update.

By fiddling around with the package versions and testing, first to find out which package it was (Gentoo's plasma-workspace), then replacing files from 4.6.2 with files from 4.6.1, I was eventually able to isolate the regression to a single file, libkdeinit4_plasma-desktop.so.

I tried to find the browse sources link on kde.org, to see if I could find a possible culprit commit (I'm not a coder but as an experienced Gentooer and a pre-release kernel tester I've gotten so I can sometimes spot the bad commit... with a bit of luck, good commit comments, and narrowed down far enough first, via bisect or knowing the specific file), but YOU GUYS SURE HID THE THING!  I still don't know where, or even if, there's a kde browse sources interface.

I then tried diffing/grepping the files from the source tarballs, and decided it's probably in plasma/desktop/shell based on greps on the library name, but as I'm not actually a coder and lacking commit comments to help, the diffs still left me too much ground to cover, and I gave up.

Reproducible: Always

Steps to Reproduce:
Restart plasma-desktop or X/kde.

Actual Results:  
The top panel... isn't top!  (See the to be attached bad panel location image.)

Expected Results:  
The top panel... ends up at the top of the top monitor where it's configured to be, and has been thru 4.6.1, but not with 4.6.2.  (See the already attached desktop as it should be image.)
Comment 1 Duncan 2011-04-23 08:48:41 UTC
Created attachment 59231 [details]
Desktop with bad panel location (1/3 size, 256-color png)

It doesn't hit the top of the bottom monitor either, as can be seen from the gap between the wallpaper border and the top of the panel.  It's a few pixels below where it'd be expected to be, even if it simply attached to the top of the wrong monitor!
Comment 2 Duncan 2011-04-23 09:28:45 UTC
I just filed gentoo bug #364555, linking here, and updated the URL field above to point to it: http://bugs.gentoo.org/show_bug.cgi?id=364555
Comment 3 ancow 2011-04-30 13:22:45 UTC
Just FYI: the few pixels below the top thing doesn't have anything to do with multiple screens, it happens on my single-screen laptop, too.
Comment 4 Duncan 2011-05-07 02:26:59 UTC
The bug remains in 4.6.3, as well.

Duncan
Comment 5 Duncan 2011-05-07 10:09:27 UTC
OK, I found the sources on git.kde.org, and playing with git log, I've narrowed the problem file down to plasma/desktop/shell/panelview.(cpp|h), thus narrowing it to two possible commits:

commit b239193e10195b13943686f39a186cd29fbf7e24
Author: Aaron Seigo <aseigo@kde.org>
Date:   Thu Mar 31 11:17:32 2011 +0200

    improve autounhide with autorehide

    due to unmergable branches, this was done "by hand" :/

 plasma/desktop/shell/panelview.cpp |  147 ++++++++++++++++++++++++++----------
 plasma/desktop/shell/panelview.h   |    7 ++-
 2 files changed, 114 insertions(+), 40 deletions(-)

commit 181c58c354f15fb1bda91ea6582f2baf3975c7f2
Author: Lim Yuen Hoe <yuenhoe86@gmail.com>
Date:   Sat Mar 5 16:35:39 2011 +0800

    Make panel properly resize to fit in screen when reducing screen resolution.

    CCBUG: 209962

 plasma/desktop/shell/panelview.cpp |   34 ++++++++++++++++++++++++++++++++--
 1 files changed, 32 insertions(+), 2 deletions(-)

I'll try the patches for them next to nail down the commit, but wanted to post this first to save state. =:^)
Comment 6 Duncan 2011-05-07 10:59:20 UTC
The problem commit is:

commit 181c58c354f15fb1bda91ea6582f2baf3975c7f2
Author: Lim Yuen Hoe <yuenhoe86@gmail.com>
Date:   Sat Mar 5 16:35:39 2011 +0800

    Make panel properly resize to fit in screen when reducing screen resolution.

    CCBUG: 209962

 plasma/desktop/shell/panelview.cpp |   34 ++++++++++++++++++++++++++++++++--
 1 files changed, 32 insertions(+), 2 deletions(-)

As comment #14 on the referenced bug suggests that this doesn't fix that bug anyway, perhaps a revert is in order?
Comment 7 Duncan 2011-05-07 13:40:43 UTC
!#$!@#$  It's back!  Backtracking a bit.
Comment 8 Duncan 2011-05-07 14:42:58 UTC
OK, comment #5 was correct in narrowing it down to two commits, I just screwed up that last test, so it's the /other/ commit of those two, /this/ one:

commit b239193e10195b13943686f39a186cd29fbf7e24
Author: Aaron Seigo <aseigo@kde.org>
Date:   Thu Mar 31 11:17:32 2011 +0200

    improve autounhide with autorehide

    due to unmergable branches, this was done "by hand" :/

 plasma/desktop/shell/panelview.cpp |  147 ++++++++++++++++++++++++++----------
 plasma/desktop/shell/panelview.h   |    7 ++-
 2 files changed, 114 insertions(+), 40 deletions(-)
Comment 9 Duncan 2011-07-13 03:54:32 UTC
This one appears to have been fixed in 4.6.4.  I used window rules as a workaround for a time, but don't seem to need that now.  Resolving WORKSFORME.
Comment 10 Michael Reiher 2011-07-17 11:40:22 UTC
Still happens with 4.6.5... has there been a commit actually which fixes this? I just logged into KDE and the top panel was around 40-50 pixels below the top edge. Please reopen.
Comment 11 Duncan 2011-08-08 09:41:40 UTC
(In reply to comment #10)
> Still happens with 4.6.5... has there been a commit actually which fixes this?
> I just logged into KDE and the top panel was around 40-50 pixels below the top
> edge. Please reopen.

Is it still in 4.7?

Never-the-less, reopening as requested.

(Sorry it took so long.  I switched to claws-mail from the now akonadified and AFAIAC ruined kmail, which I had been using since kde2 era.  Oh, well... Anyway, I apparently missed the bug-mail with your comment/request due most likely to problems with the akonadified kmail before I dumped it, and only happened back here for unrelated reasons (referencing the screenshot for something else), thus noticing your request only just now.)

Please don't forget to comment when it's fixed for you, so I can close it, if the devs/bug-wranglers don't.
Comment 12 Martin Doucha 2011-08-24 14:50:24 UTC
I can confirm that the bug is still present in KDE 4.7.0 (Gentoo). I have the panel on top edge of the screen set to autohide. After each relogin, when I move a window to touch the top edge of the screen, the panel snaps to the bottom edge of the window instead of top edge of the screen. If I move the window away from the top edge of the screen, the panel returns to its original position. The panel stops moving only after I unlock widgets and move it back into position by hand.
Comment 13 cmt.miniBill 2011-10-28 10:25:26 UTC
I can confirm this bug in 4.7.2 on Gentoo [and I'm having it since 4.6.something]:
panel that is set to top jumps to center screen
my panel is not set to autohide
when I move it back in place it doesn't jump anymore
Comment 14 James Richard Tyrer 2011-11-19 04:52:52 UTC
Using 4.7.3 + (i.e. a current built of the 4.7 branch)

I am having similar problems with a top panel interacting with non-maximized windows (e.g. KCalc) in the auto-hide mode and unhiding below the unmaxed window instead of at the top of the screen.  The auto-hide panel also interacts with a panel on (my) right of the screen that contains only the digital clock and a spacer.
Comment 15 Martin Doucha 2012-05-22 09:02:12 UTC
As of KDE 4.8.3 (Gentoo), the main panel still interacts with non-maximized windows touching top edge of the screen when the panel is placed on the top edge of the screen and set to autohide. Could somebody PLEASE fix this bug already?
Comment 16 Duncan 2012-05-22 10:49:55 UTC
There's an apparently related bug, #272663 (link https://bugs.kde.org/show_bug.cgi?id=272663 for those getting this by mail) that I'm CCed on.  There, two users reported that deleting the ~/.kde/share/config/plasma-desktoprc file (with kde stopped, of course) helps.  That would explain why I quit having the problem at some point, see comment #9.  Apparently, that file only contains autohide settings, etc, so deleting it doesn't delete too much config and it's easy to reset what it does track.

As I've asked there, tho, anyone still having the problem, please save that file somewhere else before deleting it, then delete, login to kde again and see if the problem is gone, and if so, attach the bad file that you saved off, and preferrably the good replacement (or a diff between them) as well, so we can see what bit of the config is causing the problem.

If that fixes it, please attach the file _there_, and (if you can't do it) ask me to mark this bug as a duplicate of that, since it seems to have more CCed users, votes, etc, and more current activity.

Meanwhile, updating the version field to reflect the fact that it's still in 4.8.3...
Comment 17 Martin Doucha 2012-05-22 12:03:42 UTC
Thanks, removing the file helped. I'll upload the bad file and a diff to bug #272663.
Comment 18 Myriam Schweingruber 2012-05-22 13:33:14 UTC
Thank you for the feedback.

*** This bug has been marked as a duplicate of bug 272663 ***