This patch sets each used layout variant to setxkbmap arguments
instead of the first one only.

I want to switch between ch_fr and fr_bepo:

  SET XKB RUN: setxkbmap -layout 'fr,ch,' -variant 'bepo,fr,' -model 
'tm2030USB' -option

J�r�my
diff --git a/e/src/bin/e_xkb.c b/e/src/bin/e_xkb.c
index 64cf92b..b57c79f 100644
--- a/e/src/bin/e_xkb.c
+++ b/e/src/bin/e_xkb.c
@@ -48,21 +48,26 @@ e_xkb_update(int cur_group)
              eina_strbuf_append(buf, ",");
           }
      }
-    eina_strbuf_append(buf, "'");
-   /* use first entry in used layouts */
-   cl = e_config->xkb.used_layouts->data;
+   eina_strbuf_append(buf, "' -variant '");
 
-   if ((cl->variant)
-/* workaround xkb bug */
-       && (!(!strcmp(cl->variant, "basic"))))
+   EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, cl)
      {
-        eina_strbuf_append(buf, " -variant '");
-        eina_strbuf_append(buf, cl->variant);
-        /* workaround xkb bug where basic variants work with ',' at the
-         * end, but dvorak (and mayby others) don't */
-//        if (!strcmp(cl->variant, "basic")) eina_strbuf_append(buf, ",");
-        eina_strbuf_append(buf, "'");
+        if (cl->variant)
+          {
+             if (strcmp(cl->variant, "basic"))
+               eina_strbuf_append(buf, cl->variant);
+             eina_strbuf_append(buf, ",");
+             /* workaround xkb bug where basic variants work with ',' at the
+             * end, but dvorak (and mayby others) don't */
+//           if (!strcmp(cl->variant, "basic")) eina_strbuf_append(buf, ",");
+          }
+        else
+          eina_strbuf_append(buf, ",");
      }
+   eina_strbuf_append(buf, "'");
+
+   /* use first entry in used layouts */
+   cl = e_config->xkb.used_layouts->data;
 
    if (cl->model)
      {
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to