diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2014-05-16 21:49:23 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2014-05-16 21:52:02 +0100 |
commit | 5eeea7c91d87ee8f0b8bc8c0144c04fb84310bbf (patch) | |
tree | 35b362a4f37b65b17c2e51e569240025377410d9 | |
parent | baf78fb898b0b7ec24a1f15f46e1a884b34867c6 (diff) |
fdo#78799 - ignore overlayed monitors with co-incident origin.
This happens with certain fglrx drivers etc. where 'cloned' is not
set but instead both monitors are placed over the top of each other
(by XFCE) -> work around that.
Change-Id: I9d1846bfae2692681606717f7f5e8408df532d95
-rw-r--r-- | vcl/unx/gtk/app/gtksys.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx index 058b5f53b7fa..4bd61c7103da 100644 --- a/vcl/unx/gtk/app/gtksys.cxx +++ b/vcl/unx/gtk/app/gtksys.cxx @@ -55,15 +55,14 @@ GtkSalSystem::GetDisplayXScreenCount() namespace { -struct GdkRectangleEqual +struct GdkRectangleCoincident { + // fdo#78799 - detect and elide overlaying monitors of different sizes bool operator()(GdkRectangle const& rLeft, GdkRectangle const& rRight) { return rLeft.x == rRight.x && rLeft.y == rRight.y - && rLeft.width == rRight.width - && rLeft.height == rRight.height ; } }; @@ -95,7 +94,7 @@ GtkSalSystem::countScreenMonitors() gdk_screen_get_monitor_geometry(pScreen, j, &aGeometry); aGeometries.push_back(aGeometry); } - GdkRectangleEqual aCmp; + GdkRectangleCoincident aCmp; std::sort(aGeometries.begin(), aGeometries.end(), aCmp); const std::vector<GdkRectangle>::iterator aUniqueEnd( std::unique(aGeometries.begin(), aGeometries.end(), aCmp)); |