Hello all!

 Been a long time, so here are some patches :)
- evas-configure-xcb_image_version_requirement.patch: check for
xcb-image at least version 0.2.1
- e-scrollframe-correct_thumbscroll.patch: corrects thumbscroll so that
scrollbars can be used correctly even if thumbscroll is activated,
useful on portable device when we activate thumbscroll but still want
to use scrollbars with stylus; works great with laptops' touchpads
- e-config-thumbscroll_default.patch: activate thumbscroll by default :)
- e-config-dpms_correct.patch: correct default values for DPMS timeouts
- ecore-x-pointer_mapping_support.patch: add support for modifying
pointer button mapping
- e-config-pointer_mapping_support.patch: and actually use that on
Enlightenment

 Cheers!

 Chidambar "ilLogict" Zinnoury
Index: trunk/evas/configure.in
===================================================================
--- trunk/evas/configure.in	(revision 35759)
+++ trunk/evas/configure.in	(working copy)
@@ -389,7 +389,7 @@
 if test "x$want_evas_software_xcb" = "xyes"; then
   PKG_CHECK_MODULES(
     XCB,
-    xcb xcb-shm xcb-image pixman-1,
+    xcb xcb-shm xcb-image >= 0.2.1 pixman-1,
     [
       AC_DEFINE(BUILD_ENGINE_SOFTWARE_XCB, 1, [Software XCB Rendering Backend])
       have_evas_software_xcb="yes"
@@ -452,7 +452,7 @@
     ],
     [
       if test "x$want_evas_sdl" = "xyes" -a "x$use_strict" = "xyes" ; then
-        AC_MSG_ERROR([Sdl not found (strict dependencies checking)])
+        AC_MSG_ERROR([SDL not found (strict dependencies checking)])
       fi
     ]
   )
@@ -729,7 +729,7 @@
 if test "x$want_evas_xrender_xcb" = "xyes"; then
   PKG_CHECK_MODULES(
     XCBRENDER,
-    xcb xcb-shm xcb-render xcb-image,
+    xcb xcb-shm xcb-render xcb-image >= 0.2.1,
     [
       AC_DEFINE(BUILD_ENGINE_XRENDER_XCB, 1, [Xrender XCB Rendering Backend])
       have_evas_xrender_xcb="yes"
Index: trunk/e/src/bin/e_scrollframe.c
===================================================================
--- trunk/e/src/bin/e_scrollframe.c	(revision 35759)
+++ trunk/e/src/bin/e_scrollframe.c	(working copy)
@@ -603,22 +603,23 @@
 		    evas_event_feed_hold(e, 1, ev->timestamp, ev->data);
 		  ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
 		  sd->down.dragged = 1;
-	       }
-	     x = sd->down.sx - (ev->cur.canvas.x - sd->down.x);
-	     y = sd->down.sy - (ev->cur.canvas.y - sd->down.y);
-	     if ((sd->down.dir_x) || (sd->down.dir_y))
-	       {
-		  if (!sd->down.locked)
+		  x = sd->down.sx - (ev->cur.canvas.x - sd->down.x);
+		  y = sd->down.sy - (ev->cur.canvas.y - sd->down.y);
+		  if ((sd->down.dir_x) || (sd->down.dir_y))
 		    {
-		       printf("lock dir to x%iy%i\n", sd->down.dir_x, sd->down.dir_y);
-		       sd->down.locked_x = x;
-		       sd->down.locked_y = y;
-		       sd->down.locked = 1;
+		       if (!sd->down.locked)
+			 {
+			    printf("lock dir to x%iy%i\n", sd->down.dir_x,
+			    	   sd->down.dir_y);
+			    sd->down.locked_x = x;
+			    sd->down.locked_y = y;
+			    sd->down.locked = 1;
+			 }
+		       if (sd->down.dir_x) y = sd->down.locked_y;
+		       else x = sd->down.locked_x;
 		    }
-		  if (sd->down.dir_x) y = sd->down.locked_y;
-		  else x = sd->down.locked_x;
+		  e_scrollframe_child_pos_set(sd->smart_obj, x, y);
 	       }
-	     e_scrollframe_child_pos_set(sd->smart_obj, x, y);
 	  }
      }
 }
