Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408793 - app-office/libreoffice-3.5 - multi-monitor menu alignment inconsistency
Summary: app-office/libreoffice-3.5 - multi-monitor menu alignment inconsistency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-19 00:04 UTC by Jared B.
Modified: 2013-10-21 22:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
menu_left-align.png (menu_left-align.png,79.58 KB, image/png)
2012-03-19 00:04 UTC, Jared B.
Details
menu_right-align.png (menu_right-align.png,82.16 KB, image/png)
2012-03-19 00:04 UTC, Jared B.
Details
Left-hand menu is properly aligned (1.jpg,424.22 KB, image/jpeg)
2012-04-10 16:54 UTC, Paweł Rumian
Details
Middle menu is misaligned but mot so bad (2.jpg,417.88 KB, image/jpeg)
2012-04-10 16:55 UTC, Paweł Rumian
Details
Right-hand menus are totally bad (3.jpg,413.74 KB, image/jpeg)
2012-04-10 16:56 UTC, Paweł Rumian
Details
Menu alignment when LO is run on the right monitor. (4.jpg,64.16 KB, image/jpeg)
2012-04-10 17:07 UTC, Paweł Rumian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jared B. 2012-03-19 00:04:33 UTC
Created attachment 305835 [details]
menu_left-align.png

I just noticed a really weird problem with Libreoffice 3.5.  Normally, when viewing a menu, the left-edge of the menu aligns with 'parent' (in this case, parent could be the active menu bar item, mouse cusor if it's a right-click menu, etc.).  This is how just about all GUI apps I've ever used behave, and is how Libreoffice behaves when using it on my *left* monitor.  However, when using it on my *right* monitor the menus suddently right-align, looking really, really wrong.

Pictures will make this much clearer.  I've attached to images to illustrate.  The first, menu_left-align.png shows a 'normal' screenshot; notice the Tools menu is left-aligned aginst the Tools menu bar item.  The second, menu_right-align.png shows what I mean by right-aligned in this context.  Again, this the menus only appear this way when I have the Libreoffice window on my right monitor; dragging it over to the left results in the menus appearing normally.

I really don't even know where to begin on troubleshooting this, but I'm hoping someone can help me figure out how to fix it (or identify a patch, etc.).  It's terribly distracting, and I keep thinking I'm looking at the wrong menu when looking for items.
Comment 1 Jared B. 2012-03-19 00:04:59 UTC
Created attachment 305837 [details]
menu_right-align.png
Comment 2 Jared B. 2012-03-19 00:35:17 UTC
So here's something interesting.  Here are my USE flags for the version I posted about above:

branding dbus gtk opengl svg vba xmlsec

If I add kde to the mix, aside from getting an astonishingly less hideous theme and icon set, the menus actually behave properly.  So, could this perhaps be related to some weird GTK quirkiness?

Couple additional notes that particularly related to this bug, but in case anyone's wondering why, as a KDE user, I have the kde USE flag disabled to begin with:

* Quickstarter breaks when KDE support is enabled (see bug 308365).  I don't know why, and no one has ever seemed interested in fixing it, so I've had to do without things like an attractive UI and non-brain-dead file picker.

* Quickstarter seems to be totally broken now, regardless of the state of kde USE flag (see bug 408685), so I figured I'd reenable it since I wasn't loosing any functionality at this point (since the functionality is broken regardless).  I figured I'd test the menu thing just to see if there was any difference, and sure enough it works great.

Absolutely no idea where there would be any difference between how menus are aligned when using GTK vs. KDE themes, though.  Very odd.
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-19 07:04:00 UTC
With kde useflag enabled it behave right.

So I suspect this to be bug in GTK+.

Could you try to launch lo like this:

$ SAL_USE_VCLPLUGIN=gen lowriter

and see if the problem persists with generic VCL gui?
Comment 4 Jared B. 2012-03-19 09:34:06 UTC
SAL_USE_VCLPLUGIN=gen works

I also tried SAL_USE_VCLPLUGIN=gtk, and that fails (though, oddly, I get the KDE theming).

So, upstream problem?
Comment 5 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-19 10:50:36 UTC
You get the kde theming if you have oxygen-gtk :P
Comment 6 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-19 10:51:43 UTC
Anyway not sure if it is upstream problem or not.

I can't reproduce this on openSUSE so ccing gnome team if they have some clue.
Comment 7 Jared B. 2012-03-19 11:38:33 UTC
(In reply to comment #5)
> You get the kde theming if you have oxygen-gtk :P

But not with USE=-kde.  From the ebuild:
use kde && themes+=" oxygen"

I know it's a separate issue, but it'd be helpful to be able to get the KDE/oxygen look and feel even if I have to disable other KDE support because of the quickstarter issue (assuming they're still related).  Was going to ask about that in the quickstarter bug, but since you brought it up here...  :-)

I'll probably file a separate bug/feature request about this, but I'm waiting to see how this quickstarter thing shakes out first.

Thanks for investigating.
Comment 8 Pacho Ramos gentoo-dev 2012-03-19 19:29:43 UTC
I can neither reproduce on gnome

Have you tried on a new created user account with a fresh home?
Comment 9 Jared B. 2012-03-19 20:35:56 UTC
I did not try with a new user, no.  I did, however, test with a new libreoffice config (~/.config/libreoffice) and the behavior was sitll present.
Comment 10 Pacho Ramos gentoo-dev 2012-03-20 09:42:30 UTC
Try with a new user please as maybe it's because something wrong on any other config file
Comment 11 Jared B. 2012-03-22 03:42:28 UTC
I will, but I haven't had an opportunity to test this week.  Probably not until Friday or Saturday.  Will post the resilts when I do.
Comment 12 Jared B. 2012-03-24 17:14:14 UTC
I created a new user profile as requested and was able to replicate this problem.  My copy of libreoffice is currently build with USE=kde, so it used the qt/kde backend by default, which works fine.  However, by launching with SAL_USE_VCLPLUGIN=gtk, I was able to reproduce the problem.

One thing I just thought about that may explain why it's an issue on my system is that I have GTK+ 3 hard masked:
# Don't install GTK 3 - no need for it
>=dev-cpp/gtkmm-3.0
>=x11-libs/gtk+-3.0

However, best I can tell libreoffice support for GTK3 is explicitely disabled, so I don't think this should matter.  Still, wanted to bring it up just in case.
Comment 13 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-27 15:48:21 UTC
(In reply to comment #12)
> I created a new user profile as requested and was able to replicate this
> problem.  My copy of libreoffice is currently build with USE=kde, so it used
> the qt/kde backend by default, which works fine.  However, by launching with
> SAL_USE_VCLPLUGIN=gtk, I was able to reproduce the problem.
> 
> One thing I just thought about that may explain why it's an issue on my
> system is that I have GTK+ 3 hard masked:
> # Don't install GTK 3 - no need for it
> >=dev-cpp/gtkmm-3.0
> >=x11-libs/gtk+-3.0
> 

The gtk3 has nothing to do with it. It is even disabled by default. As I can't reproduce it on stable system it must be something that happens with the testing packages.
Comment 14 Jared B. 2012-03-27 15:57:05 UTC
(In reply to comment #13)
> As I can't reproduce it on stable system it must be something that happens with
> the testing packages.

I'm not sure I understand your last comment.  If by "testing packages" you mean Libreoffice 3.5, then yes, that's exactly correct.  I tried to be explicit about that in my initial post.  3.4 worked great for me, but I had to upgrade to 3.5 to address some other problems with the 3.4 release (specifically, broken macro security support).  After performing the upgrade is when I encountered the problem.

If you're referring to some other test packages, can you be more specific?  I run amd64 stable, with as few unstable as packages as possible.
Comment 15 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-27 16:03:52 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > As I can't reproduce it on stable system it must be something that happens with
> > the testing packages.
> 
> I'm not sure I understand your last comment.  If by "testing packages" you
> mean Libreoffice 3.5, then yes, that's exactly correct.  I tried to be
> explicit about that in my initial post.  3.4 worked great for me, but I had
> to upgrade to 3.5 to address some other problems with the 3.4 release
> (specifically, broken macro security support).  After performing the upgrade
> is when I encountered the problem.
> 
> If you're referring to some other test packages, can you be more specific? 
> I run amd64 stable, with as few unstable as packages as possible.

By testing packages I ment the ~system libs and all the other stuff. I was not reffering to stable libreoffice.

FWIW I run the lo-3.5 within the stable environment and the gtk gui works correctly so I assumed you run the testing tree.
Comment 16 Jared B. 2012-03-27 16:07:52 UTC
Could it be a xinerama or video driver thing or something, then?  Anything I can test there to try to identify the source of the problem?
Comment 17 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-27 16:15:50 UTC
(In reply to comment #16)
> Could it be a xinerama or video driver thing or something, then?  Anything I
> can test there to try to identify the source of the problem?

Hmm if you are running dualhead with xinerama instead of xrandr it might pose some issues. I have dualhead but only xrandr set one (eg no 'bigdesktop' or 'eyefinity' how amd nowdays propagate it).

So verify that your mutlimonitor setup is something like this in xorg.conf:


Section "Device"
        Identifier      "RadeonHD"
        Option          "Monitor-DisplayPort-0" "DVI screen 0"
        Option          "Monitor-DVI-0" "DVI screen 1"
EndSection

Section "Monitor"
        Identifier      "DVI screen 0"
        Option          "DPMS"          "true"
        Option          "Primary"       "True"
EndSection

Section "Monitor"
        Identifier      "DVI screen 1"
        Option          "LeftOf"        "DVI screen 0"
        Option          "DPMS"          "true"
        Option          "Primary"       "False"
EndSection
Comment 18 Jared B. 2012-03-27 16:24:04 UTC
Well, I threw out xinerama as an example.  I'm actually using nvidia twinview, but I do have the xinerama USE flag enabled in KDE and the like for better multi-monitor support.

Here are the relevant sections from my xorg.conf file:

Section "Monitor"
    Identifier  "viewsonic"
    HorizSync   30-110
    VertRefresh 50-180
EndSection

Section "Device"
    Identifier  "geforce"
    Driver      "nvidia"
    Option      "DPI"   "96x96"
EndSection

Section "Screen"
    Identifier  "Home Dual"
    Device      "geforce"
    Monitor     "viewsonic"
    DefaultDepth 24
    SubSection "Display"
        Depth       24
        Modes       "1600x1200"
    EndSubSection
    Option      "ConnectToAcpid"            "False"
    Option      "NoLogo"                    "True"
    Option      "DynamicTwinView"           "False"
    Option      "TwinView"                  "True"
    Option      "MetaModes" "1600x1200,1600x1200;1600x1200,NULL;1280x1024,NULL;1280x960,NULL;1024x768,NULL;800x600,NULL;640x480,NULL"
    Option      "SecondMonitorHorizSync"    "30-110"
    Option      "SecondMonitorVertRefresh"  "50-180"
    Option      "TwinViewOrientation"       "RightOf"
    Option      "TwinViewXineramaInfoOrder" "CRT-0, CRT-1"
auto-select +0+0"
EndSection
Comment 19 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-27 16:27:14 UTC
Aha, that might actually be the culprit. Nvidia seriously messes up the dualhead setup so it might break your layout.

I guess using nouveau is out of the question right?
Comment 20 Jared B. 2012-03-27 18:09:31 UTC
(In reply to comment #19)
> Aha, that might actually be the culprit. Nvidia seriously messes up the
> dualhead setup so it might break your layout.

Well, I don't know if that's an accurate assessment.  Nvidia does their own thing, sure, but I wouldn't consider it messing it thing up, and I haven't had any compatibility issues with it in years.  There are so many different ways of doing video stuff on Linux as it is that I don't consider nvidia's method to be any more broken or non-standard than any of the other options.

> I guess using nouveau is out of the question right?

Not on my desktop.  I like actually getting full use out of my $250 video card.  :-)  I could maybe try switching to it temporarily for testing or debugging, though.
Comment 21 Tomáš Chvátal (RETIRED) gentoo-dev 2012-03-28 07:15:10 UTC
It might be worth the shot. Because if it is driver bug gnome team nor me can fix it.

Also it depends on the usecase :) I have the ati and with binary driver I get faster opengl and with opensource I get opencl/vdpau and other shiny stuff :P
Comment 22 Jared B. 2012-03-31 03:35:20 UTC
OK, so after a good hour and a half of fighting with this thing, I have nouveau setup and working with a dual-monitor configuration.  Running libreoffice with the GTK backend, however, still results in the menus being right-aligned when on the right screen.  Just to make sure I wasn't suffering from some old/bad config, I moved my ~/.config/libreoffice directory and restarted; still get the same behavior.

Any other suggestions I can try to help identify the source of the problem?
Comment 23 Paweł Rumian 2012-04-10 16:53:58 UTC
I can confirm the problem with a 3 monitor configuration, using open source ATI drivers and very clean monitor configuration done via xrandr (clean == pure RandR protocol, no tricks, no proprietary hacks).

The situation is even worse, as seen in attached screenshots (notice the position of 'Okno' menu in screenshot 3 - the same happens with rightmost menu 'Pomoc').

I have '-xinerama' in /etc/make.conf and the only package in my system that pulls libXinerama is libreoffice (this is another thing I do not understand, but well...).

I am running full testing ~amd64 system.
The problem does not exist when launching with SAL_USE_VCLPLUGIN=gen lowriter

# emerge -pqv libreoffice
[ebuild   R   ] app-office/libreoffice-3.5.2.2  USE="branding cups gtk svg (-aqua) -binfilter -dbus -eds -gnome -graphite -gstreamer -java -jemalloc -kde -mysql -nlpsolver -nsplugin -odk -opengl -pdfimport -postgres -test -vba -webdav -xmlsec" 

# emerge --info
Portage 2.2.0_alpha100 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r2, 3.3.0-gentoo x86_64)
=================================================================
System uname: Linux-3.3.0-gentoo-x86_64-AMD_Athlon-tm-_II_X3_450_Processor-with-gentoo-2.1
Timestamp of tree: Tue, 10 Apr 2012 13:00:01 +0000
app-shells/bash:          4.2_p24
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2-r1
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.4
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo local-repo
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pl"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa amd64 bash-completion bluetooth branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdu gif gnutls gpm gtk iconv ipv6 jpeg lapack lcms mad mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf png ppds pppd python readline session smp spell sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb vdpau vorbis x264 xcb xml xmp xorg xulrunner xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="directory" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 24 Paweł Rumian 2012-04-10 16:54:54 UTC
Created attachment 308413 [details]
Left-hand menu is properly aligned
Comment 25 Paweł Rumian 2012-04-10 16:55:47 UTC
Created attachment 308415 [details]
Middle menu is misaligned but mot so bad
Comment 26 Paweł Rumian 2012-04-10 16:56:30 UTC
Created attachment 308417 [details]
Right-hand menus are totally bad
Comment 27 Paweł Rumian 2012-04-10 16:57:04 UTC
Ah, I am using awesome WM in case this would be important.
Comment 28 Paweł Rumian 2012-04-10 17:07:15 UTC
Created attachment 308421 [details]
Menu alignment when LO is run on the right monitor.

One more detail - when running LO on the left monitor everything is OK, on the middle one it looks like on screenshots, on the right one the menus are aligned to the right edge - see attached screenshot.
Comment 29 Paweł Rumian 2012-04-10 19:08:46 UTC
Another issue when running multihead - the splash screen is always shown on the left monitor, even if LO is launched on the middle or right one. This worked correctly with libreoffice-bin-3.3.4 and works correctly with other applications using splashscreen.

This is a very minor isue so I have not opened a separate bug, but I can do it if you'd prefer.
Comment 30 Paweł Rumian 2012-04-11 12:48:22 UTC
As to menu alignment - seems like it is not Gentoo-specific:
http://listarchives.libreoffice.org/global/users/msg17996.html
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/974900
Comment 31 Paweł Rumian 2012-04-16 13:52:06 UTC
I have also filed a separate upstream bug about the splash screen position:
http://bugs.freedesktop.org/show_bug.cgi?id=48558
(link for tracking purposes)
Comment 32 Paweł Rumian 2012-04-17 13:40:46 UTC
Our main bug is also reported upstream and having at least few duplicates, but still no reaction from the developers:
https://bugs.freedesktop.org/show_bug.cgi?id=48168
Comment 33 Pacho Ramos gentoo-dev 2012-07-07 12:46:49 UTC
This looks like a libreoffice bug that should be fixed per:
https://bugs.freedesktop.org/show_bug.cgi?id=46469
Comment 34 Andreas K. Hüttel archtester gentoo-dev 2013-10-21 22:21:54 UTC
Fixed according to upstream bug.