Check application visibility

This is a discussion on Check application visibility within the Linux Programming forums, part of the Platform Specific Boards category; What I'm wanting to do is if the screensaver kicks in or a full screen game is started I want ...

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    62

    Check application visibility

    What I'm wanting to do is if the screensaver kicks in or a full screen game is started I want my program to pause (sleep). Is this possible?

    Alternatively, I'm wanting to be able to check if a particular applications window is visible to the user. Is there an application that can check that and return the result?

    I've been doing some searching on google and the closest I've found is the below code (which is pygtk)....however this is to check an applications own visibility, not another applications visibility. Any help or direction much appreciated. I'm wanting something that can return the visibility status of any application...


    To check if a gtk.Window is visible you can use the visible property inherited from gtk.Widget.

    self.window =3D gtk.Window()
    self.window.show()
    self.window.get_property("visible")

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,045
    What I'm wanting to do is if the screensaver kicks in or a full screen game is started I want my program to pause (sleep). Is this possible?
    It's possible, I don't know how you do it in anything but the SDL, though.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    62
    Quote Originally Posted by dwks
    It's possible, I don't know how you do it in anything but the SDL, though.
    Are you referring to the:
    Simple Declarative Language
    or
    Simple DirectMedia Layer

    Could you give me some pointers on how to do this any way you know how.

    Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BN_CLICKED, change button style
    By bennyandthejets in forum Windows Programming
    Replies: 13
    Last Post: 07-05-2010, 11:42 PM
  2. can not debug pocket pc application
    By George2 in forum Windows Programming
    Replies: 2
    Last Post: 11-08-2007, 10:06 PM
  3. Problem with com application
    By amardon in forum C++ Programming
    Replies: 3
    Last Post: 10-06-2005, 05:50 AM
  4. Windows form application and Windows application
    By |Wiz| in forum Windows Programming
    Replies: 5
    Last Post: 10-01-2005, 04:14 PM
  5. Replies: 1
    Last Post: 09-18-2005, 09:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21