Closed Bug 617052 Opened 15 years ago Closed 15 years ago

Use ITaskbarList2::MarkFullscreenWindow for proper windows taskbar integration

Categories

(Core :: Widget: Win32, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: jimm, Assigned: bbondy)

References

(Depends on 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

http://msdn.microsoft.com/en-us/library/bb774640(v=VS.85).aspx We should support this via widget. It should help cleanup some of the full screen / taskbar z-order issues we have.
Assignee: nobody → netzen
Depends on: 680227
This does fix the problem with the auto hide taskbars by the way. The thing is that we use ITaskbarList4 which requires Windows 7 but this function is available in XP which would be nice to have. I added Bug 680227. I will use this bug as the autohide fix for Windows 7.
This fixes the auto hide taskbar problem. I extended nsIWintaskbar for this call. The extra version of prepareFullScreen with nsIDOMWindow was done because I think there are some tasks coming up that allows web content to control full screen in the "Web API". Let me know if there is a way to get a nsIDOMWindow from a nsWindow.
Attachment #554223 - Flags: review?(jmathies)
Blocks: 646374
Comment on attachment 554223 [details] [diff] [review] Patch for letting the taskbar know when we are going into full screen mode. Review of attachment 554223 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/public/nsIWinTaskbar.idl @@ +194,5 @@ > + * > + * @thow NS_ERROR_INVALID_ARG if the window is not a valid top level window > + * @thow NS_ERROR_UNEXPECTED for general failures. > + */ > + void prepareFullScreenHWND(in voidPtr aWindow, in boolean aFullScreen); We should mark this with [noscript] for now. (With ctypes we might actually be able to do this at some point but i don't believe we support native handles yet.) Besides I don't think we want to expose this to script until we have a good reason to do so. Also, will we run into any problems on 64-bit builds passing a HANDLE through this interface? ::: widget/src/windows/WinTaskbar.cpp @@ +452,5 @@ > + > + return PrepareFullScreenHWND(toplevelHWND, aFullScreen); > +} > + > +/* void prepareFullScreen(in nsIDOMWindow aWindow, in boolean aFullScreen); */ nit - comment copy paste error ::: widget/src/windows/nsWindow.cpp @@ +2726,5 @@ > } > > + if (!aFullScreen) { > + // Notify the taskbar that we have exited full screen mode. > + if (taskbarInfo) { Might as well combine these together into a single if.
Thanks for the quick review :) > Also, will we run into any problems on 64-bit builds passing a HANDLE through this interface? No we wouldn't run into problems on x64 compiled apps because a HWND is a HANDLE which is a void* which would be 8 bytes on x64.
Comment on attachment 554223 [details] [diff] [review] Patch for letting the taskbar know when we are going into full screen mode. cool. r+ with nits addressed.
Attachment #554223 - Flags: review?(jmathies) → review+
Found one more problem with this that I need to fix too if you start in full screen mode mTaskbar is not yet initialized. So I'll r? you again in any case.
Attachment #554223 - Flags: review+
Implemented review comments and fixed problem if you start in full screen.
Attachment #554223 - Attachment is obsolete: true
Attachment #554395 - Flags: review?(jmathies)
Comment on attachment 554395 [details] [diff] [review] Patch for letting the taskbar know when we are going into full screen mode v2 I took a second to spot that '@thow' vs. '@throw' change. :) Thanks for cleaning that up.
Attachment #554395 - Flags: review?(jmathies) → review+
Blocks: 680227
No longer depends on: 680227
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
Comment on attachment 554395 [details] [diff] [review] Patch for letting the taskbar know when we are going into full screen mode v2 >+NS_IMETHODIMP >+WinTaskbar::PrepareFullScreenHWND(void *aHWND, PRBool aFullScreen) { >+ if (!Initialize()) >+ return NS_ERROR_NOT_AVAILABLE; >+ >+ NS_ENSURE_ARG_POINTER(aHWND); >+ >+ if (!::IsWindow((HWND)aHWND)) >+ return NS_ERROR_INVALID_ARG; >+ >+ HRESULT hr = mTaskbar->MarkFullscreenWindow((HWND)aHWND, aFullScreen); >+ if (FAILED(hr)) { >+ return NS_ERROR_UNEXPECTED; >+ } >+ >+ return NS_OK; >+} Weird indentation here
No logic change.
Attachment #558019 - Flags: review?(jmathies)
Attachment #558019 - Flags: review?(jmathies) → review+
Depends on: 1191743
Depends on: 1210452
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: