Results 1 to 4 of 4

Thread: How can I get the global mouse event in Ubuntu?

  1. #1
    Join Date
    Dec 2014
    Posts
    2
    Qt products
    Qt5

    Smile How can I get the global mouse event in Ubuntu?

    When I drag a file, I want to wake my program up, how?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How can I get the global mouse event in Ubuntu?

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Dec 2014
    Posts
    2
    Qt products
    Qt5

    Default Re: How can I get the global mouse event in Ubuntu?

    Quote Originally Posted by wysota View Post
    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.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How can I get the global mouse event in Ubuntu?

    Quote Originally Posted by adorehb View Post
    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Ogre+qt mouse event (add object with mouse problem)
    By rimie23 in forum Qt Programming
    Replies: 7
    Last Post: 24th April 2012, 10:49
  2. Replies: 3
    Last Post: 7th January 2012, 08:38
  3. catch global mouse press event
    By nick85 in forum Newbie
    Replies: 3
    Last Post: 15th June 2011, 13:37
  4. WM_LBUTTONDBLCLK message and global mouse hook
    By rittchat in forum Qt Programming
    Replies: 18
    Last Post: 10th December 2010, 04:58
  5. How to know current global mouse position?
    By Teerayoot in forum Qt Programming
    Replies: 2
    Last Post: 11th May 2007, 19:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.