Closed Bug 940677 Opened 11 years ago Closed 11 years ago

Change - Add a pref to disable auto switching between Desktop/Metro for Laptop/Slates

Categories

(Firefox for Metro Graveyard :: General, defect, P2)

28 Branch
x86_64
Windows 8.1
defect

Tracking

(firefox27 unaffected, firefox28+ fixed, firefox29 verified)

VERIFIED FIXED
Firefox 28
Tracking Status
firefox27 --- unaffected
firefox28 + fixed
firefox29 --- verified

People

(Reporter: bbondy, Assigned: spohl)

References

Details

(Keywords: verifyme, Whiteboard: [beta28] feature=change c=tbd u=tbd p=1)

Attachments

(1 file, 5 obsolete files)

Bug 935178 added support for a feature to auto switch environments for Intel based laptops that support laptop/slate notifications. This bug is to add a pref to disable that functionality.
Whiteboard: [release28]
p=1
Summary: Add a pref to disable auto switching between Desktop/Metro for Laptop/Slates → Change - Add a pref to disable auto switching between Desktop/Metro for Laptop/Slates
Whiteboard: [release28] → [release28] feature=change c=tbd u=tbd p=0
Attachment #8340850 - Flags: review?(netzen)
Attachment #8340851 - Flags: review?(netzen)
Attachment #8340850 - Flags: review?(netzen) → review+
Attachment #8340851 - Flags: review?(netzen) → review-
Attachment #8340850 - Attachment is obsolete: true
Attachment #8340850 - Attachment is patch: false
Attachment #8340850 - Flags: review+
Attachment #8340851 - Attachment is obsolete: true
Attachment #8340851 - Attachment is patch: false
Attachment #8340851 - Flags: review-
Whiteboard: [release28] feature=change c=tbd u=tbd p=0 → [beta28] feature=change c=tbd u=tbd p=0
Assignee: nobody → spohl.mozilla.bugs
Blocks: metrov1it21
No longer blocks: metrov1backlog
Status: NEW → ASSIGNED
Priority: -- → P2
QA Contact: jbecerra
Whiteboard: [beta28] feature=change c=tbd u=tbd p=0 → [beta28] feature=change c=tbd u=tbd p=1
By the way Stephen, this preference needs to be disabled by default.
Attached patch Patch (obsolete) — Splinter Review
Just had a few questions: 1. What should the pref be called? 2. Is my assumption correct that the pref has to be added to both firefox.js and metro.js? Or is metro.js just extending firefox.js, and putting it in firefox.js would be enough? 3. Should the pref in firefox.js be ifdef'd for XP_WIN? 4. Anything else I've missed? Thanks!
Attachment #8345337 - Flags: feedback?(netzen)
(In reply to Stephen Pohl [:spohl] from comment #7) > Created attachment 8345337 [details] [diff] [review] > Patch > > Just had a few questions: > 1. What should the pref be called? I'm not sure but probably something like: browser.shell.metro-auto-switch-enabled and browser.shell.desktop-auto-switch-enabled is good enough. > 2. Is my assumption correct that the pref has to be added to both firefox.js > and metro.js? Or is metro.js just extending firefox.js, and putting it in > firefox.js would be enough? > 3. Should the pref in firefox.js be ifdef'd for XP_WIN? You don't even need to list it in firefox.js and meto.js, you can just default the check to false. The only difference really is that the pref won't show up by default in about:config which is fine for this pref. > 4. Anything else I've missed? The pref will basically just disable this functionality: https://hg.mozilla.org/mozilla-central/rev/594ae98c4fdd
Attachment #8345337 - Flags: feedback?(netzen)
Attached patch Patch (obsolete) — Splinter Review
Thanks, Brian! (In reply to Brian R. Bondy [:bbondy] from comment #8) > You don't even need to list it in firefox.js and meto.js, you can just > default the check to false. Verified that Preferences::GetBool defaults to false if pref doesn't exist. > The only difference really is that the pref won't show up by default in > about:config which is fine for this pref. Ah, that makes it easy. I assumed we wanted the pref to show.
Attachment #8345337 - Attachment is obsolete: true
Attachment #8345348 - Flags: review?(netzen)
Attached patch Patch (obsolete) — Splinter Review
Forgot to update the comments.
Attachment #8345348 - Attachment is obsolete: true
Attachment #8345348 - Flags: review?(netzen)
Attachment #8345349 - Flags: review?(netzen)
Comment on attachment 8345349 [details] [diff] [review] Patch Review of attachment 8345349 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the patch! ::: widget/windows/winrt/MetroWidget.cpp @@ +718,5 @@ > if (aLParam && !wcsicmp(L"ConvertibleSlateMode", (wchar_t*)aLParam)) { > + // If we're switching away from slate mode, switch to > + // Desktop for hardware that supports this feature if the pref is set. > + if (GetSystemMetrics(SM_CONVERTIBLESLATEMODE) != 0 && > + Preferences::GetBool("browser.shell.metro-auto-switch-enabled")) { nit: Here and in nsWindow.cpp Yep the default second parameter to GetBool is false, please just put a false explicitly for the GetBool call though just for extra code readability.
Attachment #8345349 - Flags: review?(netzen) → review+
Attached patch PatchSplinter Review
Thanks for the quick review! Added explicit false in both places. Carrying over r+.
Attachment #8345349 - Attachment is obsolete: true
Attachment #8345363 - Flags: review+
I don't have hardware to verify this, but it'd be great to confirm that this is working as expected in nightly before I request approval for aurora. Thanks!
Flags: needinfo?(jbecerra)
The Surface cover detach thing should be fixed by this btw Juan.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
Blocks: 948775
Comment on attachment 8345363 [details] [diff] [review] Patch [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 935178 User impact if declined: Firefox may switch unexpectedly between Metro and Desktop modes. Testing completed (on m-c, etc.): Landed on m-c on 12/10. Risk to taking this patch (and alternatives if risky): Very low risk Metro-only patch that just disables a recently-landed feature. String or IDL/UUID changes made by this patch: None.
Attachment #8345363 - Flags: approval-mozilla-aurora?
Attachment #8345363 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
I tested this in Nightly on my Surface Pro 2 with Type Cover 2 and it disables the auto-switching as expected. Thanks! https://hg.mozilla.org/releases/mozilla-aurora/rev/934314077dd1
Status: RESOLVED → VERIFIED
Flags: needinfo?(jbecerra)
Version: unspecified → 28 Branch
Target Milestone: Firefox 29 → Firefox 28
Blocks: 952356
Depends on: 948012
Flags: needinfo?(mbrubeck)
Flags: needinfo?(mbrubeck)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: