summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-03-15 10:38:06 +0000
committerMichael Meeks <michael.meeks@suse.com>2013-03-15 11:08:47 +0000
commitff8d03d3871818238f8986b76ff901e4eb6fb701 (patch)
tree605f1c1df77c34e6b099d03fabac40e08abd569a /vcl/unx
parent7a9b0c3ac363870f826422f7515e323865b7cbaa (diff)
Resolves: rhbz#906137 slide show inverts outputs
we go to some effort to determine the right value of ret and then throw it away and return 0 regression since 4a7e3482912c90b73d6e12c82bcd9ce31975e3f1 Change-Id: I652cfbe44fdab6560c1c8dc8fe25d6211b5357cb (cherry picked from commit 67aae198f80195e77bd62e7675a372312075b126) Reviewed-on: https://gerrit.libreoffice.org/2743 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/app/gtksys.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index b7996c110ae1..f5862c255c20 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -179,14 +179,14 @@ namespace {
static int _fallback_get_primary_monitor (GdkScreen *pScreen)
{
// Use monitor name as primacy heuristic
- int ret = -1;
int max = gdk_screen_get_n_monitors (pScreen);
- for (int i = 0; i < max && ret < 0; i++)
+ for (int i = 0; i < max; ++i)
{
char *name = gdk_screen_get_monitor_plug_name (pScreen, i);
- if (name && !g_ascii_strncasecmp (name, "LVDS", 4))
- ret = i;
+ bool bLaptop = (name && !g_ascii_strncasecmp (name, "LVDS", 4));
g_free (name);
+ if (bLaptop)
+ return i;
}
return 0;
}