Closed
Bug 745077
Opened 12 years ago
Closed 12 years ago
Touch event is not correct when the orientation changes
Categories
(Core :: Widget, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: kanru, Assigned: kanru)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
1.86 KB,
patch
|
Details | Diff | Splinter Review |
STR: 1. rotate the device (sgs2) 2. the homescreen is in landscape mode 3. but the touch events are still in portrait coordinate.
Comment 1•12 years ago
|
||
It looks like methods handling input coordinates need to consider current screen rotation and make adjustments accordingly. There is already a quick access to current rotation via nsScreenGonk, but width and height are problems. Querying screen manager seems not a good idea in such performance sensitive code.
Assignee | ||
Comment 2•12 years ago
|
||
Assignee: nobody → kchen
Attachment #616871 -
Flags: review?(mwu)
Updated•12 years ago
|
Component: General → Widget
Product: Boot2Gecko → Core
QA Contact: general → general
Comment 4•12 years ago
|
||
Comment on attachment 616871 [details] [diff] [review] Bug 745077 - Reconfigure InputReader on screen rotation. Review of attachment 616871 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. r=me with the requested changes. ::: widget/gonk/nsAppShell.cpp @@ +704,5 @@ > write(signalfds[1], "w", 1); > } > > +void > +nsAppShell::NotifyScreenChangesInternal() Inline this into NotifyScreenChanges. Also rename NotifyScreenChanges to NotifyScreenRotation.
Attachment #616871 -
Flags: review?(mwu) → review+
Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Michael Wu [:mwu] from comment #4) > > +void > > +nsAppShell::NotifyScreenChangesInternal() > > Inline this into NotifyScreenChanges. Also rename NotifyScreenChanges to > NotifyScreenRotation. Hmm.. I need to access the private mReader. Do you want to expose gAppShell to nsWindow? NotifyScreenChanges does not only notify the orientation change but also the screen size change. But if you think NotifyScreenRotation fits here then I'm okay as well.
Comment 6•12 years ago
|
||
(In reply to Kan-Ru Chen [:kanru] from comment #5) > (In reply to Michael Wu [:mwu] from comment #4) > > > +void > > > +nsAppShell::NotifyScreenChangesInternal() > > > > Inline this into NotifyScreenChanges. Also rename NotifyScreenChanges to > > NotifyScreenRotation. > > Hmm.. I need to access the private mReader. Do you want to expose gAppShell > to nsWindow? > NotifyScreenChanges is part of nsAppShell, so it should be able to access mReader, no? > NotifyScreenChanges does not only notify the orientation change but also the > screen size change. But if you think NotifyScreenRotation fits here then I'm > okay as well. Yeah, it's really the only reason why the screen size would change, so I think notifyscreenrotation is fine.
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Michael Wu [:mwu] from comment #6) > > Hmm.. I need to access the private mReader. Do you want to expose gAppShell > > to nsWindow? > > > > NotifyScreenChanges is part of nsAppShell, so it should be able to access > mReader, no? Oh, yes. So I will do gAppShell->mReader->... in it. > > NotifyScreenChanges does not only notify the orientation change but also the > > screen size change. But if you think NotifyScreenRotation fits here then I'm > > okay as well. > > Yeah, it's really the only reason why the screen size would change, so I > think notifyscreenrotation is fine. Got it.
Assignee | ||
Comment 8•12 years ago
|
||
Attachment #616871 -
Attachment is obsolete: true
Assignee | ||
Comment 9•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/26dbb2e9d91d
Comment 10•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/26dbb2e9d91d
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in
before you can comment on or make changes to this bug.
Description
•