[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 278981] New: Calling QWidget::setGeometry() on a top-level
From:       Bartosz Brachaczek <b.brachaczek () gmail ! com>
Date:       2011-07-31 23:51:05
Message-ID: bug-278981-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=278981

           Summary: Calling QWidget::setGeometry() on a top-level window
                    makes it appear on different coordinates each time it
                    is shown
           Product: kwin
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: compatibility
        AssignedTo: kwin-bugs-null@kde.org
        ReportedBy: b.brachaczek@gmail.com


Created an attachment (id=62402)
 --> (http://bugs.kde.org/attachment.cgi?id=62402)
testcase.cpp

Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

Calling QWidget::setGeometry() on a top-level window makes it appear on
different coordinates each time it is shown. More precisely, it seems it moves
to the bottom-right corner in steps of window's
geometry().topLeft()-frameGeometry().topLeft().
Normally I would report such thing to the Qt bugtracker but it didn't behave
like that in KDE SC 4.6.x. It is a new thing in KDE SC 4.7.0. Maybe it's still
a Qt bug or not a bug at all, but I'm not the one to decide.

Calling regular resize() + move() instead of setGeometry() does not result in
any similar problems.

Attaching example code that shows the issue quite good.

Reproducible: Always

Steps to Reproduce:
1. Grab my testcase and save it as testcase.cpp.
2. Run
    $ moc testcase.cpp > testcase_moc.cx
3. Run
    $ g++ `pkg-config --libs --cflags QtGui` -o testcase testcase.cpp
4. Run
    $ ./testcase
and watch the window showing up every time in a different place.


Expected Results:  
If KWin devs consider it a bug in KWin, it is fixed so that the window shows
every time on the same coordinates. If it is a bug Qt, it gets reported.

I discovered it because an app I am developer of (Kadu IM) was calling
setGeometry() on top-level windows and we were experiencing that kind of moving
windows when restoring from tray. We have already fixed it to resize() + move()
but there may be more apps doing like we before (I don't know any, though).

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic