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)
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)
2.35 KB,
patch
|
spohl
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Updated•11 years ago
|
Blocks: metroprofilesharing
Reporter | ||
Updated•11 years ago
|
Whiteboard: [release28]
Reporter | ||
Comment 1•11 years ago
|
||
p=1
Updated•11 years ago
|
Blocks: metrov1backlog
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
Updated•11 years ago
|
Attachment #8340850 -
Flags: review?(netzen)
Updated•11 years ago
|
Attachment #8340851 -
Flags: review?(netzen)
Reporter | ||
Updated•11 years ago
|
Attachment #8340850 -
Flags: review?(netzen) → review+
Reporter | ||
Updated•11 years ago
|
Attachment #8340851 -
Flags: review?(netzen) → review-
Reporter | ||
Updated•11 years ago
|
Attachment #8340850 -
Attachment is obsolete: true
Attachment #8340850 -
Attachment is patch: false
Attachment #8340850 -
Flags: review+
Reporter | ||
Updated•11 years ago
|
Attachment #8340851 -
Attachment is obsolete: true
Attachment #8340851 -
Attachment is patch: false
Attachment #8340851 -
Flags: review-
Updated•11 years ago
|
Whiteboard: [release28] feature=change c=tbd u=tbd p=0 → [beta28] feature=change c=tbd u=tbd p=0
Updated•11 years ago
|
Assignee: nobody → spohl.mozilla.bugs
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
Reporter | ||
Comment 6•11 years ago
|
||
By the way Stephen, this preference needs to be disabled by default.
Assignee | ||
Comment 7•11 years ago
|
||
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)
Reporter | ||
Comment 8•11 years ago
|
||
(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
Reporter | ||
Updated•11 years ago
|
Attachment #8345337 -
Flags: feedback?(netzen)
Assignee | ||
Comment 9•11 years ago
|
||
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)
Assignee | ||
Comment 10•11 years ago
|
||
Forgot to update the comments.
Attachment #8345348 -
Attachment is obsolete: true
Attachment #8345348 -
Flags: review?(netzen)
Attachment #8345349 -
Flags: review?(netzen)
Reporter | ||
Comment 11•11 years ago
|
||
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+
Assignee | ||
Comment 12•11 years ago
|
||
Thanks for the quick review! Added explicit false in both places. Carrying over r+.
Attachment #8345349 -
Attachment is obsolete: true
Attachment #8345363 -
Flags: review+
Assignee | ||
Comment 13•11 years ago
|
||
Assignee | ||
Comment 14•11 years ago
|
||
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)
Reporter | ||
Comment 15•11 years ago
|
||
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
Updated•11 years ago
|
status-firefox27:
--- → unaffected
status-firefox28:
--- → affected
status-firefox29:
--- → fixed
tracking-firefox28:
--- → ?
Comment 17•11 years ago
|
||
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?
Updated•11 years ago
|
Attachment #8345363 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•11 years ago
|
Comment 18•11 years ago
|
||
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
Updated•11 years ago
|
Target Milestone: Firefox 29 → Firefox 28
Comment 21•11 years ago
|
||
Matt, can you confirm this is fixed on Firefox 28 Beta 4?
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/28.0b4-candidates/build1/win32/en-US/
Flags: needinfo?(mbrubeck)
Updated•11 years ago
|
Flags: needinfo?(mbrubeck)
You need to log in
before you can comment on or make changes to this bug.
Description
•