parent
31caefbbe8
commit
33a0a7905d
|
@ -10,6 +10,8 @@ static Ecore_X_Window drag_win;
|
||||||
static Ecore_Evas *drag_ee = NULL;
|
static Ecore_Evas *drag_ee = NULL;
|
||||||
static Evas_Object *drag_obj;
|
static Evas_Object *drag_obj;
|
||||||
|
|
||||||
|
static int visible = 0;
|
||||||
|
|
||||||
static char *drag_type;
|
static char *drag_type;
|
||||||
static void *drag_data;
|
static void *drag_data;
|
||||||
|
|
||||||
|
@ -133,10 +135,15 @@ e_drag_update(int x, int y)
|
||||||
|
|
||||||
if (!drag_ee) return;
|
if (!drag_ee) return;
|
||||||
|
|
||||||
evas_object_geometry_get(drag_obj, NULL, NULL, &w, &h);
|
if (!visible)
|
||||||
evas_object_show(drag_obj);
|
{
|
||||||
ecore_evas_show(drag_ee);
|
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));
|
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;
|
Evas_List *l;
|
||||||
E_Drop_Event *ev;
|
E_Drop_Event *ev;
|
||||||
|
|
||||||
evas_object_del(drag_obj);
|
if (drag_obj)
|
||||||
|
{
|
||||||
|
evas_object_del(drag_obj);
|
||||||
|
drag_obj = NULL;
|
||||||
|
}
|
||||||
if (drag_ee)
|
if (drag_ee)
|
||||||
{
|
{
|
||||||
e_canvas_del(drag_ee);
|
e_canvas_del(drag_ee);
|
||||||
ecore_evas_free(drag_ee);
|
ecore_evas_free(drag_ee);
|
||||||
drag_ee = NULL;
|
drag_ee = NULL;
|
||||||
}
|
}
|
||||||
|
visible = 0;
|
||||||
|
|
||||||
ecore_x_pointer_ungrab();
|
ecore_x_pointer_ungrab();
|
||||||
ecore_x_keyboard_ungrab();
|
ecore_x_keyboard_ungrab();
|
||||||
ecore_x_window_del(drag_win);
|
ecore_x_window_del(drag_win);
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
*/
|
*/
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
Ecore_Evas *_ee = NULL;
|
static Ecore_Evas *_ee = NULL;
|
||||||
Evas_Object *_obj = NULL;
|
static Evas_Object *_obj = NULL;
|
||||||
|
|
||||||
|
static int visible = 0;
|
||||||
|
|
||||||
void e_resize_begin(E_Zone *zone, int w, int h)
|
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);
|
ecore_evas_software_x11_direct_resize_set(_ee, 1);
|
||||||
e_canvas_add(_ee);
|
e_canvas_add(_ee);
|
||||||
ecore_evas_borderless_set(_ee, 1);
|
ecore_evas_borderless_set(_ee, 1);
|
||||||
ecore_evas_show(_ee);
|
|
||||||
|
|
||||||
_obj = edje_object_add(ecore_evas_get(_ee));
|
_obj = edje_object_add(ecore_evas_get(_ee));
|
||||||
e_theme_edje_object_set(_obj, "base/theme/borders",
|
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_resize(_ee, ew, eh);
|
||||||
|
|
||||||
ecore_evas_show(_ee);
|
ecore_evas_show(_ee);
|
||||||
|
ecore_evas_raise(_ee);
|
||||||
|
|
||||||
|
visible = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void e_resize_end(void)
|
void e_resize_end(void)
|
||||||
|
@ -56,6 +60,7 @@ void e_resize_end(void)
|
||||||
ecore_evas_free(_ee);
|
ecore_evas_free(_ee);
|
||||||
_ee = NULL;
|
_ee = NULL;
|
||||||
}
|
}
|
||||||
|
visible = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void e_resize_update(int w, int h)
|
void e_resize_update(int w, int h)
|
||||||
|
@ -116,6 +121,7 @@ void e_move_end(void)
|
||||||
ecore_evas_free(_ee);
|
ecore_evas_free(_ee);
|
||||||
_ee = NULL;
|
_ee = NULL;
|
||||||
}
|
}
|
||||||
|
visible = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void e_move_update(int x, int y)
|
void e_move_update(int x, int y)
|
||||||
|
@ -124,8 +130,14 @@ void e_move_update(int x, int y)
|
||||||
|
|
||||||
if (!_ee) return;
|
if (!_ee) return;
|
||||||
|
|
||||||
evas_object_show(_obj);
|
if (!visible)
|
||||||
ecore_evas_show(_ee);
|
{
|
||||||
|
evas_object_show(_obj);
|
||||||
|
ecore_evas_show(_ee);
|
||||||
|
ecore_evas_raise(_ee);
|
||||||
|
|
||||||
|
visible = 1;
|
||||||
|
}
|
||||||
snprintf(buf, sizeof(buf) - 1, "%i %i", x, y);
|
snprintf(buf, sizeof(buf) - 1, "%i %i", x, y);
|
||||||
edje_object_part_text_set(_obj, "text", buf);
|
edje_object_part_text_set(_obj, "text", buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue