gok r2492 - in trunk: . gok



Author: dtb
Date: Mon Jun 23 18:41:57 2008
New Revision: 2492
URL: http://svn.gnome.org/viewvc/gok?rev=2492&view=rev

Log:
Corepointer now default, ref bug #537827; real community effort!


Modified:
   trunk/ChangeLog
   trunk/gok/gok-scanner.c
   trunk/gok/main.c
   trunk/gok/main.h

Modified: trunk/gok/gok-scanner.c
==============================================================================
--- trunk/gok/gok-scanner.c	(original)
+++ trunk/gok/gok-scanner.c	Mon Jun 23 18:41:57 2008
@@ -2321,7 +2321,9 @@
 	m_MouseX = x;
 	m_MouseY = y;
 	gok_scanner_perform_effects (m_pEffectsMouseMovement);
-	gok_scanner_input_motion_xevie (x, y);
+	if (gok_main_get_use_xevie()) {
+		gok_scanner_input_motion_xevie (x, y);
+	}
 }
 
 /**
@@ -3496,6 +3498,18 @@
 gboolean 
 gok_scanner_current_state_uses_core_mouse_button(int button)
 {
+	/* Special case dwell mode to always return FALSE?
+	 * This might improve interaction with 'clicker-like' tools
+	 * such as MouseTweaks. Waiting for related investigation to conclude.
+	 * see bug 538004 (and possibly 537827). Probably best if these tools
+	 * use gok in direcselection mode, which will probably require 538004 to
+	 * be fixed.
+	
+	if (!strcmp(m_pAccessMethodCurrent->Name,"dwellselection")){
+		return FALSE;
+	}	
+	 */
+	 
 	switch (button) {
 		case 1:
 			if (   (m_pEffectsLeftButtonDown != NULL)

Modified: trunk/gok/main.c
==============================================================================
--- trunk/gok/main.c	(original)
+++ trunk/gok/main.c	Mon Jun 23 18:41:57 2008
@@ -155,6 +155,7 @@
 	gboolean list_accessmethods;
 	char* usb_vid_pid;
 	gdouble valuator_sensitivity;
+	gboolean non_system_mouse;
 } GokArgs;
 
 static GokArgs gok_args;
@@ -337,6 +338,15 @@
 		N_("A multiplier to be applied to input device valuator events before processing"),
 		NULL
 	},
+	{
+		"non-system-mouse", 
+		'\0', 
+		0,
+		G_OPTION_ARG_NONE, 
+		&gok_args.non_system_mouse, 
+		N_("Attempt to use GOK without the system mouse"),
+		NULL
+	},
 	/* End the list */
 	{	NULL}
 };
@@ -393,6 +403,7 @@
 	args->selectactionname = NULL;
 	args->usb_vid_pid = NULL;
 	args->valuator_sensitivity = 0;
+	args->non_system_mouse = 0;
 }
 
 /* callback for gok window state events */
@@ -637,8 +648,10 @@
 	
 	    if (ret != Bonobo_ACTIVATION_REG_SUCCESS)
 	    {
-		if (gok_args.is_login)
-		    return 1;
+		if (gok_args.is_login) {
+			g_warning ("GOK running in login mode with a failed bonobo activation");
+		    /* return 1; */
+		}
 		else {
 		    gchar *reason = NULL;
 		    if (ret == Bonobo_ACTIVATION_REG_ALREADY_ACTIVE) reason = "already active";
@@ -1847,6 +1860,8 @@
 			     "signal::destroy", on_window1_destroy, NULL,
 			     NULL);
 
+	gtk_window_set_keep_above (window1, TRUE); /* please! */
+	
 	g_set_application_name (_("GOK"));
 	gtk_window_set_default_icon_name ("gok");
 
@@ -2910,6 +2925,18 @@
 	return gok_args.valuator_sensitivity;
 }
 
+gboolean
+gok_main_get_use_corepointer (void) {
+	return !gok_args.non_system_mouse && !gok_args.inputdevicename;
+}
+
+gboolean
+gok_main_get_use_xevie (void) {
+	/* TODO: make xevie a user option
+	 */
+	return xevie_dpy && !gok_main_get_use_corepointer();
+}
+
 /**
 * gok_main_get_geometry
 *
@@ -3149,7 +3176,7 @@
 gok_main_warn (gchar *message, gboolean always, GCallback cancelfunc, GCallback okfunc, gboolean opt_out)
 {
 
-	if (always || gok_scanner_current_state_uses_corepointer ()) 
+	if (!gok_main_get_use_corepointer() && ( always || gok_scanner_current_state_uses_corepointer() )) 
 	{
 		GtkWidget*	button;
 

Modified: trunk/gok/main.h
==============================================================================
--- trunk/gok/main.h	(original)
+++ trunk/gok/main.h	Mon Jun 23 18:41:57 2008
@@ -93,6 +93,8 @@
 gdouble gok_main_get_valuatorsensitivity_override (void);
 gboolean gok_main_get_extras (void);
 gboolean gok_main_get_login (void);
+gboolean gok_main_get_use_corepointer (void);
+gboolean gok_main_get_use_xevie (void);
 gchar* gok_main_get_inputdevice_name (void);
 void gok_main_check_accessibility (void);
 void gok_main_warn_corepointer (gboolean always, gboolean configuring, gboolean opt_out);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]