Hello,

here is a little patch for exige that moves the window under the mouse
pointer so that people that doesn't use mouse click focus policy can
type something in the text box right away. It is useful if you use a key
binding to open exige.

Plus, the patch remove the Emotion.h include that is not needed (I
think) for that project.

Here is a possible key binding for exige :

enlightenment_remote -binding-key-add ANY "p" "CTRL|ALT" 0 "exec"
"exige"

Jonathan

On Sun, 2005-06-05 at 00:52 +0200, Mathieu Lamar wrote:
> Hello, 
> I wrote a little EFL run application dialog
> http://www.deviantart.com/deviation/19072694/
> Here is its source code.
> It's just a start.
> 
> Regards
> Mathieu Lamar.
diff -Naur exige (copy)/src/exg_gui.c exige/src/exg_gui.c
--- exige (copy)/src/exg_gui.c	2005-06-04 18:22:26.000000000 -0400
+++ exige/src/exg_gui.c	2005-06-05 09:16:01.000000000 -0400
@@ -60,6 +60,8 @@
 exg_window_geometry_set(Exige *exg)
 {
     Evas_Coord w,h;
+	int mouse_x = 0, mouse_y = 0;
+	Ecore_X_Window x_win = ecore_evas_software_x11_window_get(exg->ee);
  
     edje_object_size_min_get(exg->gui, &w, &h);
     ecore_evas_resize(exg->ee, w, h);
@@ -68,6 +70,10 @@
     ecore_evas_size_max_set(exg->ee,w,h);
     
     ecore_evas_show(exg->ee);
+
+	/* get the coords. of the mouse */
+	ecore_x_pointer_xy_get(x_win, &mouse_x, &mouse_y);
+	ecore_evas_move(exg->ee, mouse_x-(w/2), mouse_y-(h/2));
    
     evas_object_move(exg->gui,0,0);
     evas_object_resize(exg->gui,w,h);
diff -Naur exige (copy)/src/Exige.h exige/src/Exige.h
--- exige (copy)/src/Exige.h	2005-06-05 09:18:50.000000000 -0400
+++ exige/src/Exige.h	2005-06-05 09:16:39.000000000 -0400
@@ -7,7 +7,6 @@
 #include <Ecore_Evas.h>
 #include <Esmart/Esmart_Text_Entry.h>
 #include <Edje.h>
-#include <Emotion.h>
 #include <Ecore_Config.h>
 #include "config.h"
 

Reply via email to