[Libreoffice-commits] core.git: vcl/unx

Michael Meeks michael.meeks at collabora.com
Fri May 16 13:52:10 PDT 2014


 vcl/unx/gtk/app/gtksys.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 5eeea7c91d87ee8f0b8bc8c0144c04fb84310bbf
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri May 16 21:49:23 2014 +0100

    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

diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 058b5f5..4bd61c7 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));


More information about the Libreoffice-commits mailing list