Bug 244958 - Impossible to resize or move my plasmoid because of the function startTimer() inherited from Plasma::Applet
Summary: Impossible to resize or move my plasmoid because of the function startTimer()...
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Plasma Bugs List
Depends on:
Reported: 2010-07-17 15:52 UTC by thibaultt
Modified: 2010-08-10 23:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:

my Tux eyes source code (kdevlop 4 project) (108.52 KB, application/x-gzip)
2010-07-17 15:52 UTC, thibaultt

Note You need to log in before you can comment on or make changes to this bug.
Description thibaultt 2010-07-17 15:52:41 UTC
Created attachment 49262 [details]
my Tux eyes source code (kdevlop 4 project)

Version:           unspecified (using Devel) 
OS:                Linux

When I build and install my Tux_Eyes plasmoid, it's impossible the resize it or to move it on the plasma desktop. The problem seems to come from the function startTimer used in the function Init() of the applet.

Reproducible: Always

Steps to Reproduce:
Install the KDE 4.5 RC2 version. Compile and install my tux Eyes  plasmoid. Put the Tux Eyes plasmoid on the plasma desktop.

Actual Results:  
It's impossible to resize or move my Tux eyes plasmoid.

Expected Results:  
It's possible to resize and move my plasmoid

My plasmoid works with the KDE 4.4.3 version. Moreover I tried to code my plasmoid using a Qtimer object to do the same thing as the function startTimer but i had the same problem.

If you comment the line 51 in the file tux_eyes.cpp (the line where the function startTimer is used during the Init() function), it's possible to resize and move my plasmoid, however, my plasmoid doesn't work of course.
Comment 1 Aaron J. Seigo 2010-08-10 23:44:14 UTC
the bug is in the applet.

the two svg widgets are being set to the same size as the applet:


then they are being moved:

    leftPupil->setPos(pupilPos(eyesRect.adjusted(paddingX,paddingY,-paddingX,-paddingY), mousePos)
                           - leftPupil->boundingRect().center());

    rightPupil->setPos(pupilPos(eyesRect.adjusted(paddingX,paddingY,-paddingX,-paddingY), mousePos)
                             - rightPupil->boundingRect().center());

at which point they are covering a space far outside the applet (being the same size of the applet) and therefore covering other items ... like the applet handle.

(note that instead of using boundingRect() on the applet, you should probably be using contentsRect())

it used to work because SvgWidget didn't catch mouse events in 4.4; they do in 4.5.0, though i've made a change for 4.5.1 that will pass them through again if the mouse click signal is not being used on that SvgWidget.
Comment 2 Aaron J. Seigo 2010-08-10 23:44:29 UTC
SVN commit 1161819 by aseigo:

pass through mouse events if nobody is connected to us

 M  +2 -0      svgwidget.cpp  

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