]> Dogcows Code - chaz/openbox/commitdiff
add <dialog><focus/><desktop/> to allow disabling popups
authorDana Jansens <danakj@orodu.net>
Fri, 26 Sep 2003 08:22:49 +0000 (08:22 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 26 Sep 2003 08:22:49 +0000 (08:22 +0000)
CHANGELOG
data/rc.xml.in
data/rc.xsd
openbox/config.c
openbox/config.h
openbox/focus.c
openbox/screen.c

index 3a9b6def3b018aebd55e568ae6400675dd8ecc1f..c89366059d9450ade2346e83a54a8ad3d39fc129 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,8 @@
        * 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
index e107ac047861fb03009fc65cd0199d25284e4bba..d187b7e5f99e35d8496fab4a929f6db5491a045d 100644 (file)
   <moveButton>A-Left</moveButton>
 </dock>
 
+<dialog>
+  <focus>yes</focus>
+  <desktop>yes</desktop>
+</dialog>
+
 <keyboard>
   <chainQuitKey>C-g</chainQuitKey>
 
index 16704600d47c36aa1c722a3ca124c23e85851519..239a955559a7a0e793e6082afa9afc544238435e 100644 (file)
@@ -46,6 +46,7 @@
                 <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"/>
             <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">
         <xs:sequence>
             <xs:element minOccurs="0" name="menu" type="xs:string"/>
index 97accc01e648009bf227426620012a32cd021f04..d72cce8d234689da98f818dda0ff5e03d57cf4ba 100644 (file)
@@ -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);
index 0c14b3764d9939de6bd743a99fc0078ab54ec658..c8c85eb823942c34f6eb3a2b13ff7094a471d56c 100644 (file)
@@ -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;
 
index 740ce07bda605eead2fef130a61a528570a10231..eac0dce1ce6435cf7bc41cb53977446fc08db950 100644 (file)
@@ -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;
index 7f0c70c96ddc2e915f75dd932c46bca814a45f13..8a9475adf57d87592bcf029076d788f090688c29 100644 (file)
@@ -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);
This page took 0.035462 seconds and 4 git commands to generate.