use XineramaIsActive() not XineramaQueryExtension()

2002-06-07  Havoc Pennington  <hp@redhat.com>

	* src/screen.c (meta_screen_new): use XineramaIsActive() not
	XineramaQueryExtension()
This commit is contained in:
Havoc Pennington 2002-06-07 16:18:51 +00:00 committed by Havoc Pennington
parent 81e52735a2
commit 019b5cacc3
3 changed files with 22 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2002-06-07 Havoc Pennington <hp@redhat.com>
* src/screen.c (meta_screen_new): use XineramaIsActive() not
XineramaQueryExtension()
2002-06-07 Havoc Pennington <hp@redhat.com>
* src/screen.c (meta_screen_get_current_xinerama): don't return

View File

@ -33,6 +33,9 @@
#include "workspace.h"
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
#ifdef HAVE_XINERAMA
#include <X11/extensions/Xinerama.h>
#endif
#include <string.h>
#define USE_GDK_DISPLAY
@ -235,6 +238,18 @@ meta_display_open (const char *name)
if (meta_is_syncing ())
XSynchronize (xdisplay, True);
#if 0
/* this was debug cruft */
#ifdef HAVE_XINERAMA
if (XineramaIsActive (xdisplay))
meta_topic (META_DEBUG_XINERAMA, "Xinerama active on display\n");
else
meta_topic (META_DEBUG_XINERAMA, "Xinerama not active on display\n");
#else
meta_topic (META_DEBUG_XINERAMA, "No Xinerama support compiled in\n");
#endif
#endif
display = g_new (MetaDisplay, 1);

View File

@ -168,8 +168,6 @@ meta_screen_new (MetaDisplay *display,
Window xroot;
Display *xdisplay;
XWindowAttributes attr;
int xinerama_event_base, xinerama_error_base;
/* Only display->name, display->xdisplay, and display->error_traps
* can really be used in this function, since normally screens are
@ -239,9 +237,7 @@ meta_screen_new (MetaDisplay *display,
screen->last_xinerama_index = 0;
#ifdef HAVE_XINERAMA
if (XineramaQueryExtension (display->xdisplay,
&xinerama_event_base,
&xinerama_error_base))
if (XineramaIsActive (display->xdisplay))
{
XineramaScreenInfo *infos;
int n_infos;
@ -285,7 +281,7 @@ meta_screen_new (MetaDisplay *display,
else
{
meta_topic (META_DEBUG_XINERAMA,
"No Xinerama extension on display %s\n",
"No Xinerama extension or Xinerama inactive on display %s\n",
display->name);
}
#else