View Full Version : window at mouse pointer

01 January 2011, 11:46 AM
hi all,

is it possible to create a window at mouse pointer?

01 January 2011, 02:31 PM
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...


02 February 2011, 05:01 AM
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

02 February 2011, 05:03 PM
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:

from Xlib import X, display
d = display.Display().screen().root.query_pointer()._data

print "x="
print d["root_x"]
print "y="
print d["root_y"]

oops, forgot to mention it's for linux only

CGTalk Moderation
02 February 2011, 05:03 PM
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.