AutoHotkey Community

It is currently May 25th, 2012, 1:36 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: July 12th, 2007, 8:32 pm 
Is there a function to return this? I want to know if it's a fullscreen app or a normal app, and then turn off things like the Windows key if it's fullscreen. WinGetPos doesn't seem like it would work.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 12th, 2007, 9:33 pm 
Online
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8648
Location: Salem, MA
WinGet, MinMax or Winget Style or Winget ExStyle should giev you enough information, or at least close enough?

you could also compare WinGetPos with A_ScreenWidth and A_ScreenHeight

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2007, 10:49 am 
Offline

Joined: October 3rd, 2005, 2:42 am
Posts: 186
It's not immediately obvious to me which of the style settings could be guaranteed to be always set in a fullscreen window, and to never be set in, say, a merely maximized window. There doesn't seem to be a WS_FULLSCREEN or anything similar listed anywhere.

By "Fullscreen" I mean: no window trimmings. Hitting start button either does nothing, or minimizes the application. Applicaton has full control over the video card, so can make maximum use of directx/opengl acceleration.

By "Maximized" I mean: window trimmings (such as minimise button, etc) visible. Hitting Start button causes start menu to appear and overlay the maximized window.

Is there a guaranteed way to tell if an app is fullscreen?

_________________
Yet another hotkeyer.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2007, 11:10 am 
Offline

Joined: July 20th, 2007, 10:23 am
Posts: 257
Location: Paris, France
Maybe you can check if the window has not the WS_CAPTION style (eg no title bar)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2007, 4:22 pm 
Offline

Joined: October 3rd, 2005, 2:42 am
Posts: 186
Install programs generally run maximized, with no trimmings, and on-top, but not "fullscreen" by the above definition.

Reason I ask is I want to be able to tell whether a program running would object to having a window grab focus.
Fullscreen games would object strongly, might crash, might kill the character.
Fullscreen youtube videos would minimise.

Maximised-but-windowed apps generally handle it better than fullscreen apps. For exaple, install programs don't usually mind a bit if you pop a window in front of them, because they are "proper windows".

Trouble is, I'm not sure if there's an OS-detectable state to say "the application with focus has taken control of the video and is not letting windows do its windowsy stuff."

Treating such applications well (and disabling noncritical popup windows in a script when such applications have focus) is a "tax" that all good scripts probably ought to pay.

_________________
Yet another hotkeyer.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2007, 9:49 pm 
Online
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8648
Location: Salem, MA
some fullscreen apps change the resolution, you could maybe detect that the resolution has changed?

also, I remember (older) fullscreen games that still have a title bar, etc, but they were off the screen, so checking for the caption style may not be the right thing.

as far as taxes, I would see (without knowing anything about your app) if you can eliminate some of the notifications, or allow the user to disable them temporarily. For example, windows will tell me that my desktop has unused icons while I am watching a movie or something, and that's really annoying. If there was a way to globally tell all programs that I don't want to be bothered, then it would wait till later. I understand that this is pretty much what you are proposing, but it's also useful to pop up less things, or pop up without stealing focus.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2007, 11:43 pm 
Offline

Joined: October 3rd, 2005, 2:42 am
Posts: 186
Trouble is, screen resolution doesn't always change, and only acting politely sometimes isn't good enough for me.

One of the things I've noticed about fullscreen apps in Win2k and above is that they are always listed first in the alt-tab list. This suggests that Windows does know what makes a fullscreen app count as "fullscreen", but goodness knows how they do it.

For me, the main apps affected by this is my "when the mouse moved to the hot corner, pop up the Trillian contact list" script. Which is a pretty low-priority thing. I just disable the script when playing a fullscreen game that allows cursor movement.

However, I do want to know the answer anyway, since I like knowing how to pay my "taxes" properly. That, and because I hate kludging where I suspect there might be a more elegant and canonical answer :)

_________________
Yet another hotkeyer.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2007, 12:07 am 
Online
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8648
Location: Salem, MA
the active window is always first in the alt-tab list

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 2nd, 2007, 2:55 pm 
Offline

Joined: October 3rd, 2005, 2:42 am
Posts: 186
Nope. The alt-tab list is organised by Z-order.

So bring up, say, task manager, and a couple of explorer windows. Alt-tab all you want, tarkman will remain as the first item in the list.

So: fullscreen windows are always-on-top, are SysGet -> SM_CXFULLSCREEN x SM_CYFULLSCREEN rather than SysGet -> SM_CXMAXIMIZED x SM_CYMAXIMIZED, are on the primary screen, and are not minimised.

Even on a single-monitor system, it is not safe to assume they are the active application, as there may be virtual desktops, virtual monitors, remote monitors (Synergy), etc.

Trouble is, if you can have a window fullscreened on a monitor other than the main one (not sure if you can) then you might not spot some fullscreen apps. In that case, need a way to get the equivalent of AM_CX/YFULLSCREEN for monitors other than the default.

_________________
Yet another hotkeyer.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: AndyJenk, CodeKiller, Prankie, Pulover, Tegno, toddintr and 17 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group