Closed Bug 513850 Opened 15 years ago Closed 15 years ago

ensure correct sizemode is used when leaving fullscreen

Categories

(Core :: Widget: Win32, defect)

x86
Windows Mobile 6 Standard
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
fennec 1.0b1-wm+ ---

People

(Reporter: dougt, Assigned: dougt)

Details

Attachments

(2 obsolete files)

Attached patch patch v.1 (obsolete) — Splinter Review
when leaving fullscreen mode, we want to ensure that we restore the correct sizemode
Attachment #397803 - Flags: review?(bugmail)
Comment on attachment 397803 [details] [diff] [review]
patch v.1

>   mPopupType            = ePopupTypeAny;
>   mDisplayPanFeedback   = PR_FALSE;
>+  mLastSizeMode         = nsSizeMode_Normal;
and
>+  // Remember the last sizemode so that we can restore it when
>+  // leaving fullscreen
>+  nsSizeMode            mLastSizeMode;
>+
> #ifdef WINCE_WINDOWS_MOBILE
>   nsCOMPtr<nsIRegion>   mInvalidatedRegion; 
> #endif

It looks like we're only using this variable for windows mobile, so either ifdef around it or use it on desktop
Attachment #397803 - Flags: review?(bugmail) → review-
Attached patch patch v.2 (obsolete) — Splinter Review
Assignee: nobody → doug.turner
Attachment #397803 - Attachment is obsolete: true
Attachment #397876 - Flags: review?(bugmail)
Comment on attachment 397876 [details] [diff] [review]
patch v.2


>   else {
>+    mSizeMode = mLastSizeMode;

I think you need to test mSizeMode == nsSizeMode_Fullscreen here, otherwise we could change the sizemode when we don't really want to
Attachment #397876 - Flags: review?(bugmail) → review+
Comment on attachment 397876 [details] [diff] [review]
patch v.2

how about I add:

NS_ASSERTION(mLastSizeMode != nsSizeMode_Fullscreen, "mLastSizeMode should never be fullscreen");
09:28 < blassey> basically, we only want to change mSizemode in MakeFullScreen if we're 
                 transitioning into or out of fullscreen
09:29 < blassey> my window is mazimized, then I go fullscreen, then I go normal
09:29 < blassey> then someone calls MakeFullScreen(FALSE)
09:29 < blassey> mSizemode = normal, mLastSizemode = maximized going into the function
09:29 < blassey> and they shouldn't change
09:29 < blassey> but they will
09:30 < blassey> and you'll wind up maximized
this also probably happens on gtk2.
Comment on attachment 397876 [details] [diff] [review]
patch v.2

this patch isn't correct.
Attachment #397876 - Attachment is obsolete: true
Attachment #397876 - Flags: review+ → review-
tracking-fennec: --- → ?
doug what is this effecting?
tracking-fennec: ? → 1.0b1-wm+
(In reply to comment #5)
> 09:28 < blassey> basically, we only want to change mSizemode in MakeFullScreen
> if we're 
>                  transitioning into or out of fullscreen
> 09:29 < blassey> my window is mazimized, then I go fullscreen, then I go normal
> 09:29 < blassey> then someone calls MakeFullScreen(FALSE)
> 09:29 < blassey> mSizemode = normal, mLastSizemode = maximized going into the
> function
> 09:29 < blassey> and they shouldn't change
> 09:29 < blassey> but they will
> 09:30 < blassey> and you'll wind up maximized

Either I can't reproduce this on a trunk build, or the patch that just landed for bug 520178 fixed this.

My steps to test:

1) start with a normalized or maximized main window.
2) hit f11
3) hit f11 again

the window always returns to the original state in step 1.
Win7 pinned window states work correctly as well.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: