summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-14 00:28:16 +0000
committerDana Jansens <danakj@orodu.net>2007-05-14 00:28:16 +0000
commit5a3154df0878e37d0af8fdd9077133283879b38f (patch)
tree32e115d535b8ee538e62255d242faa03c568d10b /openbox
parent1eff22b1ef7a3fb81e2c8dc6c48b1ef3dd8bdaab (diff)
add --debug-xinerama
Diffstat (limited to 'openbox')
-rw-r--r--openbox/extensions.c10
-rw-r--r--openbox/openbox.c5
-rw-r--r--openbox/openbox.h1
3 files changed, 15 insertions, 1 deletions
diff --git a/openbox/extensions.c b/openbox/extensions.c
index d57b8357..b7d8e73a 100644
--- a/openbox/extensions.c
+++ b/openbox/extensions.c
@@ -99,7 +99,15 @@ void extensions_xinerama_screens(Rect **xin_areas, guint *nxin)
XFree(info);
} else
#endif
- {
+ if (ob_debug_xinerama) {
+ gint w = WidthOfScreen(ScreenOfDisplay(ob_display, ob_screen));
+ gint h = HeightOfScreen(ScreenOfDisplay(ob_display, ob_screen));
+ *nxin = 2;
+ *xin_areas = g_new(Rect, *nxin + 1);
+ RECT_SET((*xin_areas)[0], 0, 0, w/2, h);
+ RECT_SET((*xin_areas)[1], w/2, 0, w-(w/2), h);
+ }
+ else {
*nxin = 1;
*xin_areas = g_new(Rect, *nxin + 1);
RECT_SET((*xin_areas)[0], 0, 0,
diff --git a/openbox/openbox.c b/openbox/openbox.c
index 0f2ba923..1b8aef43 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -90,6 +90,7 @@ gboolean ob_sm_use = TRUE;
gchar *ob_sm_id = NULL;
gchar *ob_sm_save_file = NULL;
gchar *ob_config_type = NULL;
+gboolean ob_debug_xinerama = FALSE;
static ObState state;
static gboolean xsync = FALSE;
@@ -474,6 +475,7 @@ static void print_help()
g_print(_(" --sync Run in synchronous mode\n"));
g_print(_(" --debug Display debugging output\n"));
g_print(_(" --debug-focus Display debugging output for focus handling\n"));
+ g_print(_(" --debug-xinerama Split the display into fake xinerama screens\n"));
g_print(_("\nPlease report bugs at %s\n"), PACKAGE_BUGREPORT);
}
@@ -532,6 +534,9 @@ static void parse_args(gint *argc, gchar **argv)
ob_debug_enable(OB_DEBUG_APP_BUGS, TRUE);
ob_debug_enable(OB_DEBUG_FOCUS, TRUE);
}
+ else if (!strcmp(argv[i], "--debug-xinerama")) {
+ ob_debug_xinerama = TRUE;
+ }
else if (!strcmp(argv[i], "--reconfigure")) {
remote_control = 1;
/* don't make this do anything if it's not in --help ..
diff --git a/openbox/openbox.h b/openbox/openbox.h
index b5d722e9..673826a4 100644
--- a/openbox/openbox.h
+++ b/openbox/openbox.h
@@ -47,6 +47,7 @@ extern gchar *ob_sm_id;
extern gchar *ob_sm_save_file;
extern gboolean ob_replace_wm;
extern gchar *ob_config_type;
+extern gboolean ob_debug_xinerama;
/* The state of execution of the window manager */
ObState ob_state();