[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Fwd: Problem with QWidget->mapToGlobal()
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2011-07-27 13:28:51
Message-ID: 15447026.acjamlNMbC () freedom
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
this belongs on the kwin list :)
---------- Forwarded Message ----------
Subject: Problem with QWidget->mapToGlobal()
Date: Tuesday, July 26, 2011, 09:34:57
From: Michael Jansen <kde@michael-jansen.biz>
To: kde-core-devel@kde.org
Hi
If i open the window menu (alt+f3) with the mouse the window shows up in the
top left corner of my screen. The reason is that the following code from
workspace/kwin/libkdecorations/kcommondecoration.cpp line 706
QRect menuRect = m_button[MenuButton]->rect();
QPoint menutop = m_button[MenuButton]->mapToGlobal(menuRect.topLeft());
QPoint menubottom = m_button[MenuButton]->
mapToGlobal(menuRect.bottomRight()) + QPoint(0, 2);
KDecorationFactory* f = factory();
showWindowMenu(QRect(menutop, menubottom));
The mapToGlobal() call is supposed to map the coordinates to screen
coordinates as far i can see. But it does not do that. It always returns some
small values like
(gdb) p menubottom
$2 = {xp = 23, yp = 24}
I could even say always those values because it looks like the menu is always
on the same spot.
I have a two screen setup here. That could be related.
Any ideas what is wrong here?
Mike
-----------------------------------------
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Development Frameworks
["signature.asc" (application/pgp-signature)]
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic