add <dialog><focus/><desktop/> to allow disabling popups
Dana Jansens danakj@orodu.net
7 files changed,
42 insertions(+),
2 deletions(-)
M
CHANGELOG
→
CHANGELOG
@@ -3,6 +3,8 @@ * Closed bug #875 (RaiseLower fails to funtion on windows with dialogs)
* Added the <moveButton> option for moving dock apps around inside the dock. * Made the "Desktop" action show the pager/desktop dialog. + * Add the <dialog> 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
M
data/rc.xml.in
→
data/rc.xml.in
@@ -51,6 +51,11 @@ <hideDelay>300</hideDelay>
<moveButton>A-Left</moveButton> </dock> +<dialog> + <focus>yes</focus> + <desktop>yes</desktop> +</dialog> + <keyboard> <chainQuitKey>C-g</chainQuitKey>
M
data/rc.xsd
→
data/rc.xsd
@@ -46,6 +46,7 @@ <xs:element name="theme" type="ob:theme"/>
<xs:element name="desktops" type="ob:desktops"/> <xs:element name="resize" type="ob:resize"/> <xs:element name="dock" type="ob:dock"/> + <xs:element name="dialog" type="ob:dialog"/> <xs:element name="keyboard" type="ob:keyboard"/> <xs:element name="mouse" type="ob:mouse"/> <xs:element name="menu" type="ob:menu"/>@@ -109,6 +110,12 @@ <xs:element name="floatingY" type="xs:integer"/>
<xs:element name="autoHide" type="ob:yesorno"/> <xs:element name="hideDelay" type="xs:integer"/> <xs:element name="moveButton" type="ob:button"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="dialog"> + <xs:sequence> + <xs:element name="focus" type="ob:yesorno"/> + <xs:element name="desktop" type="ob:yesorno"/> </xs:sequence> </xs:complexType> <xs:complexType name="action">
M
openbox/config.c
→
openbox/config.c
@@ -56,6 +56,9 @@
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 @@ g_free(str);
} } +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) {@@ -525,6 +541,11 @@ config_resist_win = 10;
config_resist_edge = 20; 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;
M
openbox/config.h
→
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;
M
openbox/focus.c
→
openbox/focus.c
@@ -237,7 +237,7 @@ }
static void popup_cycle(ObClient *c, gboolean show) { - if (!show) { + if (!show || !config_dialog_focus) { icon_popup_hide(focus_cycle_popup); } else { Rect *a;
M
openbox/screen.c
→
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);