It seems that by using the interactive "move" command, I can
get an adesklet to within 1 pixel of the bottom of the
screen, but I can't get it flush against the bottom. The same
problem exists moving it to the far right. However, there is
no problem moving it to the top of the screen or the left. Is
this a known issue? Manually modifying ~/.adesklets is a
workaround, but this seems like a bug. I wrote a patch to
correct it, included below. I'd be happy to discuss its pros
and cons.
--- adesklets-0.4.5/src/xwindow.c.orig 2005-03-11 23:06:11.000000000 -0800
+++ adesklets-0.4.5/src/xwindow.c 2005-03-11 23:06:11.000000000 -0800
@@ -414,7 +414,7 @@
root, cursor, 0)==GrabSuccess) {
/* Draw initial rectangle */
XDrawRectangle(display,root,gc,
- attr.x,attr.y,attr.width,attr.height);
+ attr.x,attr.y,attr.width-1,attr.height-1);
dummy=0;
do {
XWindowEvent(display,root,
@@ -431,7 +431,7 @@
if(dummy) {
/* Erase final rectangle */
XDrawRectangle(display,root,gc,
- old_x,old_y,attr.width,attr.height);
+ old_x,old_y,attr.width-1,attr.height-1);
result=1;
}
break;
@@ -440,17 +440,17 @@
x=attr.x+(ev.xmotion.x-grab_x);
y=attr.y+(ev.xmotion.y-grab_y);
/* Rectifies it */
- x=((x+attr.width)<screen_width)?x:screen_width-attr.width-1;
- y=((y+attr.height)<screen_height)?y:screen_height-attr.height-1;
+ x=((x+attr.width)<screen_width)?x:screen_width-attr.width;
+ y=((y+attr.height)<screen_height)?y:screen_height-attr.height;
x=(x>0)?x:0;
y=(y>0)?y:0;
/* Draw rectangles: we use a GCxor function for
not having to remember background data. */
if (x!=old_x || y!=old_y) {
XDrawRectangle(display,root,gc,
- old_x,old_y,attr.width,attr.height);
+ old_x,old_y,attr.width-1,attr.height-1);
XDrawRectangle(display,root,gc,
- x,y,attr.width,attr.height);
+ x,y,attr.width-1,attr.height-1);
}
/* Save coordinates */
old_x=x; old_y=y;