Introduce a GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2

Mon Nov  3 20:56:28 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdk.c:
	* gdk/gdkinternals.h:
	* gdk/x11/gdkscreen-x11.c (init_xinerama_support): Introduce a
	GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
	Xinerama mode when no actual Xinerama setup is found.
This commit is contained in:
Matthias Clasen 2003-11-03 20:10:34 +00:00 committed by Matthias Clasen
parent 9af0e7b6b6
commit b31a2ece5c
8 changed files with 76 additions and 7 deletions

View File

@ -1,3 +1,11 @@
Mon Nov 3 20:56:28 2003 Matthias Clasen <maclas@gmx.de>
* gdk/gdk.c:
* gdk/gdkinternals.h:
* gdk/x11/gdkscreen-x11.c (init_xinerama_support): Introduce a
GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
Xinerama mode when no actual Xinerama setup is found.
2003-11-03 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_select_folder): Removed.

View File

@ -1,3 +1,11 @@
Mon Nov 3 20:56:28 2003 Matthias Clasen <maclas@gmx.de>
* gdk/gdk.c:
* gdk/gdkinternals.h:
* gdk/x11/gdkscreen-x11.c (init_xinerama_support): Introduce a
GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
Xinerama mode when no actual Xinerama setup is found.
2003-11-03 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_select_folder): Removed.

View File

@ -1,3 +1,11 @@
Mon Nov 3 20:56:28 2003 Matthias Clasen <maclas@gmx.de>
* gdk/gdk.c:
* gdk/gdkinternals.h:
* gdk/x11/gdkscreen-x11.c (init_xinerama_support): Introduce a
GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
Xinerama mode when no actual Xinerama setup is found.
2003-11-03 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_select_folder): Removed.

View File

@ -1,3 +1,11 @@
Mon Nov 3 20:56:28 2003 Matthias Clasen <maclas@gmx.de>
* gdk/gdk.c:
* gdk/gdkinternals.h:
* gdk/x11/gdkscreen-x11.c (init_xinerama_support): Introduce a
GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
Xinerama mode when no actual Xinerama setup is found.
2003-11-03 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_select_folder): Removed.

View File

@ -1,3 +1,11 @@
Mon Nov 3 20:56:28 2003 Matthias Clasen <maclas@gmx.de>
* gdk/gdk.c:
* gdk/gdkinternals.h:
* gdk/x11/gdkscreen-x11.c (init_xinerama_support): Introduce a
GDK_DEBUG_XINERAMA debug flag, and make it trigger a fake 2x2
Xinerama mode when no actual Xinerama setup is found.
2003-11-03 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_select_folder): Removed.

View File

@ -69,6 +69,7 @@ static const GDebugKey gdk_debug_keys[] = {
{"input", GDK_DEBUG_INPUT},
{"cursor", GDK_DEBUG_CURSOR},
{"multihead", GDK_DEBUG_MULTIHEAD},
{"xinerama", GDK_DEBUG_XINERAMA}
};
static const int gdk_ndebug_keys = G_N_ELEMENTS (gdk_debug_keys);

View File

@ -77,7 +77,8 @@ typedef enum {
GDK_DEBUG_IMAGE = 1 << 9,
GDK_DEBUG_INPUT = 1 <<10,
GDK_DEBUG_CURSOR = 1 <<11,
GDK_DEBUG_MULTIHEAD = 1 <<12
GDK_DEBUG_MULTIHEAD = 1 <<12,
GDK_DEBUG_XINERAMA = 1 <<13
} GdkDebugFlag;
#ifndef GDK_DISABLE_DEPRECATED

View File

@ -537,6 +537,32 @@ init_xinerama_support (GdkScreen * screen)
/* No Xinerama
*/
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_XINERAMA)
{
/* Fake Xinerama mode by splitting the screen into 4 monitors */
screen_x11->num_monitors = 4;
screen_x11->monitors = g_new0 (GdkRectangle, 4);
screen_x11->monitors[0].x = 0;
screen_x11->monitors[0].y = 0;
screen_x11->monitors[0].width = WidthOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[0].height = HeightOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[1].x = WidthOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[1].y = 0;
screen_x11->monitors[1].width = WidthOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[1].height = HeightOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[2].x = 0;
screen_x11->monitors[2].y = HeightOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[2].width = WidthOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[2].height = HeightOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[3].x = WidthOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[3].y = HeightOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[3].width = WidthOfScreen (screen_x11->xscreen) / 2;
screen_x11->monitors[3].height = HeightOfScreen (screen_x11->xscreen) / 2;
}
else
#endif
{
screen_x11->num_monitors = 1;
screen_x11->monitors = g_new0 (GdkRectangle, 1);
screen_x11->monitors[0].x = 0;
@ -544,6 +570,7 @@ init_xinerama_support (GdkScreen * screen)
screen_x11->monitors[0].width = WidthOfScreen (screen_x11->xscreen);
screen_x11->monitors[0].height = HeightOfScreen (screen_x11->xscreen);
}
}
static void
init_randr_support (GdkScreen * screen)