Subject: DisplayChanger customization point

From: Alan Griffiths <[email-masked]>
Date: Thu, 20 Nov 2014 15:50:24 +0000

As part of the mir::Server API migration I'm looking at some acceptance
tests that customize the [frontend]DisplayChanger.

Now, with the phone we've not got any downstreams that use this
customization so it is currently hidden.

But I think it is needed for desktop and that the customization point
should really support the mir::DisplayChanger.

So my thinking is:

1. Introduce shell { class DisplayChanger : public
frontend::DisplayChanger, mir::DisplayChanger {}; }

2. Now have MediatingDisplayChanger : public shell::DisplayChanger

3. provide a mir::Server customization point wrap_display_changer() ->
shell::DisplayChanger

Does that make sense?

---

From: Daniel van Vugt <[email-masked]>
Date: Fri, 21 Nov 2014 09:37:03 +0800

I'm not convinced *DisplayChanger are good abstractions. If you're 
touching them then maybe we can think of a cleaner way to approach the 
task of changing displays :)

http://objology.blogspot.com.au/2011/09/one-of-best-bits-of-programming-advice.html
http://www.benhallbenhall.com/2013/01/naming-objects-er-object-names/

Or if unused then remove even...

---

From: Christopher James Halse Rogers <[email-masked]>
Date: Fri, 21 Nov 2014 13:56:05 +1100

> frontend::DisplayChanger, mir::DisplayChanger {}; }

So, we've got two interfaces, called the same thing, doing wildly 
different things. Superb!

mir::DisplayChanger looks to me like it's notifying the shell of a 
display hardware change. This seems like something we should just 
expose to the shell directly. And by “expose to the shell directly” 
I mean expose a register_display_hardware_change_handler(), rather than 
“subclass this thing”.

frontend::DisplayChanger is the “handle client display configuration 
requests” interface. This seems like a candidate for 
wrap_display_changer() -> frontend::DisplayChanger interface. (Although 
possibly with a better name ☺).

---

From: Alan Griffiths <[email-masked]>
Date: Fri, 21 Nov 2014 11:39:09 +0000

> task of changing displays :)

Yes, Alexandros made a similar point yesterday. I'm not yet clear on the
right abstractions - so any constructive suggestions are welcome.