@@ -676,6 +677,8 @@
    x = vx * (double)mx;
    y = vy * (double)my;
    sd->pan_func.set(sd->pan_obj, x, y);
+   if ((e_config->thumbscroll_enable) && (sd->down.now) && (!sd->down.dragged))
+     sd->down.now = 0;
 }
 
 static void
Index: trunk/e/src/bin/e_config.c
===================================================================
--- trunk/e/src/bin/e_config.c	(revision 35759)
+++ trunk/e/src/bin/e_config.c	(working copy)
@@ -1525,9 +1525,13 @@
    IFCFGEND;
    
    IFCFG(0x0124);
-   e_config->thumbscroll_enable = 0;
+   e_config->thumbscroll_enable = 1;
    e_config->thumbscroll_threshhold = 8;
    e_config->thumbscroll_momentum_threshhold = 100.0;
    e_config->thumbscroll_friction = 1.0;
Index: trunk/e/config/default/e.src
===================================================================
--- trunk/e/config/default/e.src	(revision 35759)
+++ trunk/e/config/default/e.src	(working copy)
@@ -1974,7 +1974,7 @@
   value "menu_apps_show" int: 1;
   value "ping_clients_interval" int: 128;
   value "cache_flush_poll_interval" int: 512;
-  value "thumbscroll_enable" int: 0;
+  value "thumbscroll_enable" int: 1;
   value "thumbscroll_threshhold" int: 8;
   value "thumbscroll_momentum_threshhold" double: 100.0;
   value "thumbscroll_friction" double: 1.0;
Index: trunk/e/src/bin/e_config.c
===================================================================
--- trunk/e/src/bin/e_config.c	(revision 35759)
+++ trunk/e/src/bin/e_config.c	(working copy)
@@ -1456,9 +1456,9 @@
    e_config->dpms_standby_enable = 0;
    e_config->dpms_suspend_enable = 0;
    e_config->dpms_off_enable = 0;
-   e_config->dpms_standby_timeout = 0;
-   e_config->dpms_suspend_timeout = 0;
-   e_config->dpms_off_timeout = 0;
+   e_config->dpms_standby_timeout = 1;
+   e_config->dpms_suspend_timeout = 1;
+   e_config->dpms_off_timeout = 1;
    e_config->screensaver_enable = 0;
    e_config->screensaver_timeout = 0;
    e_config->screensaver_interval = 5;
Index: trunk/e/config/default/e.src
===================================================================
--- trunk/e/config/default/e.src	(revision 35759)
+++ trunk/e/config/default/e.src	(working copy)
@@ -1890,9 +1890,9 @@
   value "dpms_standby_enable" int: 0;
   value "dpms_suspend_enable" int: 0;
   value "dpms_off_enable" int: 0;
-  value "dpms_standby_timeout" int: 0;
-  value "dpms_suspend_timeout" int: 0;
-  value "dpms_off_timeout" int: 0;
+  value "dpms_standby_timeout" int: 1;
+  value "dpms_suspend_timeout" int: 1;
+  value "dpms_off_timeout" int: 1;
   value "clientlist_group_by" int: 0;
   value "clientlist_include_all_zones" int: 0;
   value "clientlist_separate_with" int: 0;
Index: trunk/ecore/src/lib/ecore_x/Ecore_X.h
===================================================================
--- trunk/ecore/src/lib/ecore_x/Ecore_X.h	(revision 35759)
+++ trunk/ecore/src/lib/ecore_x/Ecore_X.h	(working copy)
@@ -1577,6 +1577,10 @@
 EAPI void ecore_x_pointer_control_get_prefetch(void);
 EAPI void ecore_x_pointer_control_get_fetch(void);
 EAPI int  ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold);
