|
|
|
@@ -1261,10 +1261,13 @@ public: |
|
|
|
|
|
|
|
Point<int> getScreenPosition (bool physical) const
|
|
|
|
{
|
|
|
|
auto screenBounds = (parentWindow == 0 ? bounds
|
|
|
|
: bounds.translated (parentScreenPosition.x, parentScreenPosition.y));
|
|
|
|
|
|
|
|
if (physical)
|
|
|
|
return Desktop::getInstance().getDisplays().logicalToPhysical (bounds.getTopLeft());
|
|
|
|
return Desktop::getInstance().getDisplays().logicalToPhysical (screenBounds.getTopLeft());
|
|
|
|
|
|
|
|
return bounds.getTopLeft();
|
|
|
|
return screenBounds.getTopLeft();
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle<int> getBounds() const override { return bounds; }
|
|
|
|
@@ -2399,6 +2402,7 @@ private: |
|
|
|
friend class LinuxRepaintManager;
|
|
|
|
Window windowH = {}, parentWindow = {}, keyProxy = {};
|
|
|
|
Rectangle<int> bounds;
|
|
|
|
Point<int> parentScreenPosition;
|
|
|
|
Image taskbarImage;
|
|
|
|
bool fullScreen = false, mapped = false, focused = false;
|
|
|
|
Visual* visual = {};
|
|
|
|
@@ -2855,9 +2859,23 @@ private: |
|
|
|
|
|
|
|
ScopedXLock xlock (display);
|
|
|
|
|
|
|
|
if (XGetGeometry (display, (::Drawable) windowH, &root, &wx, &wy, &ww, &wh, &bw, &bitDepth) && parentWindow == 0)
|
|
|
|
if (! XTranslateCoordinates (display, windowH, root, 0, 0, &wx, &wy, &child))
|
|
|
|
wx = wy = 0;
|
|
|
|
if (XGetGeometry (display, (::Drawable) windowH, &root, &wx, &wy, &ww, &wh, &bw, &bitDepth))
|
|
|
|
{
|
|
|
|
int rootX = 0, rootY = 0;
|
|
|
|
|
|
|
|
if (! XTranslateCoordinates (display, windowH, root, 0, 0, &rootX, &rootY, &child))
|
|
|
|
rootX = rootY = 0;
|
|
|
|
|
|
|
|
if (parentWindow == 0)
|
|
|
|
{
|
|
|
|
wx = rootX;
|
|
|
|
wy = rootY;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
parentScreenPosition = Desktop::getInstance().getDisplays().physicalToLogical (Point<int> (rootX, rootY));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle<int> physicalBounds (wx, wy, (int) ww, (int) wh);
|
|
|
|
|
|
|
|
|