Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/validDpi into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 1757
Merged at revision: 1758
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/validDpi
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 14 lines (+3/-1)
1 file modified
src/Ubuntu/Components/plugin/gestures/ucswipearea.cpp (+3/-1)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/validDpi
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Gerry Boland (community) Approve
Timo Jyrinki Approve
Review via email: mp+280312@code.launchpad.net

Commit message

Only set ppmm in SwipeArea if screen has valid dpi

To post a comment you must log in.
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Fixes the issue!

Test project /home/ubuntu/d/build-area/address-book-app-0.2+16.04.20151210/obj-x86_64-linux-gnu
    Start 1: contact_list
1/9 Test #1: contact_list ..................... Passed 1.28 sec
    Start 2: Contact_list_model

review: Approve
Revision history for this message
Gerry Boland (gerboland) wrote :

I'd argue this is a workaround for a qtubuntu/mir bug, which needs fixing. Please add a FIXME with a link to the bug report #1525293

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Components/plugin/gestures/ucswipearea.cpp'
2--- src/Ubuntu/Components/plugin/gestures/ucswipearea.cpp 2015-12-09 19:12:19 +0000
3+++ src/Ubuntu/Components/plugin/gestures/ucswipearea.cpp 2015-12-11 15:43:37 +0000
4@@ -790,7 +790,9 @@
5
6 // FIXME: Handle window->screen() changes (ie window changing screens)
7 qreal pixelsPerMm = value.window->screen()->physicalDotsPerInch() / 25.4;
8- d->setPixelsPerMm(pixelsPerMm);
9+ // FIXME: dpi can be negative lp#1525293
10+ if (pixelsPerMm > 0)
11+ d->setPixelsPerMm(pixelsPerMm);
12 }
13 }
14 }

Subscribers

People subscribed via source and target branches