SVN revision: 14404
devs/princeamd/enlightenment-0.17-elive
sebastid 18 years ago committed by sebastid
parent 31caefbbe8
commit 33a0a7905d
  1. 21
      src/bin/e_dnd.c
  2. 22
      src/bin/e_moveresize.c

@ -10,6 +10,8 @@ static Ecore_X_Window drag_win;
static Ecore_Evas *drag_ee = NULL;
static Evas_Object *drag_obj;
static int visible = 0;
static char *drag_type;
static void *drag_data;
@ -133,10 +135,15 @@ e_drag_update(int x, int y)
if (!drag_ee) return;
evas_object_geometry_get(drag_obj, NULL, NULL, &w, &h);
evas_object_show(drag_obj);
ecore_evas_show(drag_ee);
if (!visible)
{
evas_object_show(drag_obj);
ecore_evas_show(drag_ee);
ecore_evas_raise(drag_ee);
visible = 1;
}
evas_object_geometry_get(drag_obj, NULL, NULL, &w, &h);
ecore_evas_move(drag_ee, x - (w / 2), y - (h / 2));
}
@ -146,13 +153,19 @@ e_drag_end(int x, int y)
Evas_List *l;
E_Drop_Event *ev;
evas_object_del(drag_obj);
if (drag_obj)
{
evas_object_del(drag_obj);
drag_obj = NULL;
}
if (drag_ee)
{
e_canvas_del(drag_ee);
ecore_evas_free(drag_ee);
drag_ee = NULL;
}
visible = 0;
ecore_x_pointer_ungrab();
ecore_x_keyboard_ungrab();
ecore_x_window_del(drag_win);

@ -3,8 +3,10 @@
*/
#include "e.h"
Ecore_Evas *_ee = NULL;
Evas_Object *_obj = NULL;
static Ecore_Evas *_ee = NULL;
static Evas_Object *_obj = NULL;
static int visible = 0;
void e_resize_begin(E_Zone *zone, int w, int h)
{
@ -22,7 +24,6 @@ void e_resize_begin(E_Zone *zone, int w, int h)
ecore_evas_software_x11_direct_resize_set(_ee, 1);
e_canvas_add(_ee);
ecore_evas_borderless_set(_ee, 1);
ecore_evas_show(_ee);
_obj = edje_object_add(ecore_evas_get(_ee));
e_theme_edje_object_set(_obj, "base/theme/borders",
@ -41,6 +42,9 @@ void e_resize_begin(E_Zone *zone, int w, int h)
ecore_evas_resize(_ee, ew, eh);
ecore_evas_show(_ee);
ecore_evas_raise(_ee);
visible = 1;
}
void e_resize_end(void)
@ -56,6 +60,7 @@ void e_resize_end(void)
ecore_evas_free(_ee);
_ee = NULL;
}
visible = 0;
}
void e_resize_update(int w, int h)
@ -116,6 +121,7 @@ void e_move_end(void)
ecore_evas_free(_ee);
_ee = NULL;
}
visible = 0;
}
void e_move_update(int x, int y)
@ -124,8 +130,14 @@ void e_move_update(int x, int y)
if (!_ee) return;
evas_object_show(_obj);
ecore_evas_show(_ee);
if (!visible)
{
evas_object_show(_obj);
ecore_evas_show(_ee);
ecore_evas_raise(_ee);
visible = 1;
}
snprintf(buf, sizeof(buf) - 1, "%i %i", x, y);
edje_object_part_text_set(_obj, "text", buf);
}

Loading…
Cancel
Save