Merge branch 'backport' into work Conflicts: Makefile.am openbox/actions/focus.c openbox/config.c openbox/event.c openbox/menuframe.c
jump to
@@ -501,6 +501,8 @@ doc/openbox-gnome-session.1.sgml \
doc/openbox-gnome-session.1.in \ doc/openbox-kde-session.1.sgml \ doc/openbox-kde-session.1.in \ + doc/obxprop.1.sgml \ + doc/obxprop.1.in \ obrender/version.h.in \ obrender/obrender-3.5.pc.in \ obt/obt-3.5.pc.in \
@@ -673,9 +673,16 @@ <!-- if a press-release lasts longer than this setting (in milliseconds), the
menu is hidden again --> <middle>no</middle> <!-- center submenus vertically about the parent entry --> - <submenuShowDelay>100</submenuShowDelay> - <!-- this one is easy, time to delay before showing a submenu after hovering - over the parent entry --> + <submenuShowDelay>200</submenuShowDelay> + <!-- time to delay before showing a submenu after hovering over the parent + entry. + if this is a negative value, then the delay is infinite and the + submenu will not be shown until it is clicked on --> + <submenuHideDelay>400</submenuHideDelay> + <!-- time to delay before hiding a submenu when selecting another + entry in parent menu --> + if this is a negative value, then the delay is infinite and the + submenu will not be hidden until a different submenu is opened --> <applicationIcons>yes</applicationIcons> <!-- controls if icons appear in the client-list-(combined-)menu --> <manageDesktops>yes</manageDesktops>
@@ -46,7 +46,7 @@ # get the current GNOME/Openbox session
OB_SESSION=$(gconftool-2 -g $SPATH/openbox_session 2> /dev/null) # update the GNOME/Openbox session if needed - if x$OB_SESSION != x$SESSION; then + if test x$OB_SESSION != x$SESSION; then # the default session changed or we didn't run GNOME/Openbox before gconftool-2 -t list --list-type=strings -s $SPATH/openbox_session \ "$SESSION" 2> /dev/null
@@ -13,4 +13,4 @@ Suggests: menu, x-display-manager, ksmserver | gnome-session, kdm | gdm
Conflicts: menu (<< 2.1.12) Provides: x-window-manager Description: A minimalistic, highly configurable, next generation window manager with extensive standards support. - http://icculus.org/openbox/ + http://openbox.org/
@@ -0,0 +1,42 @@
+.TH "OBXPROP" "1" +.SH "NAME" +openbox \(em A minimalistic, highly configurable, next generation window +manager with extensive standards support. +.SH "SYNOPSIS" +.PP +\fBopenbox\fR [\fB\-\-help\fP] [\fB\-\-display\fP] [DISPLAY] [\fB\-\-id\fP] [ID] [\fB\-\-root\fP] +.SH "DESCRIPTION" +.PP +obxprop is a tool for displaying the properties on an x +window. +.PP +This tool has a similar functionality to \fBxprop\fR, +but obxprop allows you to see UTF-8 strings as text. +.PP +You may use the \fB\-\-id\fR option to specify a window +identifier, otherwise obxprop will allow you to select a window by +clicking on it. +.PP +Primarily, this tool exists for Openbox users to see the value of the +_OB_NAME, _OB_CLASS, and _OB_ROLE properties, which Openbox uses for +matching windows against user-defined application rules. +.SH "OPTIONS" +.PP +These are the possible options that \fBopenbox\fR accepts: +.IP "\fB\-\-help\fP" 10 +Show a summary of the options available. +.IP "\fB\-\-display\fP" 10 +.IP "DISPLAY" 10 +Specify the X display to use. +.IP "\fB\-\-id\fP" 10 +.IP "ID" 10 +Specify the window identifier for the window whose properties +will be displayed. +.SH "SEE ALSO" +.PP +openbox (1), openbox-session(1), openbox-gnome-session(1), +openbox-kde-session(1). +.PP +Please report bugs to: \fBhttp://bugzilla.icculus.org/ +\fP +.\" created by instant / docbook-to-man, Wed 06 Jan 2010, 13:40
@@ -0,0 +1,116 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ + +<!-- Process this file with docbook-to-man to generate an nroff manual + page: `docbook-to-man manpage.sgml > manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + <!ENTITY dhsection "<manvolnum>1</manvolnum>"> + <!ENTITY dhucpackage "<refentrytitle>OBXPROP</refentrytitle>"> + <!ENTITY dhpackage "openbox"> +]> + +<refentry> + <refmeta> + &dhucpackage; + + &dhsection; + </refmeta> + <refnamediv> + <refname>&dhpackage;</refname> + + <refpurpose>A minimalistic, highly configurable, next generation window + manager with extensive standards support.</refpurpose> + </refnamediv> + <refsynopsisdiv> + <cmdsynopsis> + <command>&dhpackage;</command> + <arg><option>--help</option></arg> + <arg><option>--display</option></arg><arg>DISPLAY</arg> + <arg><option>--id</option></arg><arg>ID</arg> + <arg><option>--root</option></arg> + </cmdsynopsis> + </refsynopsisdiv> + <refsect1> + <title>DESCRIPTION</title> + + <para>obxprop is a tool for displaying the properties on an x + window.</para> + + <para>This tool has a similar functionality to <command>xprop</command>, + but obxprop allows you to see UTF-8 strings as text.</para> + + <para>You may use the <command>--id</command> option to specify a window + identifier, otherwise obxprop will allow you to select a window by + clicking on it.</para> + + <para>Primarily, this tool exists for Openbox users to see the value of the + _OB_NAME, _OB_CLASS, and _OB_ROLE properties, which Openbox uses for + matching windows against user-defined application rules.</para> + </refsect1> + <refsect1> + <title>OPTIONS</title> + + <para>These are the possible options that <command>&dhpackage;</command> accepts:</para> + <variablelist> + <varlistentry> + <term><option>--help</option></term> + <listitem> + <para>Show a summary of the options available.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--display</option></term><term>DISPLAY</term> + <listitem> + <para>Specify the X display to use.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--id</option></term><term>ID</term> + <listitem> + <para>Specify the window identifier for the window whose properties + will be displayed.</para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>SEE ALSO</title> + + <para>openbox (1), openbox-session(1), openbox-gnome-session(1), + openbox-kde-session(1).</para> + + <para>Please report bugs to: <literal>http://bugzilla.icculus.org/ + </literal></para> + </refsect1> +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:2 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:nil +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +--> + +
@@ -15,8 +15,8 @@ openbox(1), openbox-kde-session(1), openbox-session(1).
.PP The program's full documentation is available on the website: -\fBhttp://icculus.org/openbox/\fP +\fBhttp://openbox.org/\fP .PP Please report bugs to: \fBhttp://bugzilla.icculus.org/ \fP -.\" created by instant / docbook-to-man, Wed 23 May 2007, 14:03 +.\" created by instant / docbook-to-man, Wed 06 Jan 2010, 13:40
@@ -49,7 +49,7 @@ <para>openbox(1), openbox-kde-session(1), openbox-session(1).
</para> <para>The program's full documentation is available on the website: - <literal>http://icculus.org/openbox/</literal></para> + <literal>http://openbox.org/</literal></para> <para>Please report bugs to: <literal>http://bugzilla.icculus.org/ </literal></para>
@@ -15,8 +15,8 @@ openbox(1), openbox-gnome-session(1), openbox-session(1).
.PP The program's full documentation is available on the website: -\fBhttp://icculus.org/openbox/\fP +\fBhttp://openbox.org/\fP .PP Please report bugs to: \fBhttp://bugzilla.icculus.org/ \fP -.\" created by instant / docbook-to-man, Wed 23 May 2007, 14:03 +.\" created by instant / docbook-to-man, Wed 06 Jan 2010, 13:40
@@ -49,7 +49,7 @@ <para>openbox(1), openbox-gnome-session(1), openbox-session(1).
</para> <para>The program's full documentation is available on the website: - <literal>http://icculus.org/openbox/</literal></para> + <literal>http://openbox.org/</literal></para> <para>Please report bugs to: <literal>http://bugzilla.icculus.org/ </literal></para>
@@ -35,8 +35,8 @@ openbox(1), openbox-session(1), openbox-gnome-session(1).
.PP The program's full documentation is available on the website: -\fBhttp://icculus.org/openbox/\fP +\fBhttp://openbox.org/\fP .PP Please report bugs to: \fBhttp://bugzilla.icculus.org/ \fP -.\" created by instant / docbook-to-man, Wed 23 May 2007, 14:03 +.\" created by instant / docbook-to-man, Wed 06 Jan 2010, 13:40
@@ -66,7 +66,7 @@ <para>openbox(1), openbox-session(1), openbox-gnome-session(1).
</para> <para>The program's full documentation is available on the website: - <literal>http://icculus.org/openbox/</literal></para> + <literal>http://openbox.org/</literal></para> <para>Please report bugs to: <literal>http://bugzilla.icculus.org/ </literal></para>
@@ -88,8 +88,8 @@ obconf (1), openbox-session(1), openbox-gnome-session(1),
openbox-kde-session(1). .PP The program's full documentation is available on the website: -\fBhttp://icculus.org/openbox/\fP +\fBhttp://openbox.org/\fP .PP Please report bugs to: \fBhttp://bugzilla.icculus.org/ \fP -.\" created by instant / docbook-to-man, Tue 22 May 2007, 00:06 +.\" created by instant / docbook-to-man, Wed 06 Jan 2010, 13:40
@@ -177,7 +177,7 @@ <para>obconf (1), openbox-session(1), openbox-gnome-session(1),
openbox-kde-session(1).</para> <para>The program's full documentation is available on the website: - <literal>http://icculus.org/openbox/</literal></para> + <literal>http://openbox.org/</literal></para> <para>Please report bugs to: <literal>http://bugzilla.icculus.org/ </literal></para>
@@ -6,6 +6,7 @@ #include "openbox/screen.h"
typedef struct { gboolean here; + gboolean stop_int; } Options; static gpointer setup_func(xmlNodePtr node);@@ -22,9 +23,12 @@ xmlNodePtr n;
Options *o; o = g_new0(Options, 1); + o->stop_int = TRUE; if ((n = obt_xml_find_node(node, "here"))) o->here = obt_xml_node_bool(n); + if ((n = obt_xml_find_node(node, "stopInteractive"))) + o->stop_int = obt_xml_node_bool(n); return o; }@@ -44,11 +48,17 @@ if (data->button == 0 || client_mouse_focusable(data->client) ||
(data->context != OB_FRAME_CONTEXT_CLIENT && data->context != OB_FRAME_CONTEXT_FRAME)) { + if (o->stop_int) + actions_interactive_cancel_act(); + actions_client_move(data, TRUE); client_activate(data->client, TRUE, o->here, FALSE, FALSE, TRUE); actions_client_move(data, FALSE); } } else if (data->context == OB_FRAME_CONTEXT_DESKTOP) { + if (o->stop_int) + actions_interactive_cancel_act(); + /* focus action on the root window. make keybindings work for this openbox instance, but don't focus any specific client */ focus_nothing();
@@ -93,6 +93,7 @@
guint config_menu_hide_delay; gboolean config_menu_middle; guint config_submenu_show_delay; +guint config_submenu_hide_delay; gboolean config_menu_client_list_icons; gboolean config_menu_manage_desktops;@@ -813,6 +814,8 @@ if ((n = obt_xml_find_node(node, "middle")))
config_menu_middle = obt_xml_node_bool(n); if ((n = obt_xml_find_node(node, "submenuShowDelay"))) config_submenu_show_delay = obt_xml_node_int(n); + if ((n = obt_xml_find_node(node, "submenuHideDelay"))) + config_submenu_hide_delay = obt_xml_node_int(n); if ((n = obt_xml_find_node(node, "applicationIcons"))) config_menu_client_list_icons = obt_xml_node_bool(n); if ((n = obt_xml_find_node(node, "manageDesktops")))@@ -1017,7 +1020,8 @@ obt_xml_register(i, "resistance", parse_resistance, NULL);
config_menu_hide_delay = 250; config_menu_middle = FALSE; - config_submenu_show_delay = 0; + config_submenu_show_delay = 200; + config_submenu_hide_delay = 400; config_menu_client_list_icons = TRUE; config_menu_manage_desktops = TRUE; config_menu_files = NULL;
@@ -191,6 +191,8 @@ /*! Center menus vertically about the parent entry */
extern gboolean config_menu_middle; /*! Delay before opening a submenu in milliseconds */ extern guint config_submenu_show_delay; +/*! Delay before closing a submenu in milliseconds */ +extern guint config_submenu_hide_delay; /*! Show icons in client_list_menu */ extern gboolean config_menu_client_list_icons; /*! Show manage desktops in client_list_menu */
@@ -1802,8 +1802,13 @@ }
else if (ob_keycode_match(keycode, OB_KEY_LEFT)) { /* Left goes to the parent menu */ - if (frame->parent) + if (frame->parent) { + /* remove focus from the child */ menu_frame_select(frame, NULL, TRUE); + /* and put it in the parent */ + menu_frame_select(frame->parent, frame->parent->selected, + TRUE); + } ret = TRUE; }@@ -1903,6 +1908,15 @@
return ret; } +static Bool event_look_for_menu_enter(Display *d, XEvent *ev, XPointer arg) +{ + ObMenuFrame *f = (ObMenuFrame*)arg; + ObMenuEntryFrame *e; + return ev->type == EnterNotify && + (e = g_hash_table_lookup(menu_frame_map, &ev->xcrossing.window)) && + !e->ignore_enters && e->frame == f; +} + static void event_handle_menu(ObMenuFrame *frame, XEvent *ev) { ObMenuFrame *f;@@ -1925,14 +1939,16 @@ /*ignore leaves when we're already in the window */
if (ev->xcrossing.detail == NotifyInferior) break; - if ((e = g_hash_table_lookup(menu_frame_map, &ev->xcrossing.window)) && - (f = find_active_menu()) && f->selected == e) + if ((e = g_hash_table_lookup(menu_frame_map, &ev->xcrossing.window))) { - ObMenuEntryFrame *u = menu_entry_frame_under(ev->xcrossing.x_root, - ev->xcrossing.y_root); - /* if we're just going from one entry in the menu to the next, - don't unselect stuff first */ - if (!u || e->frame != u->frame) + XEvent ce; + + /* check if an EnterNotify event is coming, and if not, then select + nothing in the menu */ + if (XCheckIfEvent(obt_display, &ce, event_look_for_menu_enter, + (XPointer)e->frame)) + XPutBackEvent(obt_display, &ce); + else menu_frame_select(e->frame, NULL, FALSE); } break;
@@ -54,9 +54,10 @@ void focus_cycle_stop(ObClient *ifclient)
{ /* stop focus cycling if the given client is a valid focus target, and so the cycling is being disrupted */ - if (focus_cycle_target && ifclient && - (ifclient == focus_cycle_target || - focus_cycle_popup_is_showing(ifclient))) + if (focus_cycle_target && + ((ifclient && (ifclient == focus_cycle_target || + focus_cycle_popup_is_showing(ifclient))) || + !ifclient)) { focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,TRUE); focus_directional_cycle(0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
@@ -16,7 +16,8 @@ "Usage: obxprop [OPTIONS]\n\n"
"Options:\n" " --help Display this help and exit\n" " --display DISPLAY Connect to this X display\n" - " --id ID Show the properties for this window\n"); + " --id ID Show the properties for this window\n" + " --root Show the properties for the root window\n"); return 1; }@@ -256,11 +257,14 @@ Display *d;
Window id, userid = None; int i; char *dname = NULL; + gboolean root = FALSE; for (i = 1; i < argc; ++i) { if (!strcmp(argv[i], "--help")) { return fail(0); } + else if (!strcmp(argv[i], "--root")) + root = TRUE; else if (!strcmp(argv[i], "--id")) { if (++i == argc) return fail(0);@@ -286,6 +290,9 @@ if (!d) {
return fail("Unable to find an X display. " "Ensure you have permission to connect to the display."); } + + if (root) + userid = RootWindow(d, DefaultScreen(d)); if (userid == None) { i = XGrabPointer(d, RootWindow(d, DefaultScreen(d)),