metacity-07-xfree-xinerama.diff revision 16488
16488N/Adiff -rup metacity-2.24.0/configure.in SUNWgnome-wm-2.24.2/metacity-2.24.0/configure.in
16488N/A--- metacity-2.24.0/configure.in 2009-05-07 17:13:00.734513104 +0200
16488N/A+++ SUNWgnome-wm-2.24.2/metacity-2.24.0/configure.in 2009-05-07 17:13:42.059476076 +0200
16488N/A@@ -303,25 +303,6 @@ use_solaris_xinerama=no
16488N/A use_xfree_xinerama=no
16488N/A if test "${try_xinerama}" != no; then
16488N/A case "$host" in
16488N/A- *-*-solaris*)
16488N/A- # Check for solaris
16488N/A- use_solaris_xinerama=yes
16488N/A- AC_CHECK_LIB(Xext, XineramaGetInfo,
16488N/A- use_solaris_xinerama=yes, use_solaris_xinerama=no,
16488N/A- $ALL_X_LIBS)
16488N/A- if test "x$use_solaris_xinerama" = "xyes"; then
16488N/A- AC_CHECK_HEADER(X11/extensions/xinerama.h,
16488N/A- if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
16488N/A- X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
16488N/A- fi
16488N/A- AC_DEFINE(HAVE_SOLARIS_XINERAMA, , [Have Solaris-style Xinerama])
16488N/A- AC_DEFINE(HAVE_XINERAMA, , [Have some version of Xinerama]),
16488N/A- use_solaris_xinerama=no,
16488N/A- [#include <X11/Xlib.h>])
16488N/A- fi
16488N/A- AC_MSG_CHECKING(for Xinerama support on Solaris)
16488N/A- AC_MSG_RESULT($use_solaris_xinerama);
16488N/A- ;;
16488N/A *)
16488N/A # Check for XFree
16488N/A use_xfree_xinerama=yes
16488N/Adiff -rup metacity-2.24.0/src/core/display.c SUNWgnome-wm-2.24.2/metacity-2.24.0/src/core/display.c
16488N/A--- metacity-2.24.0/src/core/display.c 2009-05-07 17:13:00.729226554 +0200
16488N/A+++ SUNWgnome-wm-2.24.2/metacity-2.24.0/src/core/display.c 2009-05-07 17:14:44.415297795 +0200
16488N/A@@ -50,9 +50,6 @@
16488N/A #include "compositor.h"
16488N/A #include <X11/Xatom.h>
16488N/A #include <X11/cursorfont.h>
16488N/A-#ifdef HAVE_SOLARIS_XINERAMA
16488N/A-#include <X11/extensions/xinerama.h>
16488N/A-#endif
16488N/A #ifdef HAVE_XFREE_XINERAMA
16488N/A #include <X11/extensions/Xinerama.h>
16488N/A #endif
16488N/Adiff -rup metacity-2.24.0/src/core/main.c SUNWgnome-wm-2.24.2/metacity-2.24.0/src/core/main.c
16488N/A--- metacity-2.24.0/src/core/main.c 2009-05-07 17:13:00.714547047 +0200
16488N/A+++ SUNWgnome-wm-2.24.2/metacity-2.24.0/src/core/main.c 2009-05-07 17:15:16.703037248 +0200
16488N/A@@ -144,11 +144,6 @@ meta_print_compilation_info (void)
16488N/A #else
16488N/A meta_topic (META_DEBUG_XINERAMA, " (not using XFree86 Xinerama)\n");
16488N/A #endif
16488N/A-#ifdef HAVE_SOLARIS_XINERAMA
16488N/A- meta_topic (META_DEBUG_XINERAMA, " (using Solaris Xinerama)\n");
16488N/A-#else
16488N/A- meta_topic (META_DEBUG_XINERAMA, " (not using Solaris Xinerama)\n");
16488N/A-#endif
16488N/A #ifdef HAVE_XSYNC
16488N/A meta_verbose ("Compiled with sync extension\n");
16488N/A #else
16488N/Adiff -rup metacity-2.24.0/src/core/screen.c SUNWgnome-wm-2.24.2/metacity-2.24.0/src/core/screen.c
16488N/A--- metacity-2.24.0/src/core/screen.c 2009-05-07 17:13:00.723758770 +0200
16488N/A+++ SUNWgnome-wm-2.24.2/metacity-2.24.0/src/core/screen.c 2009-05-07 17:16:05.809909377 +0200
16488N/A@@ -40,9 +40,6 @@
16488N/A #include "compositor.h"
16488N/A #include <gtk/gtk.h>
16488N/A
16488N/A-#ifdef HAVE_SOLARIS_XINERAMA
16488N/A-#include <X11/extensions/xinerama.h>
16488N/A-#endif
16488N/A #ifdef HAVE_XFREE_XINERAMA
16488N/A #include <X11/extensions/Xinerama.h>
16488N/A #endif
16488N/A@@ -213,66 +210,6 @@ reload_xinerama_infos (MetaScreen *scree
16488N/A "Metacity compiled without XFree86 Xinerama support\n");
16488N/A #endif /* HAVE_XFREE_XINERAMA */
16488N/A
16488N/A-#ifdef HAVE_SOLARIS_XINERAMA
16488N/A- /* This code from GDK, Copyright (C) 2002 Sun Microsystems */
16488N/A- if (screen->n_xinerama_infos == 0 &&
16488N/A- XineramaGetState (screen->display->xdisplay,
16488N/A- screen->number))
16488N/A- {
16488N/A- XRectangle monitors[MAXFRAMEBUFFERS];
16488N/A- unsigned char hints[16];
16488N/A- int result;
16488N/A- int n_monitors;
16488N/A- int i;
16488N/A-
16488N/A- n_monitors = 0;
16488N/A- result = XineramaGetInfo (screen->display->xdisplay,
16488N/A- screen->number,
16488N/A- monitors, hints,
16488N/A- &n_monitors);
16488N/A- /* Yes I know it should be Success but the current implementation
16488N/A- * returns the num of monitor
16488N/A- */
16488N/A- if (result > 0)
16488N/A- {
16488N/A- g_assert (n_monitors > 0);
16488N/A-
16488N/A- screen->xinerama_infos = g_new (MetaXineramaScreenInfo, n_monitors);
16488N/A- screen->n_xinerama_infos = n_monitors;
16488N/A-
16488N/A- i = 0;
16488N/A- while (i < n_monitors)
16488N/A- {
16488N/A- screen->xinerama_infos[i].number = i;
16488N/A- screen->xinerama_infos[i].rect.x = monitors[i].x;
16488N/A- screen->xinerama_infos[i].rect.y = monitors[i].y;
16488N/A- screen->xinerama_infos[i].rect.width = monitors[i].width;
16488N/A- screen->xinerama_infos[i].rect.height = monitors[i].height;
16488N/A-
16488N/A- meta_topic (META_DEBUG_XINERAMA,
16488N/A- "Xinerama %d is %d,%d %d x %d\n",
16488N/A- screen->xinerama_infos[i].number,
16488N/A- screen->xinerama_infos[i].rect.x,
16488N/A- screen->xinerama_infos[i].rect.y,
16488N/A- screen->xinerama_infos[i].rect.width,
16488N/A- screen->xinerama_infos[i].rect.height);
16488N/A-
16488N/A- ++i;
16488N/A- }
16488N/A- }
16488N/A- }
16488N/A- else if (screen->n_xinerama_infos == 0)
16488N/A- {
16488N/A- meta_topic (META_DEBUG_XINERAMA,
16488N/A- "No Solaris Xinerama extension or Solaris Xinerama inactive on display %s\n",
16488N/A- display->name);
16488N/A- }
16488N/A-#else
16488N/A- meta_topic (META_DEBUG_XINERAMA,
16488N/A- "Metacity compiled without Solaris Xinerama support\n");
16488N/A-#endif /* HAVE_SOLARIS_XINERAMA */
16488N/A-
16488N/A-
16488N/A /* If no Xinerama, fill in the single screen info so
16488N/A * we can use the field unconditionally
16488N/A */