window at mouse pointer


#1

hi all,

is it possible to create a window at mouse pointer?


#2

you can use the draggerContext command to get the mouse position, which you could then feed to the window -tlc flag to build a window at a specific point. However this only works on a viewport, so you wouldn’t be able to do this wherever you liked (i.e. over another UI).

You can get more complex mouse info/functionality from the API via python though, but I can’t tell you much about doing it that way…

:nathaN


#3

thanks NaughtyNathan

but that does’nt work.

correct me if i m wrong

i think there are two different spaces 1. screen space and 2. UI space

both r having different coordinates. context is working on screen & window is on UI

that is the reason i m not getting window at mouse position


#4

If you’re relying on mel I cant help, but if you have no problem doing it with python - you just need to install ‘xlib’ package and than just use this:
source:
http://snipplr.com/view/19188/mouseposition-on-linux-via-xlib/

[ol]
[li]from Xlib import X, display[/li][li]d = display.Display().screen().root.query_pointer()._data[/li]
[li]print "x="[/li][li]print d["root_x"][/li][li]print "y="[/li][li]print d["root_y"][/li][/ol]

oops, forgot to mention it’s for linux only


#5

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.