[libreoffice/f16] Resolves: rhbz#784198 show splash screen correctly on multi-head system
David Tardon
dtardon at fedoraproject.org
Tue Mar 6 13:06:53 UTC 2012
commit 417ff2ffdcc2f39a3e472089e2dd50012798ee4d
Author: David Tardon <dtardon at redhat.com>
Date: Mon Mar 5 14:37:52 2012 +0100
Resolves: rhbz#784198 show splash screen correctly on multi-head system
...een-fix-for-multi-head-on-Linux-fdo-33214.patch | 79 ++++++++++++++++++++
libreoffice.spec | 3 +
2 files changed, 82 insertions(+), 0 deletions(-)
---
diff --git a/0001-Splash-screen-fix-for-multi-head-on-Linux-fdo-33214.patch b/0001-Splash-screen-fix-for-multi-head-on-Linux-fdo-33214.patch
new file mode 100644
index 0000000..eb7bc83
--- /dev/null
+++ b/0001-Splash-screen-fix-for-multi-head-on-Linux-fdo-33214.patch
@@ -0,0 +1,79 @@
+From ca9fe5dff457794e55a6bb68633d2a4c2606bd63 Mon Sep 17 00:00:00 2001
+From: Josh Heidenreich <josh.sickmate at gmail.com>
+Date: Wed, 20 Jul 2011 14:17:33 +0930
+Subject: [PATCH] Splash screen fix for multi-head on Linux (fdo#33214)
+
+Uses xinerama to get the size of the primary screen
+---
+ desktop/unx/source/makefile.mk | 6 ++++++
+ desktop/unx/source/splashx.c | 23 +++++++++++++++++++++++
+ 2 files changed, 29 insertions(+), 0 deletions(-)
+
+diff --git a/desktop/unx/source/makefile.mk b/desktop/unx/source/makefile.mk
+index 2dea54a..7864dd8 100755
+--- a/desktop/unx/source/makefile.mk
++++ b/desktop/unx/source/makefile.mk
+@@ -42,6 +42,9 @@ dummy:
+ CFLAGS+=-DENABLE_QUICKSTART_LIBPNG
+ CFLAGS+=$(LIBPNG_CFLAGS)
+ .ENDIF
++.IF "$(USE_XINERAMA)"=="YES"
++CFLAGS+=-DUSE_XINERAMA
++.ENDIF
+
+ STDLIB=
+
+@@ -61,6 +64,9 @@ APP1STDLIBS = $(PTHREAD_LIBS) $(X11LINK_DYNAMIC) $(SALLIB)
+ .IF "$(ENABLE_QUICKSTART_LIBPNG)"=="TRUE"
+ APP1STDLIBS += $(LIBPNG_LIBS)
+ .ENDIF
++.IF "$(USE_XINERAMA)"=="YES"
++APP1STDLIBS += -lXinerama
++.ENDIF
+ .IF "$(OS)"=="SOLARIS"
+ APP1STDLIBS+= -lsocket
+ .ENDIF
+diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
+index c365d47..76ef3eb 100755
+--- a/desktop/unx/source/splashx.c
++++ b/desktop/unx/source/splashx.c
+@@ -32,6 +32,10 @@
+ #include <X11/Xatom.h>
+ #include <X11/Xutil.h>
+
++#ifdef USE_XINERAMA
++#include <X11/extensions/Xinerama.h>
++#endif
++
+ #define USE_LIBPNG
+
+ #include "osl/endian.h"
+@@ -511,6 +515,25 @@ int splash_create_window( int argc, char** argv )
+ int display_width = DisplayWidth( display, screen );
+ int display_height = DisplayHeight( display, screen );
+
++#ifdef USE_XINERAMA
++ int n_xinerama_screens = 1;
++ XineramaScreenInfo* p_screens = XineramaQueryScreens( display, &n_xinerama_screens );
++ if( p_screens )
++ {
++ int i = 0;
++ for( ; i < n_xinerama_screens; i++ )
++ {
++ if ( p_screens[i].screen_number == screen )
++ {
++ display_width = p_screens[i].width;
++ display_height = p_screens[i].height;
++ break;
++ }
++ }
++ XFree( p_screens );
++ }
++#endif
++
+ win = XCreateSimpleWindow( display, root_win,
+ ( display_width - width ) / 2, ( display_height - height ) / 2,
+ width, height, 0,
+--
+1.7.7.6
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 91db703..316c415 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -234,6 +234,7 @@ Patch115: 0002-fdo-42073-sw-expand-all-text-fields-when-setting-pro.patch
Patch116: 0001-Related-rhbz-799628-crash-with-chewing-IM-with-g3g.patch
Patch117: 0001-silence-SolarMutex-not-locked-spew.patch
Patch118: 0001-Resolves-rhbz-799525-put-flat-odf-mimetypes-in-xsltf.patch
+Patch119: 0001-Splash-screen-fix-for-multi-head-on-Linux-fdo-33214.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@@ -1149,6 +1150,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch116 -p1 -b .rhbz-799628-crash-with-chewing-IM-with-g3g.patch
%patch117 -p1 -b .silence-SolarMutex-not-locked-spew.patch
%patch118 -p1 -b .rhbz-799525-put-flat-odf-mimetypes-in-xsltf.patch
+%patch119 -p1 -b .Splash-screen-fix-for-multi-head-on-Linux-fdo-33214.patch
# these are horribly incomplete--empty translations and copied english
# strings with spattering of translated strings
@@ -2470,6 +2472,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
- Resolves: fdo#42073 sw: expand all text fields when setting properties
- Resolves: rhbz#799628 crash with chewing IM with g3g
- Resolves: rhbz#799525 put flat odf mimetypes in xsltfilter.desktop
+- Resolves: rhbz#784198 show splash screen correctly on multi-head system
* Wed Feb 29 2012 Caolán McNamara <caolanm at redhat.com> - 3.4.5.2-7
- Resolves: rhbz#788045 swriter --help wouldn't display help
More information about the scm-commits
mailing list