Mir

Merge lp:~brandontschaefer/mir/add-mir-chrome-none into lp:mir

Proposed by Brandon Schaefer
Status: Rejected
Rejected by: Daniel van Vugt
Proposed branch: lp:~brandontschaefer/mir/add-mir-chrome-none
Merge into: lp:mir
Diff against target: 11 lines (+1/-0)
1 file modified
include/core/mir_toolkit/common.h (+1/-0)
To merge this branch: bzr merge lp:~brandontschaefer/mir/add-mir-chrome-none
Reviewer Review Type Date Requested Status
Alan Griffiths Needs Information
Daniel van Vugt Disapprove
Cemil Azizoglu (community) Needs Information
Mir CI Bot continuous-integration Needs Fixing
Review via email: mp+313480@code.launchpad.net

Commit message

Add missing chrome_none field.

Description of the change

Add missing chrome_none field.

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

FAILED: Continuous integration, rev:3885
https://mir-jenkins.ubuntu.com/job/mir-ci/2425/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/3156/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/3223
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/3215
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/3215
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/3215
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/3185
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=yakkety/3185/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3185
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/3185/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=yakkety/3185/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3185/console
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/3185/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3185
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/3185/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3185
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3185/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

It would make sense to mention why we need this. Also, this should have been the first element in the enum, is it too late for that? If it is, do you want to assign some value to it to leave a gap in case you need other chrome values? (i.e.

mir_shell_chrome_normal,
mir_shell_chrome_low,
mir_shell_chrome_none = 1000

or some such thing?)

review: Needs Information
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If we're breaking the ABI _and_ API that uses it then you can probably reorder the enum. Otherwise I would lean toward not reordering, for safety.

In terms of documenting its purpose, I think it's the same thing as mir::compositor::Decoration::Type. We could replace that Type with MirShellChrome I guess but the noun "chrome" only has meaning within Canonical design/management AFAIK. It's not a recognised word in wider circles so maybe this is an opportunity to rename it to something more correct like MirWindowDecoration {none, low, normal}...

review: Needs Information
Revision history for this message
Chris Halse Rogers (raof) wrote :

I don't see any particular reason why mir_shell_chrome_none *should* be the first member, nor is the first member all that special.

You probably want to introduce this as a part of something that actually uses it, though.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The only public interface using it is:

   include/client/mir_toolkit/mir_surface.h:void mir_surface_spec_set_shell_chrome(MirSurfaceSpec* spec, MirShellChrome style);

And we want to replace that anyway. So we should take the opportunity to deprecate the whole enum and replace it with our newer naming convention:

   enum MirWindowDecor /* or Decoration or Chrome or whatever */
   mir_window_spec_set_decor()

Although this particular change is harmless, it clearly also is about to be deprecated.

review: Disapprove
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

When (and why) would this be useful?

review: Needs Information
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's useful because this is the mechanism by which a toolkit can say "hey this is a normal window but I will draw my own decorations so dear shell; don't do it for me". Hence chrome is "none".

It's not a specific window type that might be client-decorated. Any window type might be client-decorated, depending on what the toolkit wants (GTK especially).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Since I was the person who proposed this change in conversation, and the one disapproving it, and the one suggesting an alternative, I think that's enough grounds for me to reject this branch.

I'll propose something more appropriate in future...

Unmerged revisions

3885. By Brandon Schaefer

* Add chrome_none

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/core/mir_toolkit/common.h'
2--- include/core/mir_toolkit/common.h 2016-11-11 07:56:09 +0000
3+++ include/core/mir_toolkit/common.h 2016-12-17 00:12:25 +0000
4@@ -350,6 +350,7 @@
5 {
6 mir_shell_chrome_normal,
7 mir_shell_chrome_low,
8+ mir_shell_chrome_none
9 } MirShellChrome;
10
11 /**

Subscribers

People subscribed via source and target branches