manager with extensive standards support.
.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] [\fB\-\-debug-xinerama\fP]
+\fBopenbox\fR [\fB\-\-help\fP] [\fB\-\-version\fP] [\fB\-\-replace\fP] [\fB\-\-reconfigure\fP] [\fB\-\-restart\fP] [\fB\-\-sm-disable\fP] [\fB\-\-sync\fP] [\fB\-\-debug\fP] [\fB\-\-debug-focus\fP] [\fB\-\-debug-xinerama\fP]
.SH "DESCRIPTION"
.PP
Openbox is minimalistic, highly configurable, next generation window
.IP "\fB\-\-reconfigure\fP" 10
If Openbox is already running on the display, tell it to
reload its configuration.
+.IP "\fB\-\-restart\fP" 10
+If Openbox is already running on the display, tell it to
+restart. This is useful if you have upgraded Openbox and don't
+want to restart X.
.IP "\fB\-\-sm-disable\fP" 10
Do not connect to the session manager.
.IP "\fB\-\-sync\fP" 10
.PP
Please report bugs to: \fBhttp://bugzilla.icculus.org/
\fP
-.\" created by instant / docbook-to-man, Sat 19 May 2007, 16:56
+.\" created by instant / docbook-to-man, Sun 20 May 2007, 11:29
<arg><option>--version</option></arg>
<arg><option>--replace</option></arg>
<arg><option>--reconfigure</option></arg>
+ <arg><option>--restart</option></arg>
<arg><option>--sm-disable</option></arg>
<arg><option>--sync</option></arg>
<arg><option>--debug</option></arg>
</listitem>
</varlistentry>
<varlistentry>
+ <term><option>--restart</option></term>
+ <listitem>
+ <para>If Openbox is already running on the display, tell it to
+ restart. This is useful if you have upgraded Openbox and don't
+ want to restart X.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><option>--sm-disable</option></term>
<listitem>
<para>Do not connect to the session manager.</para>
gint ox = *x, oy = *y;
gboolean rudel = rude, ruder = rude, rudet = rude, rudeb = rude;
gint fw, fh;
+ Rect desired;
+ RECT_SET(desired, *x, *y, w, h);
all_a = screen_area(self->desktop);
- mon_a = screen_area_monitor(self->desktop, client_monitor(self));
+ mon_a = screen_area_monitor(self->desktop, screen_find_monitor(&desired));
/* get where the frame would be */
frame_client_gravity(self->frame, x, y, w, h);
gint config_mouse_threshold;
gint config_mouse_dclicktime;
-gboolean config_menu_warppointer;
guint config_menu_hide_delay;
gboolean config_menu_middle;
guint config_submenu_show_delay;
parse_register(i, "resistance", parse_resistance, NULL);
- config_menu_warppointer = TRUE;
config_menu_hide_delay = 250;
config_menu_middle = FALSE;
config_submenu_show_delay = 0;
/*! Number of pixels to resist while crossing a screen's edge */
extern gint config_resist_edge;
-/*! Warp near edge on menu? */
-extern gboolean config_menu_warppointer;
/*! delay for hiding menu when opening */
extern guint config_menu_hide_delay;
/*! Center menus vertically about the parent entry */
num = 0;
if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
- xrect[0].x = -ob_rr_theme->fbwidth;
- xrect[0].y = -ob_rr_theme->fbwidth;
- xrect[0].width = self->width + self->bwidth * 2;
+ xrect[0].x = 0;
+ xrect[0].y = 0;
+ xrect[0].width = self->area.width;
xrect[0].height = ob_rr_theme->title_height +
- self->bwidth * 2;
+ self->bwidth + self->rbwidth;
++num;
}
- if (self->decorations & OB_FRAME_DECOR_HANDLE) {
- xrect[1].x = -ob_rr_theme->fbwidth;
+ if (self->decorations & OB_FRAME_DECOR_HANDLE &&
+ ob_rr_theme->handle_height > 0)
+ {
+ xrect[1].x = 0;
xrect[1].y = FRAME_HANDLE_Y(self);
- xrect[1].width = self->width + self->bwidth * 2;
+ xrect[1].width = self->area.width;
xrect[1].height = ob_rr_theme->handle_height +
self->bwidth * 2;
++num;
} else
XUnmapWindow(ob_display, self->titlebottom);
} else {
+ XUnmapWindow(ob_display, self->titlebottom);
+
XUnmapWindow(ob_display, self->titletop);
XUnmapWindow(ob_display, self->titletopleft);
XUnmapWindow(ob_display, self->titletopright);
} else
XUnmapWindow(ob_display, self->handletop);
} else {
+ XUnmapWindow(ob_display, self->handletop);
+
XUnmapWindow(ob_display, self->handlebottom);
XUnmapWindow(ob_display, self->lgripleft);
XUnmapWindow(ob_display, self->rgripright);
g_print(_(" --sm-disable Disable connection to the session manager\n"));
g_print(_("\nPassing messages to a running Openbox instance:\n"));
g_print(_(" --reconfigure Reload Openbox's configuration\n"));
+ g_print(_(" --restart Restart Openbox\n"));
g_print(_("\nDebugging options:\n"));
g_print(_(" --sync Run in synchronous mode\n"));
g_print(_(" --debug Display debugging output\n"));
}
else if (!strcmp(argv[i], "--reconfigure")) {
remote_control = 1;
-/* don't make this do anything if it's not in --help ..
} else if (!strcmp(argv[i], "--restart")) {
remote_control = 2;
-*/
}
else if (!strcmp(argv[i], "--sm-save-file")) {
if (i == *argc - 1) /* no args left */
#include "frame.h"
#include "focus.h"
#include "config.h"
+#include "debug.h"
static void add_choice(guint *choice, guint mychoice)
{
/* try direct parent first */
if (c->transient_for && c->transient_for != OB_TRAN_GROUP) {
add_choice(choice, client_monitor(c->transient_for));
+ ob_debug("placement adding choice %d for parent\n",
+ client_monitor(c->transient_for));
}
/* more than one window in its group (more than just this window) */
if (itc != c &&
(itc->desktop == c->desktop ||
itc->desktop == DESKTOP_ALL || c->desktop == DESKTOP_ALL))
+ {
add_choice(choice, client_monitor(it->data));
+ ob_debug("placement adding choice %d for group sibling\n",
+ client_monitor(it->data));
+ }
}
/* try on all desktops */
for (it = c->group->members; it; it = g_slist_next(it)) {
ObClient *itc = it->data;
- if (itc != c)
+ if (itc != c) {
add_choice(choice, client_monitor(it->data));
+ ob_debug("placement adding choice %d for group sibling on "
+ "another desktop\n", client_monitor(it->data));
+ }
}
}
- if (focus_client)
+ if (focus_client) {
add_choice(choice, client_monitor(focus_client));
+ ob_debug("placement adding choice %d for focused window\n",
+ client_monitor(focus_client));
+ }
screen_pointer_pos(&px, &py);
for (i = 0; i < screen_num_monitors; i++)
if (RECT_CONTAINS(*screen_physical_area_monitor(i), px, py)) {
add_choice(choice, i);
+ ob_debug("placement adding choice %d for mouse pointer\n", i);
break;
}
areas = pick_head(client);
- for (i = 0; i < screen_num_monitors; ++i) {
+ for (i = 0; i < screen_num_monitors && !ret; ++i) {
spaces = area_add(spaces, areas[i]);
/* stay out from under windows in higher layers */
gchar *str;
RrTheme *theme;
gchar *path;
+ gboolean userdef;
theme = g_new0(RrTheme, 1);
/* load the image masks */
/* maximize button masks */
+ userdef = TRUE;
if (!read_mask(inst, path, theme, "max.xbm", &theme->max_mask)) {
guchar data[] = { 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f };
theme->max_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
- }
+ userdef = FALSE;
+ }
if (!read_mask(inst, path, theme, "max_toggled.xbm",
&theme->max_toggled_mask))
{
- guchar data[] = { 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f };
- theme->max_toggled_mask = RrPixmapMaskNew(inst, 6, 6,(gchar*)data);
+ if (userdef)
+ theme->max_toggled_mask = RrPixmapMaskCopy(theme->max_mask);
+ else {
+ guchar data[] = { 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f };
+ theme->max_toggled_mask = RrPixmapMaskNew(inst, 6, 6,(gchar*)data);
+ }
}
if (!read_mask(inst, path, theme, "max_pressed.xbm",
&theme->max_pressed_mask))
theme->iconify_hover_mask = RrPixmapMaskCopy(theme->iconify_mask);
/* all desktops button masks */
+ userdef = TRUE;
if (!read_mask(inst, path, theme, "desk.xbm", &theme->desk_mask)) {
guchar data[] = { 0x33, 0x33, 0x00, 0x00, 0x33, 0x33 };
theme->desk_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
+ userdef = FALSE;
}
if (!read_mask(inst, path, theme, "desk_toggled.xbm",
&theme->desk_toggled_mask)) {
- guchar data[] = { 0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 };
- theme->desk_toggled_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
+ if (userdef)
+ theme->desk_toggled_mask = RrPixmapMaskCopy(theme->desk_mask);
+ else {
+ guchar data[] = { 0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 };
+ theme->desk_toggled_mask =
+ RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
+ }
}
if (!read_mask(inst, path, theme, "desk_pressed.xbm",
&theme->desk_pressed_mask))