Bug 166149 - Plasma applet position reverts after move
Summary: Plasma applet position reverts after move
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 17:01 UTC by Jonathan Thomas
Modified: 2008-07-10 03:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
case 1 (86.16 KB, video/ogg)
2008-07-10 01:36 UTC, Mario Oschwald
Details
case 2 (287.64 KB, video/ogg)
2008-07-10 01:37 UTC, Mario Oschwald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Thomas 2008-07-09 17:01:25 UTC
Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

Using the Project Neon KDE Nightly packages, svn 829712.

Steps to reproduce:
-Add an applet that can be dragged around by the actual applet. (Digital clock, icon, etc)
-Drag it somewhere by dragging on the actual applet.
-Don't let the applet handles go away. Now try dragging the applet by the applet handles. (The new ones are nice, btw)
-The applet will jump back to it's old position on the screen.
Comment 1 Mario Oschwald 2008-07-10 01:35:09 UTC
I can confirm this bug and have encountered another similar one:

-add a battery applet
-make it really large with the applet handle
-make it really small with the applet handle
-don't let the applet handles go away and click on the applet to move it
-watch it jump to the former top left corner of the larger version

Two videos attached to show the behavior.
Comment 2 Mario Oschwald 2008-07-10 01:36:34 UTC
Created attachment 25998 [details]
case 1
Comment 3 Mario Oschwald 2008-07-10 01:37:09 UTC
Created attachment 25999 [details]
case 2
Comment 4 Mario Oschwald 2008-07-10 03:11:28 UTC
OK, I think I found the reason for the 1st case of this bug, even though I don't know how to fix this properly (The entanglement between applet handles, and applets in regard to moving is imo pretty nasty)

If you move an Applet via the Applet::MouseMoveEvent Method it changes (if a handle is present) the position of the handle. Since at that time it is child of
the handle it moves along with the handle as it's coordinate system is relative to the parents - this does not change the applets local coordinates. If you then (before the handle is destroyed) use the the handle to move the applet the bug occurs in that the handle stores the current position of the applet (which hasn't changed during the previous move) then adjusts its own position to that position (+delta).

In other words the applet thinks "I'll stick with the handle" and the handle thinks, "I'll stick with the applet".
Comment 5 Aaron J. Seigo 2008-07-10 03:36:20 UTC
SVN commit 830264 by aseigo:

fix various handle regressions, including:
* move applet or resize it then move with handle and it pops to a new location
* handles unhover too soon
* handles don't show on the correct side always
* handles are not visually associated well enough with the target applet
* icons are hard to see
BUG:166149


 M  +105 -46   applethandle.cpp  
 M  +4 -2      applethandle_p.h  
 M  +4 -3      containment.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=830264