+EAPI int  ecore_x_pointer_mapping_set(unsigned char *map, int nmap);
+EAPI void ecore_x_pointer_mapping_get_prefetch(void);
+EAPI void ecore_x_pointer_mapping_get_fetch(void);
+EAPI int  ecore_x_pointer_mapping_get(unsigned char *map, int nmap);
 EAPI int  ecore_x_pointer_grab(Ecore_X_Window win);
 EAPI int  ecore_x_pointer_confine_grab(Ecore_X_Window win);
 EAPI void ecore_x_pointer_ungrab(void);
Index: trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb.c
===================================================================
--- trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb.c	(revision 35759)
+++ trunk/ecore/src/lib/ecore_x/xcb/ecore_xcb.c	(working copy)
@@ -1267,6 +1267,56 @@
 }
 
 EAPI int
+ecore_x_pointer_mapping_set(unsigned char *map,
+			    int nmap)
+{
+   xcb_set_pointer_mapping(_ecore_xcb_conn, nmap, map);
+   return 1;
+}
+
+EAPI void
+ecore_x_pointer_mapping_get_prefetch(void)
+{
+   xcb_get_pointer_mapping_cookie_t cookie;
+
+   cookie = xcb_get_pointer_mapping_unchecked(_ecore_xcb_conn);
+   _ecore_xcb_cookie_cache(cookie.sequence);
+}
+
+EAPI void
+ecore_x_pointer_mapping_get_fetch(void)
+{
+   xcb_get_pointer_mapping_cookie_t cookie;
+   xcb_get_pointer_mapping_reply_t *reply;
+
+   cookie.sequence = _ecore_xcb_cookie_get();
+   reply = xcb_get_pointer_mapping_reply(_ecore_xcb_conn, cookie, NULL);
+   _ecore_xcb_reply_cache(reply);
+}
+
+EAPI int
+ecore_x_pointer_mapping_get(unsigned char *map,
+                            int nmap)
+{
+   xcb_get_pointer_mapping_reply_t *reply;
+   int i;
+   uint8_t tmp;
+
+   reply = _ecore_xcb_reply_get();
+   if (!reply) return 0;
+
+   if (nmap > xcb_get_pointer_mapping_map_length(reply))
+     return 0;
+
+   tmp = xcb_get_pointer_mapping_map(reply);
+
+   for (i = 0; i < nmap; i++)
+     map[i] = tmp[i];
+
+   return 1;
+}
+
+EAPI int
 ecore_x_pointer_grab(Ecore_X_Window window)
 {
    xcb_grab_pointer_cookie_t cookie;
Index: trunk/ecore/src/lib/ecore_x/xlib/ecore_x.c
===================================================================
--- trunk/ecore/src/lib/ecore_x/xlib/ecore_x.c	(revision 35759)
+++ trunk/ecore/src/lib/ecore_x/xlib/ecore_x.c	(working copy)
@@ -1013,7 +1013,6 @@
 				accel_num, accel_denom, threshold);
 }
 
-
 EAPI int
 ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold)
 {
@@ -1022,6 +1021,18 @@
 }
 
 EAPI int
