Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Is xinerama use-flag needed for xrandr mode?
Date: Tue, 20 Oct 2009 21:11:25
Message-Id: pan.2009.10.20.21.10.56@cox.net
In Reply to: [gentoo-amd64] Is xinerama use-flag needed for xrandr mode? by "Sebastian Beßler"
1 Sebastian Beßler posted on Tue, 20 Oct 2009 20:31:57 +0200 as excerpted:
2
3 > today I migrated successfull to kde 4.3.2 an now I feel adventurous to
4 > give xrandr powered dualscreen-mode a new try.
5 >
6 > The last time I tried it with xinerama-flag and without and the effect
7 > was the same all the time, windows and panels stretched over both
8 > screens.
9 >
10 > So as xinerama didn't made any difference for me I want to know if
11 > xinerama is needed for xrandr or not.
12
13
14 As Dmitri says, they're different technologies.
15
16 Xinerama itself isn't used that much any more, with xrandr taking its
17 place to some degree. What it's still used for is if you have separate
18 video cards (as opposed to a single card with two or more outputs).
19
20 In that case, without xinerama, the additional cards will normally come
21 up as separate X desktops, each doing its own thing. You can move the
22 mouse and keyboard focus between them, but windows cannot be moved
23 between them or cover the combined area. I think I've seen it referred
24 to as zaphod mode. With kde3, each one would have its own separate kde
25 session running. kde4 doesn't have that feature. (From the remarks of
26 kde folks, it seems that it was originally an accident that kde3 could do
27 it too, but once it was found to work, they kept it for the duration of
28 kde3. But kde4 works differently and that feature is no longer
29 available.)
30
31 With xinerama running, it would combine all desktops into one.
32
33 However, xinerama had another element to it as well, now incorporated
34 into X in general, and the xinerama USE flag often controls how apps
35 interact with this element. This element is often called "pseudo-
36 xinerama", and first appeared with the merged framebuffers, which are now
37 superseded with xrandr, but it continues to use what was formerly called
38 "pseudo-xinerama" only it's now just the way X normally works.
39
40 Let's go back to the era of separate cards to see how this works. Back
41 then, when two cards each controlling a separate monitor were used with
42 xinerama to create a larger combined desktop, xinerama exposed what was
43 then a new API, allowing window-managers and other apps that cared, to
44 see not only the size of the "big rectangle" that was the entire desktop,
45 but the size and shape of each individual monitor's portion thereof.
46 Without this info, the window manager didn't know about internal monitor
47 edges or "dead" areas not covered by any display but still enclosed in
48 the "big rectangle" of the overall desktop. Maximizing a window would
49 therefore maximize it to the entire desktop, covering both/all displays.
50
51 But a window manager that was "xinerama aware", that is, that was written
52 to the xinerama API, could see these internal edges, and could choose to
53 maximize windows to only a single monitor, and if it was /really/
54 advanced, it could figure out where the dead areas were, and wouldn't let
55 new windows get "lost" in the area where there was actually no display.
56
57 It's this API that has now become basically a part of X itself (note that
58 I'm talking from a user perspective, I have no idea what component or
59 extension actually exposes it, hopefully it's not everything implementing
60 it on its own), as so much more than xinerama actually uses it. But many
61 apps still have optional support for that API -- only that has changed
62 some as well. Since it's basically a part of X now, most window managers
63 (and other apps that would need to know) do support it to some degree
64 regardless. But the degree to which they support it and/or the
65 configuration options for it that they expose are what this USE flag ends
66 up actually controlling.
67
68 So it is with KDE (I think). If I'm not mistaken, what the xinerama USE
69 flag controls for KDE4 (and for kde3 before it), mainly, is whether the
70 "Multiple Monitors" kcontrol aka system settings applet is built and
71 installed. With the USE flag on, you should get this applet, and/or it
72 should have more options, than if the USE flag is off. Note that I've
73 always just had it on so I don't actually know for sure what's missing
74 with the flag off, but that's what I THINK it does. Basically, it gives
75 you the OPTION to have kwin consider the monitor edges when it places
76 windows, when you're moving windows, when you maximize windows, for
77 fullscreen, etc. You can still have it treat the entire desktop as a
78 single unit if you want, or you can have it consider the monitor you're
79 on (well, that the mouse is on, normally) at the time. The great thing
80 is that it's not all or nothing. You can have it behave as a single unit
81 for maximizing but only fullscreen to a single monitor, if you like. Or
82 the reverse, or have it treat both the same one way or the other.
83
84 Note that regardless of what you set here for the general behavior, for
85 window maximize at least, it's possible to set individual windows or
86 applications to a different behavior. For instance, I have the multi-
87 monitor options all enabled, so it treats my two monitors separately in
88 general. However, I use the specific window settings to have some
89 windows either start at or forced to the full desktop size, or more
90 often, to just more than or just less than a full monitor size, so I can
91 expose another window if it's just less than, or so the titlebar,
92 toolbars, etc, get put on the top monitor leaving more room for actual
93 window content on the bottom monitor, if it's just more than a single
94 monitor's size.
95
96 If you run an equery hasuse xinerama, you'll get a list of all the
97 packages you have installed that have that USE flag (activated or not).
98 Note that for kde, it's not just kwin and systemsettings. There's a
99 couple other kde apps that use it as well. But it's reasonably easy to
100 guess what they use it for, and see that it's not as major as the kwin
101 and systemsettings support.
102
103 mplayer, xinelib, and libsdl (among the non-kde apps I have installed
104 that have that flag) are also reasonably easy to guess what they use it
105 for. In particular, video overlay normally works on only one output at
106 once, so anything that uses that (including these apps) is likely to find
107 knowing where one monitor ends and the next begins rather useful
108 information for full-screening.
109
110 --
111 Duncan - List replies preferred. No HTML msgs.
112 "Every nonfree program has a lord, a master --
113 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: Is xinerama use-flag needed for xrandr mode? "Sebastian Beßler" <sebastian@××××××××××××.de>