Hide ClearGrab/CloseGrabs actions behind an option
authorDaniel Stone <daniel@fooishbar.org>
Thu, 19 Jan 2012 05:36:16 +0000 (16:36 +1100)
committerSergey V. Udaltsov <svu@gnome.org>
Thu, 19 Jan 2012 23:27:04 +0000 (23:27 +0000)
Similar to how we put the Terminate mapping behind an option rather than
enabling it by default, put the ClearGrab/CloseGrab action handlers
behind an option too, so we don't ship 'break my screensaver'.  Oops.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
compat/xfree86
rules/base.o_c.part
rules/base.xml.in

index cf4a8b2..52e661d 100644 (file)
@@ -41,12 +41,6 @@ default partial xkb_compatibility "basic"  {
         action = SwitchScreen(Screen=12, !SameServer);
     };
 
-    interpret XF86_Ungrab {
-        action = Private(type=0x86, data="Ungrab");
-    };
-    interpret XF86_ClearGrab {
-        action = Private(type=0x86, data="ClsGrb");
-    };
     interpret XF86LogGrabInfo {
         action = Private(type=0x86, data="PrGrbs");
     };
@@ -61,3 +55,12 @@ default partial xkb_compatibility "basic"  {
         action = Private(type=0x86, data="-VMode");
     };
 };
+
+partial xkb_compatibility "grab_break" {
+    interpret XF86_Ungrab {
+        action = Private(type=0x86, data="Ungrab");
+    };
+    interpret XF86_ClearGrab {
+        action = Private(type=0x86, data="ClsGrb");
+    };
+};
index 352f8b3..b80ab6d 100644 (file)
@@ -3,4 +3,5 @@
   grp_led:scroll       =       +ledscroll(group_lock)
   japan:kana_lock      =       +japan(kana_lock)
   caps:shiftlock       =       +ledcaps(shift_lock)
+  grab:break_actions    =       +xfree86(grab_break)
 
index 22b720f..6c17faa 100644 (file)
           <_description>Toggle PointerKeys with Shift + NumLock.</_description>
         </configItem>
       </option>
+      <option>
+        <configItem>
+          <name>grab:break_actions</name>
+          <_description>Allow breaking grabs with keyboard actions (warning: security risk)</_description>
+        </configItem>
+      </option>
     </group>
     <group allowMultipleSelection="true">
       <!-- Special shortcuts for the Euro character -->