Mir

Merge lp:~alan-griffiths/mir/fix-1668599 into lp:mir

Proposed by Alan Griffiths
Status: Merged
Merged at revision: 4265
Proposed branch: lp:~alan-griffiths/mir/fix-1668599
Merge into: lp:mir
Diff against target: 50 lines (+12/-6)
2 files modified
debian/changelog (+2/-0)
src/platforms/mesa/server/x11/graphics/display.cpp (+10/-6)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1668599
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing
Gerry Boland (community) Approve
Review via email: mp+331249@code.launchpad.net

Commit message

[mir-on-x11] Less annoying clipping of Mir-on-X11 window when it exceeds display bounds. (LP: #1668599)

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4266
https://mir-jenkins.ubuntu.com/job/mir-ci/3680/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5046/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5282
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5270
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5270
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5270
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5089
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5089/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5089
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5089/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5089
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5089/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5089
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5089/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5089
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5089/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5089
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5089/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5089
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5089/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5089/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3680/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4266
https://mir-jenkins.ubuntu.com/job/mir-ci/3682/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5048/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5284
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5272
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5272
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5272
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5091
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5091/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5091
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5091/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5091
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5091/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5091/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5091
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5091/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5091
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5091/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5091
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5091/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5091
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5091/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3682/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

lgtm

review: Approve
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1438/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5050/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1573/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5286
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5274
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5274
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5274
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5094
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5094/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5094/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5094
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5094/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5094
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5094/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5094
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5094/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5094
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5094/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5094
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5094/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5094/console

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2017-09-19 11:07:20 +0000
+++ debian/changelog 2017-09-24 08:34:52 +0000
@@ -51,6 +51,8 @@
51 actual values to avoid ldiv0. (LP: #1717061)51 actual values to avoid ldiv0. (LP: #1717061)
52 . [miral-kiosk] Apply fullscreen logic when hidden windows are restored.52 . [miral-kiosk] Apply fullscreen logic when hidden windows are restored.
53 (LP: #1717910)53 (LP: #1717910)
54 . [mir-on-x11] Less annoying clipping of Mir-on-X11 window when it exceeds
55 display bounds. (LP: #1668599)
5456
55 -- Alan Griffiths <alan.griffiths@canonical.com> Thu, 10 Aug 2017 11:54:30 +000057 -- Alan Griffiths <alan.griffiths@canonical.com> Thu, 10 Aug 2017 11:54:30 +0000
5658
5759
=== modified file 'src/platforms/mesa/server/x11/graphics/display.cpp'
--- src/platforms/mesa/server/x11/graphics/display.cpp 2017-07-28 17:00:43 +0000
+++ src/platforms/mesa/server/x11/graphics/display.cpp 2017-09-24 08:34:52 +0000
@@ -31,6 +31,7 @@
31#include <boost/throw_exception.hpp>31#include <boost/throw_exception.hpp>
3232
33#include <X11/Xatom.h>33#include <X11/Xatom.h>
34#include <algorithm>
3435
35#define MIR_LOG_COMPONENT "x11-display"36#define MIR_LOG_COMPONENT "x11-display"
36#include "mir/log.h"37#include "mir/log.h"
@@ -53,16 +54,19 @@
5354
54 mir::log_info("Screen resolution = %dx%d", screen_width, screen_height);55 mir::log_info("Screen resolution = %dx%d", screen_width, screen_height);
5556
56 if ((screen_width < requested_size.width.as_uint32_t()+border) ||57 auto const width = std::min(requested_size.width, geom::Width{screen_width-border});
57 (screen_height < requested_size.height.as_uint32_t()+border))58 auto const height = std::min(requested_size.height, geom::Height{screen_height-border});
59
60 geom::Size const result{width, height};
61
62 if (result != requested_size)
58 {63 {
59 mir::log_info(" ... is smaller than the requested size (%dx%d) plus border (%d). Clipping to (%dx%d).",64 mir::log_info(" ... is smaller than the requested size (%dx%d) plus border (%d). Clipping to (%dx%d).",
60 requested_size.width.as_uint32_t(), requested_size.height.as_uint32_t(), border,65 requested_size.width.as_uint32_t(), requested_size.height.as_uint32_t(), border,
61 screen_width-border, screen_height-border);66 width.as_uint32_t(), height.as_uint32_t());
62 return geom::Size{screen_width-border, screen_height-border};
63 }67 }
6468
65 return requested_size;69 return result;
66}70}
6771
68auto get_pixel_width(Display *dpy)72auto get_pixel_width(Display *dpy)

Subscribers

People subscribed via source and target branches