From: Dana Jansens Date: Fri, 26 Sep 2003 08:22:49 +0000 (+0000) Subject: add to allow disabling popups X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=4e8eff328cf9f99f833ce01997621d3817074ab1;p=chaz%2Fopenbox add to allow disabling popups --- diff --git a/CHANGELOG b/CHANGELOG index 3a9b6def..c8936605 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,8 @@ * Added the option for moving dock apps around inside the dock. * Made the "Desktop" action show the pager/desktop dialog. + * Add the section to allow the disabling of the focus and + pager/desktop dialogs. 3.0-beta6: * Added _OB_WM_STATE_UNDECORATED hint, which can be read and controlled diff --git a/data/rc.xml.in b/data/rc.xml.in index e107ac04..d187b7e5 100644 --- a/data/rc.xml.in +++ b/data/rc.xml.in @@ -51,6 +51,11 @@ A-Left + + yes + yes + + C-g diff --git a/data/rc.xsd b/data/rc.xsd index 16704600..239a9555 100644 --- a/data/rc.xsd +++ b/data/rc.xsd @@ -46,6 +46,7 @@ + @@ -111,6 +112,12 @@ + + + + + + diff --git a/openbox/config.c b/openbox/config.c index 97accc01..d72cce8d 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -56,6 +56,9 @@ guint config_keyboard_reset_state; gint config_mouse_threshold; gint config_mouse_dclicktime; +gboolean config_dialog_focus; +gboolean config_dialog_desktop; + GSList *config_menu_files; gint config_resist_win; @@ -340,6 +343,19 @@ static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d) } } +static void parse_dialog(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, + void *d) +{ + xmlNodePtr n; + + node = node->children; + + if ((n = parse_find_node("focus", node))) + config_dialog_focus = parse_bool(doc, n); + if ((n = parse_find_node("desktop", node))) + config_dialog_desktop = parse_bool(doc, n); +} + static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d) { for (node = node->children; node; node = node->next) { @@ -526,6 +542,11 @@ void config_startup(ObParseInst *i) parse_register(i, "resistance", parse_resistance, NULL); + config_dialog_focus = TRUE; + config_dialog_desktop = TRUE; + + parse_register(i, "dialog", parse_dialog, NULL); + config_menu_files = NULL; parse_register(i, "menu", parse_menu, NULL); diff --git a/openbox/config.h b/openbox/config.h index 0c14b376..c8c85eb8 100644 --- a/openbox/config.h +++ b/openbox/config.h @@ -93,6 +93,11 @@ extern gint config_resist_win; /*! Number of pixels to resist while crossing a screen's edge */ extern gint config_resist_edge; +/*! Show a dialog while cycling focus between windows */ +extern gboolean config_dialog_focus; +/*! Show a dialogs while switching between desktops */ +extern gboolean config_dialog_desktop; + /*! User-specified menu files */ extern GSList *config_menu_files; diff --git a/openbox/focus.c b/openbox/focus.c index 740ce07b..eac0dce1 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -237,7 +237,7 @@ void focus_fallback(ObFocusFallbackType type) static void popup_cycle(ObClient *c, gboolean show) { - if (!show) { + if (!show || !config_dialog_focus) { icon_popup_hide(focus_cycle_popup); } else { Rect *a; diff --git a/openbox/screen.c b/openbox/screen.c index 7f0c70c9..8a9475ad 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -572,7 +572,7 @@ void screen_desktop_popup(guint d, gboolean show) { Rect *a; - if (!show) { + if (!show || !config_dialog_desktop) { pager_popup_hide(desktop_cycle_popup); } else { a = screen_physical_area_monitor(0);