diff options
author | Will Andrews <will@FreeBSD.org> | 2002-04-04 14:02:12 +0000 |
---|---|---|
committer | Will Andrews <will@FreeBSD.org> | 2002-04-04 14:02:12 +0000 |
commit | 267499ca8a2474cd051e913c7e26ebf1e3b9dd9e (patch) | |
tree | 03c4153c1b6f6d344e03130ad9bafa025ab1a792 /x11/wdm/files/patch-Login.c | |
parent | Make the perl regex to get rid of malloc.h much much more broad. Should (diff) |
Add Xinerama support for WDM (yay!!). Bump PORTREVISION.
George helped me better understand the Xinerama API. Please note that
there is no support for specifying a particular physical display for
which the login frame should appear -- it will always choose physical
screen number zero.
Helped with this patch: George Staikos <staikos@kde.org>
Notes
Notes:
svn path=/head/; revision=57312
Diffstat (limited to '')
-rw-r--r-- | x11/wdm/files/patch-Login.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/x11/wdm/files/patch-Login.c b/x11/wdm/files/patch-Login.c new file mode 100644 index 000000000000..c4b13687859e --- /dev/null +++ b/x11/wdm/files/patch-Login.c @@ -0,0 +1,54 @@ +--- src/Login.c Tue Feb 29 06:17:01 2000 ++++ src/Login.c.new Wed Apr 3 22:36:34 2002 +@@ -24,6 +24,9 @@ + #include <X11/xpm.h> + #include <X11/keysym.h> + #include <X11/cursorfont.h> ++#ifdef HAVE_XINERAMA ++#include <X11/extensions/Xinerama.h> ++#endif + #ifdef HAVE_X11_WINGS_H + #include <X11/WINGs.h> + #else +@@ -1195,6 +1198,10 @@ + int main(int argc, char **argv) + { + WMScreen *scr; ++ int xine_count; int c; ++#ifdef HAVE_XINERAMA ++ XineramaScreenInfo *xine; ++#endif + + ProgName = argv[0]; + +@@ -1210,8 +1217,28 @@ + } + + screen_number = DefaultScreen(dpy); +- screen_width = DisplayWidth(dpy,screen_number); +- screen_heigth = DisplayHeight(dpy,screen_number); ++#ifdef HAVE_XINERAMA ++ if (XineramaIsActive(dpy)) { ++ xine = XineramaQueryScreens(dpy, &xine_count); ++ ++ if (xine != NULL) { ++ for (c = 0;c < xine_count;c++) { ++ if (xine[c].screen_number == 0) { ++ screen_width = xine[c].width; ++ screen_heigth = xine[c].height; ++ } ++ } ++ } else { ++ screen_width = DisplayWidth(dpy, screen_number); ++ screen_heigth = DisplayHeight(dpy, screen_number); ++ } ++ } else { ++#endif ++ screen_width = DisplayWidth(dpy,screen_number); ++ screen_heigth = DisplayHeight(dpy,screen_number); ++#ifdef HAVE_XINERAMA ++ } ++#endif + panel_X = (screen_width - panel_width)/2; + panel_Y = (screen_heigth - panel_heigth)/2; + |