summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-05-16 21:49:23 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-06-16 17:35:21 +0100
commite90f591475e38b30df3e28387eb0ba4e2d8e7dc4 (patch)
treed9879f052b79ab4bff5ff5fc581ea77c02612fa4 /vcl
parent7e26ebc502dbef4f2bb75e1a4082cd1774b7e3bb (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
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/app/gtksys.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 0a72054aeb9d..ab90746c58c8 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));