+ecore_x_pointer_mapping_set(unsigned char *map, int nmap)
+{
+   return XSetPointerMapping(_ecore_x_disp, map, nmap);
+}
+
+EAPI int
+ecore_x_pointer_mapping_get(unsigned char *map, int nmap)
+{
+   return XGetPointerMapping(_ecore_x_disp, map, nmap);
+}
+
+EAPI int
 ecore_x_pointer_grab(Ecore_X_Window win)
 {
    if (XGrabPointer(_ecore_x_disp, win, False,
Index: trunk/e/src/bin/e_config.h
===================================================================
--- trunk/e/src/bin/e_config.h	(revision 35759)
+++ trunk/e/src/bin/e_config.h	(working copy)
@@ -33,7 +33,7 @@
 /* increment this whenever a new set of config values are added but the users
  * config doesn't need to be wiped - simply new values need to be put in
  */
-#define E_CONFIG_FILE_GENERATION 0x0124
+#define E_CONFIG_FILE_GENERATION 0x0125
 #define E_CONFIG_FILE_VERSION    ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
 
 #define E_EVAS_ENGINE_DEFAULT         0
@@ -243,6 +243,7 @@
    int         clientlist_limit_caption_len; // GUI
    int         clientlist_max_caption_len; // GUI
 
+   int         mouse_hand; //GUI
    int         mouse_accel_numerator; // GUI
    int         mouse_accel_denominator; // GUI
    int         mouse_accel_threshold; // GUI
Index: trunk/e/src/bin/e_config.c
===================================================================
--- trunk/e/src/bin/e_config.c	(revision 35759)
+++ trunk/e/src/bin/e_config.c	(working copy)
@@ -570,6 +570,7 @@
    E_CONFIG_VAL(D, T, clientlist_limit_caption_len, INT);
    E_CONFIG_VAL(D, T, clientlist_max_caption_len, INT);
    
+   E_CONFIG_VAL(D, T, mouse_hand, INT);
    E_CONFIG_VAL(D, T, mouse_accel_numerator, INT);
    E_CONFIG_VAL(D, T, mouse_accel_denominator, INT);
    E_CONFIG_VAL(D, T, mouse_accel_threshold, INT);
@@ -1531,6 +1532,10 @@
    e_config->thumbscroll_friction = 1.0;
    IFCFGEND;
    
+   IFCFG(0x0125);
+   e_config->mouse_hand = E_MOUSE_HAND_RIGHT;
+   IFCFGEND;
+   
    e_config->config_version = E_CONFIG_FILE_VERSION;   
      
 #if 0 /* example of new config */
@@ -1653,6 +1658,7 @@
    E_CONFIG_LIMIT(e_config->clientlist_sort_by, 0, 3);
    E_CONFIG_LIMIT(e_config->clientlist_separate_iconified_apps, 0, 2);
    E_CONFIG_LIMIT(e_config->clientlist_warp_to_iconified_desktop, 0, 1);
+   E_CONFIG_LIMIT(e_config->mouse_hand, 0, 1);
    E_CONFIG_LIMIT(e_config->clientlist_limit_caption_len, 0, 1);
    E_CONFIG_LIMIT(e_config->clientlist_max_caption_len, 2, E_CLIENTLIST_MAX_CAPTION_LEN);
    
Index: trunk/e/src/bin/e_mouse.h
===================================================================
--- trunk/e/src/bin/e_mouse.h	(revision 35759)
+++ trunk/e/src/bin/e_mouse.h	(working copy)
@@ -1,4 +1,11 @@
 #ifdef E_TYPEDEFS
+
+typedef enum _E_Mouse_Hand
+{
+   E_MOUSE_HAND_LEFT,
+   E_MOUSE_HAND_RIGHT
+} E_Mouse_Hand;
+
 #else
 #ifndef E_MOUSE_H
 #define E_MOUSE_H
Index: e/trunk/e/src/bin/e_mouse.c
===================================================================
--- e/trunk/e/src/bin/e_mouse.c	(revision 35759)
+++ e/trunk/e/src/bin/e_mouse.c	(working copy)
@@ -6,10 +6,23 @@
 EAPI int
 e_mouse_init(void)
 {
+   unsigned char map[256];
+   int n;
+
    if (!ecore_x_pointer_control_set(e_config->mouse_accel_numerator,
-					e_config->mouse_accel_denominator,
-					e_config->mouse_accel_threshold))
-					return 0;
-	   
+				    e_config->mouse_accel_denominator,
+				    e_config->mouse_accel_threshold))
+     return 0;
+
+   if (!(n = ecore_x_pointer_mapping_get(map, 256))) return 0;
+
+   if (((e_config->mouse_hand == E_MOUSE_HAND_LEFT) && (map[2] != 1)) ||
+       ((e_config->mouse_hand == E_MOUSE_HAND_RIGHT) && (map[0] != 1)))
+     {
+	const unsigned char tmp = map[0];
+	map[0] = map[2]; map[2] = tmp;
+	if (ecore_x_pointer_mapping_set(map, n)) return 0;
+     }
+
    return 1;
 }
Index: trunk/e/src/modules/conf_mouse/module.desktop.in
===================================================================
--- trunk/e/src/modules/conf_mouse/module.desktop.in	(revision 35759)
+++ trunk/e/src/modules/conf_mouse/module.desktop.in	(working copy)
@@ -1,25 +1,25 @@
 [Desktop Entry]
 Type=Link
-Name=Configuration - Mouse Acceleration
+Name=Configuration - Mouse Settings
 Name[de]=
-Name[eo]=Agordo - Musa plirapidigo
-Name[es]=Configuración - Aceleración del mouse
-Name[fr]=
-Name[hu]=Beállítások - Egér sebessége
-Name[it]=Configurazione - Accelerazione mouse
+Name[eo]=
+Name[es]=
+Name[fr]=Configuration - Paramètres de la souris
+Name[hu]=
+Name[it]=
 Name[ja]=
 Name[pt]=
 Name[pt_BR]=
 Name[zh_CN]=
 Name[zh_TW]=
 Icon=e-module-conf_mouse
-Comment=<hilight>E17 Configuration Applet</hilight><br><br>Configure mouse cursor acceleration.
+Comment=<hilight>E17 Configuration Applet</hilight><br><br>Configure mouse settings.
 Comment[de]=
-Comment[eo]=<hilight>Aplikaĵeto de E17 agordo<hilight><br><br>Agordi la musan plirapidigon.
-Comment[es]=<hilight>Applet de configuración de E17</hilight><br><br>Configure la aceleración del cursor del mouse.
-Comment[fr]=
-Comment[hu]=<hilight>E17 beállító alkalmazás</hilight><br><br>Egér kurzor sebességének beállítása.
-Comment[it]=<hilight>Applet configurazione di E17</hilight><br><br>Configura l'accelerazione del puntatore del mouse.
+Comment[eo]=
+Comment[es]=
+Comment[fr]=<hilight>Applet de configuration de E17</hilight><br><br>Permet de configurer les paramètres du curseur de la souris.
+Comment[hu]=
+Comment[it]=
 Comment[ja]=
 Comment[pt]=
 Comment[pt_BR]=
Index: trunk/e/src/modules/conf_mouse/e_mod_main.c
===================================================================
--- trunk/e/src/modules/conf_mouse/e_mod_main.c	(revision 35759)
+++ trunk/e/src/modules/conf_mouse/e_mod_main.c	(working copy)
@@ -25,14 +25,14 @@
 EAPI E_Module_Api e_modapi =
 {
    E_MODULE_API_VERSION,
-     "Configuration - Mouse Acceleration"
+     "Configuration - Mouse Settings"
 };
 
 EAPI void *
 e_modapi_init(E_Module *m)
 {
    e_configure_registry_category_add("keyboard_and_mouse", 40, _("Keyboard & Mouse"), NULL, "enlightenment/behavior");
-   e_configure_registry_item_add("keyboard_and_mouse/mouse_acceleration", 30, _("Mouse Acceleration"), NULL, "enlightenment/mouse_clean", e_int_config_mouse);
+   e_configure_registry_item_add("keyboard_and_mouse/mouse_settings", 30, _("Mouse Settings"), NULL, "enlightenment/mouse_clean", e_int_config_mouse);
    conf_module = m;
    e_module_delayed_set(m, 1);
    return m;
Index: trunk/e/src/modules/conf_mouse/e_int_config_mouse.c
===================================================================
--- trunk/e/src/modules/conf_mouse/e_int_config_mouse.c	(revision 35759)
+++ trunk/e/src/modules/conf_mouse/e_int_config_mouse.c	(working copy)
@@ -10,6 +10,7 @@
 {
    E_Config_Dialog *cfd;
    
+   int mouse_hand;
    double numerator;
    double denominator;
    double threshold;
@@ -32,7 +33,7 @@
    v->basic.create_widgets = _basic_create_widgets;
    v->override_auto_apply = 1;
    
-   cfd = e_config_dialog_new(con, _("Mouse Acceleration Settings"), "E", 
+   cfd = e_config_dialog_new(con, _("Mouse Settings"), "E", 
 			     "_config_mouse_dialog", 
 			     "enlightenment/mouse_clean", 0, v, NULL);
    return cfd;
@@ -41,6 +42,7 @@
 static void
 _fill_data(E_Config_Dialog_Data *cfdata)
 {
+   cfdata->mouse_hand = e_config->mouse_hand;
    cfdata->numerator = e_config->mouse_accel_numerator;
    cfdata->denominator = e_config->mouse_accel_denominator;
    cfdata->threshold = e_config->mouse_accel_threshold;
@@ -70,6 +72,8 @@
 static int
 _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
 {
+   e_config->mouse_hand = cfdata->mouse_hand;
+
    e_config->mouse_accel_numerator = cfdata->numerator;
    /* Force denominator to 1 for simplicity. */
    e_config->mouse_accel_denominator = 1;
@@ -86,8 +90,18 @@
 _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
 {
    Evas_Object *o, *of, *ob;
+   E_Radio_Group *rg;
+
    o = e_widget_list_add(evas, 0, 0);
 
+   of = e_widget_frametable_add(evas, _("Mouse Hand"), 0);
+   rg = e_widget_radio_group_new(&(cfdata->mouse_hand));
+   ob = e_widget_radio_icon_add(evas, NULL, "enlightenment/mouse_right", 48, 48, E_MOUSE_HAND_LEFT, rg);
+   e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
+   ob = e_widget_radio_icon_add(evas, NULL, "enlightenment/mouse_left", 48, 48, E_MOUSE_HAND_RIGHT, rg);
+   e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);
+   e_widget_list_object_append(o, of, 1, 1, 0.5);
+
    of = e_widget_framelist_add(evas, _("Mouse Acceleration"), 0);
 
    ob = e_widget_label_add(evas, _("Acceleration"));
Index: trunk/e/src/bin/e_main.c
===================================================================
--- trunk/e/src/bin/e_main.c	(revision 35759)
+++ trunk/e/src/bin/e_main.c	(working copy)
@@ -843,7 +843,7 @@
    /* setup mouse accel */
    if (!e_mouse_init())
      {
-       e_error_message_show(_("Enlightenment cannot configure the mouse acceleration settings."));
+       e_error_message_show(_("Enlightenment cannot configure the mouse settings."));
        _e_main_shutdown(-1);
      }
 
Index: trunk/e/config/default/e.src
===================================================================
--- trunk/e/config/default/e.src	(revision 35759)
+++ trunk/e/config/default/e.src	(working copy)
@@ -1,5 +1,5 @@
 group "E_Config" struct {
-  value "config_version" int: 65828;
+  value "config_version" int: 65829;
   value "show_splash" int: 1;
   value "init_default_theme" string: "default.edj";
   value "desktop_default_name" string: "Desktop %i, %i";
@@ -1901,6 +1901,7 @@
   value "clientlist_warp_to_iconified_desktop" int: 0;
   value "clientlist_limit_caption_len" int: 0;
   value "clientlist_max_caption_len" int: 2;
+  value "mouse_hand" int: 1;
   value "mouse_accel_numerator" int: 2;
   value "mouse_accel_denominator" int: 1;
   value "mouse_accel_threshold" int: 4;

Attachment: signature.asc
Description: PGP signature

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to