changeset 3141:007340c8917c

Fixed #110: Added click_to_focus config option
author unexist
date Fri, 18 Nov 2011 23:01:03 +0100
parents 33753d1f8359
children 9ebcecc9b509
files src/subtle/ruby.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/subtle/ruby.c	Fri Nov 18 22:59:36 2011 +0100
+++ b/src/subtle/ruby.c	Fri Nov 18 23:01:03 2011 +0100
@@ -1866,6 +1866,11 @@
                 if(!(subtle->flags & SUB_SUBTLE_CHECK))
                   subtle->gravity = value; ///< Store for later
               }
+            else if(CHAR2SYM("click_to_focus") == option)
+              {
+                if(!(subtle->flags & SUB_SUBTLE_CHECK) && Qtrue == value)
+                  subtle->flags |= SUB_SUBTLE_CLICK_TO_FOCUS;
+              }
             else subSubtleLogWarn("Cannot find option `:%s'\n",
               SYM2CHAR(option));
             break; /* }}} */
@@ -3606,7 +3611,7 @@
   XQueryPointer(subtle->dpy, ROOT, &root, &win, &rx, &ry, &x, &y, &mask);
 
   if((c = CLIENT(subSubtleFind(win, CLIENTID))))
-    subClientFocus(c);
+    subClientFocus(c, True);
   else subSubtleFocus(False);
 
   /* Hook: Reload */