Issue 112421 - vcl: Tweak DefaultDisplay for xinerama/xrandr case ?
Summary: vcl: Tweak DefaultDisplay for xinerama/xrandr case ?
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: DEV300m82
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: 3.4.0
Assignee: philipp.lohmann
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks: 90439
  Show dependency tree
 
Reported: 2010-06-15 15:27 UTC by caolanm
Modified: 2011-09-01 21:21 UTC (History)
3 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
How about this (6.73 KB, patch)
2010-06-15 15:27 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2010-06-15 15:27:14 UTC
X11SalSystem::GetDefaultDisplayNumber is the backend which returns the
"DefaultDisplay" for e.g. the monitor for the presenter screen to show on in
multihead mode. 

If we're in "classic" multi-screen X configuration it'll return the
DefaultScreen number, but it also returns that number for the Xinerama-style
mode of a single "Screen" but multiple frame-buffers/monitors. i.e. in that
configuration it's always Monitor 0 for us.

gtk has a (fairly new) gdk_screen_get_primary_monitor api where "The primary
monitor is considered the monitor where the 'main desktop' lives.". This is the
monitor that typically has the gnome-panel on it, and the default monitor on
which apps open up, which is an apparent good fit for what our "DefaultDisplay"
is targeted to do.

In the attached patch if that's not available then try a
gdk_screen_get_primary_monitor-alike fallback of looking at the monitor names
and attempt to prefer laptop internal monitors as the "DefaultDisplay"/"Primary
Monitor" over external ones.

The general goal being that out-of-the-box the presenter screen defaults to
starting on a laptop's internal screen and the presentation itself on the
external screen. At the moment the presenter screen starts on the first
xinerama/xrandr entry in the list which might or might not be the laptop monitor. 

Having the presenter screen start on the external monitor, and the presentation
itself on the laptop is an annoying whiny complaint I hear regularly.
Comment 1 caolanm 2010-06-15 15:27:38 UTC
Created attachment 70014 [details]
How about this
Comment 2 philipp.lohmann 2010-06-15 15:51:20 UTC
That makes sense to me. How does the "LVDS" name come to pass ?
Comment 3 caolanm 2010-06-15 19:42:11 UTC
I'm told that it's low voltage differential signalling
http://www.linktionary.com/l/lvds.html *shrug*
Comment 4 philipp.lohmann 2010-06-16 10:38:13 UTC
But that means that this string compare is rather arbitrary; on how many
desktops is that going to work ?

Anyway the main point of this is gdk_screen_get_primary_monitor which seems like
a good idea. Perhaps a good candidate for your gtk3 CWS ?
Comment 5 caolanm 2010-06-16 10:49:18 UTC
My understanding is that all laptop monitors get called LVDSx. But yes,
gdk_screen_get_primary_monitor is the main thrust of the affair.

Sure, I can put this in cws gtk3. That'll end up being a 3.4 thing in that case
though. gtk3 stuff seems works fine, but makefile hackery makes me want to put
it ontop of new build thingy when available.
Comment 6 caolanm 2010-06-16 12:14:18 UTC
meant to change ownership to myself
Comment 7 caolanm 2010-06-16 12:17:15 UTC
done in gtk3
Comment 8 caolanm 2010-10-07 12:49:24 UTC
reopen to move
Comment 9 caolanm 2010-10-07 13:51:35 UTC
cmc->pl: I'll have this over for you guys to consider if you want to take it.
Comment 10 philipp.lohmann 2010-10-07 15:43:48 UTC
thanks
Comment 11 philipp.lohmann 2010-10-14 15:33:22 UTC
adapted and committed in CWS vcl116.
Comment 12 philipp.lohmann 2010-10-26 17:20:22 UTC
verified in CWS vcl116
Comment 13 philipp.lohmann 2010-11-23 12:40:09 UTC
integrated in DEV300_m92, closing
Comment 14 Pedro Giffuni 2011-09-01 18:47:01 UTC
Just a note ... 

For LibreOffice 3.3 there is a note concerning this issue:

REVERT "make Presenter Screen default to the laptop, not projector"

No idea if it applies to the OO code but some review may be good.
Comment 15 Pedro Giffuni 2011-09-01 21:21:47 UTC
Actually.. the LO comment was from before Oct-11 2010 so we can assume this was fixed properly in OO.