aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-01-22 09:40:04 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-01-22 09:40:04 +0000
commit9b0304c03b374722b10087f876f1f2c19f9fefc0 (patch)
tree9e01063878d8825f3bda79bc5871d196ecbef381
parent2acecac6c453b0dbe5f178c0b8cf5a11bb6e5a86 (diff)
downloadenlightenment-9b0304c03b374722b10087f876f1f2c19f9fefc0.tar.gz
enlightenment-9b0304c03b374722b10087f876f1f2c19f9fefc0.tar.xz
enlightenment-9b0304c03b374722b10087f876f1f2c19f9fefc0.zip
backport previous gadget fix
SVN revision: 83064
-rw-r--r--ChangeLog2
-rw-r--r--NEWS1
-rw-r--r--src/modules/gadman/e_mod_gadman.c6
3 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f6a5677f..ea4ed24a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
2013-01-22 Mike Blumenkrantz
* No longer build illume edj files
+ * fixed gadget dragging on desktop near screen edges
+ * fixed bug where backlight settings would try to update dummy backlight devices
2013-01-11 Mike Blumenkrantz
diff --git a/NEWS b/NEWS
index 76b5b523e..5fe1a6f1f 100644
--- a/NEWS
+++ b/NEWS
@@ -31,3 +31,4 @@ Fixes:
* fixed bug where starting with a nonexistent config could cause a crash instead of simply restarting
* fixed window border hide bug where after iconification hides leave ghosts
* fixed bug where backlight settings would try to update dummy backlight devices
+ * fixed gadget dragging on desktop near screen edges
diff --git a/src/modules/gadman/e_mod_gadman.c b/src/modules/gadman/e_mod_gadman.c
index f1cf237e2..71b10a3f1 100644
--- a/src/modules/gadman/e_mod_gadman.c
+++ b/src/modules/gadman/e_mod_gadman.c
@@ -673,10 +673,8 @@ _gadman_gadcon_dnd_move_cb(E_Gadcon *gc, E_Gadcon_Client *gcc)
evas_object_geometry_get(mover, &ox, &oy, &ow, &oh);
/* don't go out of the screen */
- if (x < 0) x = 0;
- if (x > (Man->width - ow)) x = Man->width - ow;
- if (y < 0) y = 0;
- if (y > (Man->height - oh)) y = Man->height - oh;
+ x = MAX(x, gcc->dx), y = MAX(y, gcc->dy);
+ x = MIN(x, Man->width - ow + gcc->dx), y = MIN(y, Man->height - ow + gcc->dy);
evas_object_move(gcc->o_frame, x - gcc->dx, y - gcc->dy);
evas_object_move(mover, x - gcc->dx, y - gcc->dy);