[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Problem with QWidget->mapToGlobal()
From: Michael Jansen <kde () michael-jansen ! biz>
Date: 2011-07-26 7:34:57
Message-ID: 2194946.S2UXxYmqDM () gambit ! local ! michael-jansen ! biz
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic