PDA

View Full Version : How can I get the global mouse event in Ubuntu?



adorehb
2nd December 2014, 06:59
When I drag a file, I want to wake my program up, how?

wysota
2nd December 2014, 07:16
What do you mean by "wake my program up"? In what way do you consider it "sleeping"? Regardless, you'll have to tap into your platform's (X11?) event dispatching system.

adorehb
2nd December 2014, 07:19
What do you mean by "wake my program up"? In what way do you consider it "sleeping"? Regardless, you'll have to tap into your platform's (X11?) event dispatching system.

Thank you first, I was meaning to say that my program is in the background.

Which api in x11 could be used? Any ideas would be gratefully recieved.

wysota
2nd December 2014, 08:24
Thank you first, I was meaning to say that my program is in the background.
This still doesn't say what do you mean by waking it up.


Which api in x11 could be used? Any ideas would be gratefully recieved.

Google for "intercepting X11 events". You will probably be able to use QAbstractNativeEventFilter once you manage to redirect the desired events to your application.