Add basic Xinerama support via new lib/DtXinerama

This adds a basic library and support to dtsession and dtlogin to
support Xinerama/Twinview, where multimple monitors are used to make
up an X11 screen.

The main goal here is to draw dialogs and such centered on a monitor,
rather than spread out over multiple monitors.

Might need to add sorting - as on my test system, what I would
consider monitor 0, appears to actually be monitor 1.  So a sort might
need to be added to sort the screens according to increasing x and y
offsets so it make sense to a user.

Also, this library is built statically and not documented.  Maybe it
could be 'filled' out and refactored/redesigned in the futre if need
be and suppoerted.

It is enabled via a define, CDE_USEXINERAMA in site.def.  It's a very
simple lib, so I do not expect any issues with the BSD's - it should
build and work fine, assuming your X server has the XINERAMA
extension, which I think pretty much all of them do at this point.
This commit is contained in:
Jon Trulson
2013-03-26 19:49:50 -06:00
parent 208c1e4999
commit af7ba55f78
19 changed files with 477 additions and 36 deletions

View File

@@ -66,6 +66,9 @@ extern int errno;
# include <sys/security.h>
#endif
#ifdef USE_XINERAMA
# include <DtXinerama.h>
#endif
#ifdef SIGNALRETURNSINT
#define SIGVAL int
@@ -264,6 +267,9 @@ typedef struct {
char *languageList; /* list of languages to display in menu */
int unitType; /* widgets' unit type */
char *languageListCmd; /* command to produce language list */
#if defined(USE_XINERAMA)
int xineramaPreferredScreen; /* preferred screen for xinerama */
#endif
} AppInfo, *AppInfoPtr;
@@ -278,6 +284,10 @@ typedef struct displayInfo {
int height; /* initialized with DisplayHeight() */
Pixel black_pixel; /* initialized with BlackPixel() */
Visual *visual; /* initialized with DefaultVisual() */
#ifdef USE_XINERAMA /* initialized with _DtXineramaInit() */
DtXineramaInfoPtr_t DtXineramaInfo;
#endif
} DisplayInfo;