ssanthosh243 / semicomplete

Automatically exported from code.google.com/p/semicomplete
0 stars 0 forks source link

Can't do mouse "drag" #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

If I do something like:
  xdotool mousemove 0 0   && 
  xdotool mousedown 1     && 
  xdotool mousemove 10 10 && 
  xdotool mouseup 1

I expect the mouse to drag something from (0,0) to (10,10). But when
mousemove is preformed, the mousedown status seems to be ignored...

Original issue reported on code.google.com by lorenzo....@gmail.com on 21 Feb 2010 at 11:21

GoogleCodeExporter commented 9 years ago
Sorry, it works most of the time. But not with the "drag" I tested: on Gnome, I 
can't
drag a button in the taskbar (Gnome Panel) to switch order with another one... 
Very
strange...

Original comment by lorenzo....@gmail.com on 21 Feb 2010 at 11:56

GoogleCodeExporter commented 9 years ago
Thanks for the report! It's on the todo list and I'll see what I can come up 
with for 
a fix :)

Original comment by jls.semi...@gmail.com on 22 Feb 2010 at 11:32

GoogleCodeExporter commented 9 years ago
Actually, one thing I do remember. keynav uses xdotool, and to implement 
dragging in 
keynav (using libxdo) required a hack for some window managers.

When activating drag, I'd have to send mouse down, then 'wiggle' the mouse one 
pixel 
and back before proceeding. See the cmd_drag function in keynav.c

http://code.google.com/p/semicomplete/source/browse/keynav/keynav.c#860

I don't really have any explanation for this requirement.

If you can, try arranging your commands like this and let me know if it works 
more 
reliably:

xdotool mousemove 0 0
xdotool mousedown 1

# wiggle
xdotool mousemove_relative 0 1    
xdotool mousemove_relative 0 -

xdotool mousemove 10 10
xdotool mouseup 1

Original comment by jls.semi...@gmail.com on 22 Feb 2010 at 11:36

GoogleCodeExporter commented 9 years ago
On another note, would it be useful to have 'xdotool drag' ?

by this I mean:

xdotool drag 1 x1 y1 x2 y2 ... xN yN

This would drag starting at x1,y1 using mouse button 1

Original comment by jls.semi...@gmail.com on 24 Feb 2010 at 9:10

GoogleCodeExporter commented 9 years ago
has this been solved? i have been trying to do it but it is not working.
the wiggle trick kinda works but not always

* Running Fedora 20 with KDE 4.14

Original comment by fdura...@gmail.com on 31 Oct 2014 at 4:24

GoogleCodeExporter commented 9 years ago
If you're experiencing this, then I bet it wasn't fixed. Bummer.

I'll work on a fix when I can (time is limited these days), assuming nobody 
else gets to fixing it first.

Original comment by j...@semicomplete.com on 2 Nov 2014 at 6:22