.SH "SYNOPSIS"
.PP
-\fBopenbox\fR [\fB\-\-help\fP] [\fB\-\-version\fP] [\fB\-\-replace\fP] [\fB\-\-reconfigure\fP] [\fB\-\-sm-disable\fP] [\fB\-\-sync\fP] [\fB\-\-debug\fP] [\fB\-\-debug-focus\fP]
+\fBopenbox\fR [\fB\-\-help\fP] [\fB\-\-version\fP] [\fB\-\-replace\fP] [\fB\-\-reconfigure\fP] [\fB\-\-sm-disable\fP] [\fB\-\-sync\fP] [\fB\-\-debug\fP] [\fB\-\-debug-focus\fP] [\fB\-\-debug-xinerama\fP]
.SH "DESCRIPTION"
.PP
Openbox is a next generation, highly
Display debugging output.
.IP "\fB\-\-debug-focus\fP" 10
Display debugging output for focus handling.
+.IP "\fB\-\-debug-xinerama\fP" 10
+Split the display into two fake xinerama regions, if
+xinerama is not already enabled. This is for debugging
+xinerama support.
.SH "SEE ALSO"
.PP
obconf (1), openbox-gnome-session (1), openbox-kde-session (1).
\fP
<<<<<<< .working
<<<<<<< .working
+<<<<<<< .working
.\" created by instant / docbook-to-man, Sun 13 May 2007, 17:59
=======
.\" created by instant / docbook-to-man, Sun 13 May 2007, 19:06
=======
.\" created by instant / docbook-to-man, Sun 13 May 2007, 19:06
>>>>>>> .merge-right.r6502
+=======
+.\" created by instant / docbook-to-man, Sun 13 May 2007, 20:29
+>>>>>>> .merge-right.r6510
<arg><option>--sync</option></arg>
<arg><option>--debug</option></arg>
<arg><option>--debug-focus</option></arg>
+ <arg><option>--debug-xinerama</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<para>Display debugging output for focus handling.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--debug-xinerama</option></term>
+ <listitem>
+ <para>Split the display into two fake xinerama regions, if
+ xinerama is not already enabled. This is for debugging
+ xinerama support.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsect1>
{
GSList *it;
ObAction *a;
- gboolean inter = FALSE;
if (!acts)
return;
if (x < 0 && y < 0)
screen_pointer_pos(&x, &y);
- if (grab_on_keyboard())
- inter = TRUE;
- else
- for (it = acts; it; it = g_slist_next(it)) {
- a = it->data;
- if (a->data.any.interactive) {
- inter = TRUE;
- break;
- }
- }
-
- if (!inter && button == 0) {
- /* Ungrab the keyboard before running the action, if it was
- not from a mouse event.
-
- We have to do this because a key press causes a passive
- grab on the keyboard, and so if the action we are running
- wants to grab the keyboard, it will fail if the button is still
- held down (which is likely).
-
- Use the X function not out own, because we're not considering
- a grab to be in place at all so our function won't try ungrab
- anything.
- */
- XUngrabKeyboard(ob_display, time);
- }
-
for (it = acts; it; it = g_slist_next(it)) {
a = it->data;
GError *e = NULL;
gchar *cmd, **argv = 0;
if (data->execute.path) {
+ /* Ungrab the keyboard before running the action.
+
+ If there is an interactive action going on, then cancel it to
+ release the keyboard. If not, then call XUngrabKeyboard().
+
+ We call XUngrabKeyboard because a key press causes a passive
+ grab on the keyboard, and so if program we are executing wants to
+ grab the keyboard, it will fail if the button is still held down
+ (which is likely).
+
+ Use the X function not out own, because we're not considering
+ a grab to be in place at all so our function won't try ungrab
+ anything.
+ */
+ if (keyboard_interactively_grabbed())
+ keyboard_interactive_cancel();
+ else
+ XUngrabKeyboard(ob_display, data->any.time);
+
cmd = g_filename_from_utf8(data->execute.path, -1, NULL, NULL, NULL);
if (cmd) {
if (!g_shell_parse_argv (cmd, NULL, &argv, &e)) {
self->pre_fullscreen_area.height = self->pre_max_area.height;
}
- /* these are not actually used cuz client_configure will set them
- as appropriate when the window is fullscreened */
- x = y = w = h = 0;
+ /* these will help configure_full figure out where to fullscreen
+ the window */
+ x = self->area.x;
+ y = self->area.y;
+ w = self->area.width;
+ h = self->area.height;
} else {
- Rect *a;
+ g_assert(self->pre_fullscreen_area.width > 0 &&
+ self->pre_fullscreen_area.height > 0);
- if (self->pre_fullscreen_area.width > 0 &&
- self->pre_fullscreen_area.height > 0)
- {
- x = self->pre_fullscreen_area.x;
- y = self->pre_fullscreen_area.y;
- w = self->pre_fullscreen_area.width;
- h = self->pre_fullscreen_area.height;
- RECT_SET(self->pre_fullscreen_area, 0, 0, 0, 0);
- } else {
- /* pick some fallbacks... */
- a = screen_area_monitor(self->desktop, 0);
- x = a->x + a->width / 4;
- y = a->y + a->height / 4;
- w = a->width / 2;
- h = a->height / 2;
- }
+ x = self->pre_fullscreen_area.x;
+ y = self->pre_fullscreen_area.y;
+ w = self->pre_fullscreen_area.width;
+ h = self->pre_fullscreen_area.height;
+ RECT_SET(self->pre_fullscreen_area, 0, 0, 0, 0);
}
client_setup_decor_and_functions(self);
if (dir == 2 && !self->max_vert) return;
}
- /* we just tell it to configure in the same place and client_configure
- worries about filling the screen with the window */
+ /* these will help configure_full figure out which screen to fill with
+ the window */
x = self->area.x;
y = self->area.y;
w = self->area.width;
self->pre_max_area.width, self->area.height);
}
} else {
- Rect *a;
-
- a = screen_area_monitor(self->desktop, 0);
if ((dir == 0 || dir == 1) && self->max_horz) { /* horz */
- if (self->pre_max_area.width > 0) {
- x = self->pre_max_area.x;
- w = self->pre_max_area.width;
+ g_assert(self->pre_max_area.width > 0);
- RECT_SET(self->pre_max_area, 0, self->pre_max_area.y,
- 0, self->pre_max_area.height);
- } else {
- /* pick some fallbacks... */
- x = a->x + a->width / 4;
- w = a->width / 2;
- }
+ x = self->pre_max_area.x;
+ w = self->pre_max_area.width;
+
+ RECT_SET(self->pre_max_area, 0, self->pre_max_area.y,
+ 0, self->pre_max_area.height);
}
if ((dir == 0 || dir == 2) && self->max_vert) { /* vert */
- if (self->pre_max_area.height > 0) {
- y = self->pre_max_area.y;
- h = self->pre_max_area.height;
+ g_assert(self->pre_max_area.height > 0);
- RECT_SET(self->pre_max_area, self->pre_max_area.x, 0,
- self->pre_max_area.width, 0);
- } else {
- /* pick some fallbacks... */
- y = a->y + a->height / 4;
- h = a->height / 2;
- }
+ y = self->pre_max_area.y;
+ h = self->pre_max_area.height;
+
+ RECT_SET(self->pre_max_area, self->pre_max_area.x, 0,
+ self->pre_max_area.width, 0);
}
}
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,
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;
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);
}
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 ..
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();