Enlightenment CVS committal

Author  : davemds
Project : e17
Module  : libs/etk

Dir     : e17/libs/etk/src/lib


Modified Files:
        etk_tooltips.c 


Log Message:
* Fix tooltips placement. Also if the main window is not an Etk_Window. 
* Reenable tooltips so that we can find and fix bugs.

===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_tooltips.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- etk_tooltips.c      8 Jul 2008 04:47:16 -0000       1.17
+++ etk_tooltips.c      5 Aug 2008 21:14:20 -0000       1.18
@@ -84,7 +84,7 @@
  */
 void etk_tooltips_enable()
 {
-   //_etk_tooltips_enabled = ETK_TRUE;
+   _etk_tooltips_enabled = ETK_TRUE;
 }
 
 /**
@@ -200,7 +200,7 @@
    Etk_Toplevel *toplevel;
    Evas *evas;
    int pt_x, pt_y;
-   int win_x, win_y;
+   int win_x, win_w;
 
    if(!ETK_IS_OBJECT(widget))
      return;
@@ -225,15 +225,10 @@
 
    etk_label_set(ETK_LABEL(_etk_tooltips_label), text);
 
-   evas = etk_widget_toplevel_evas_get(widget);
-   evas_pointer_canvas_xy_get(evas, &pt_x, &pt_y);
-   toplevel = etk_widget_toplevel_parent_get(widget);
-   etk_window_geometry_get(ETK_WINDOW(toplevel), &win_x, &win_y, NULL, NULL);
-   x = pt_x + win_x;
-   y = pt_y + win_y;
+   etk_engine_mouse_position_get(&x, &y);
 
    /* TODO: if tooltip window is outside screen, fix its place */
-   etk_window_move(ETK_WINDOW(_etk_tooltips_window), x + 5, y + 5);
+   etk_window_move(ETK_WINDOW(_etk_tooltips_window), x - 10, y + 20);
    etk_widget_show_all(_etk_tooltips_window);
    free(key);
 



-------------------------------------------------------------------------
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-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to