Merge lp:~mir-team/qtubuntu/port-to-mirclient into lp:qtubuntu
| Status: | Merged |
|---|---|
| Approved by: | Daniel d'Andrada on 2015-03-05 |
| Approved revision: | 278 |
| Merged at revision: | 256 |
| Proposed branch: | lp:~mir-team/qtubuntu/port-to-mirclient |
| Merge into: | lp:qtubuntu |
| Diff against target: |
969 lines (+345/-276) 7 files modified
debian/control (+2/-1) src/ubuntumirclient/input.cpp (+196/-193) src/ubuntumirclient/input.h (+10/-5) src/ubuntumirclient/integration.cpp (+2/-2) src/ubuntumirclient/ubuntumirclient.pro (+1/-3) src/ubuntumirclient/window.cpp (+129/-69) src/ubuntumirclient/window.h (+5/-3) |
| To merge this branch: | bzr merge lp:~mir-team/qtubuntu/port-to-mirclient |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Daniel d'Andrada (community) | Approve on 2015-03-05 | ||
| Gerry Boland | Abstain on 2015-03-03 | ||
| Michał Sawicz | packaging | Approve on 2015-03-03 | |
| Albert Astals Cid (community) | 2014-12-18 | Approve on 2015-02-24 | |
| PS Jenkins bot | continuous-integration | Needs Fixing on 2015-02-23 | |
| Josh Arenson (community) | Needs Fixing on 2015-01-28 | ||
|
Review via email:
|
|||
Commit Message
Port qtubuntu to direct mirclient usage for window creation and input handling.
Description of the Change
Port qtubuntu to hybrid usage of PAPI and mirclient as described here: https:/
Thought I would get this early air, though the expose-
| Robert Carr (robertcarr) wrote : | # |
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:260
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Albert Astals Cid (aacid) wrote : | # |
Doesn't build here
../../.
../../.
| Robert Carr (robertcarr) wrote : | # |
Trying to land with the dependency: https:/
soon! Please review :)
| Robert Carr (robertcarr) wrote : | # |
I should resolve the dependency about adding pointer event support before this lands imo. (lest mild regression of sorts)
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:261
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Gerry Boland (gerboland) wrote : | # |
Some package versioning bumping is needed. The required PAPI branch should get a bump, and this should depend on that.
| Robert Carr (robertcarr) wrote : | # |
Corrected linkage against PAPI (weirdly wasnt using pkgconfig causing some peoples test builds to fail via not pulling in new PAPI)
Bumped debian dependency on PAPI doesnt seem qmake pkgconfig supports versioning
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:263
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Josh Arenson (josharenson) wrote : | # |
It seems that the OSK doesn't appear for me to enter my passphrase at the greeter. There is a maliit crash log that simply says "ERROR: whoopsie is not running" several times.
Running on mako w/ latest image + expose-
| Robert Carr (robertcarr) wrote : | # |
Added pointer event support.
Havent tested on device in a while so I guess I need to try again...can you describe your steps Josh? e.g. build to package, run from /usr, run out of prefix, etc.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:264
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Robert Carr (robertcarr) wrote : | # |
Discovered platform-api was interpreting the OSK role and using it to set mir_surface_
mir_surface_
https:/
| Robert Carr (robertcarr) wrote : | # |
Building stuff for test now
| Robert Carr (robertcarr) wrote : | # |
Context: This branch breaks the OSK last anyone tested.
| Robert Carr (robertcarr) wrote : | # |
With https:/
| Robert Carr (robertcarr) wrote : | # |
p.s. pointer events are tested on desktop with qt5 examples.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:266
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:267
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Gerry Boland (gerboland) wrote : | # |
Fails to build with debug on:
qmake CONFIG+=debug QMAKE_CXXFLAGS=
../../.
../../.
LOG("role: '%d'", role);
../../.
#define LOG(...) qDebug(__VA_ARGS__)
| Gerry Boland (gerboland) wrote : | # |
+ MirEvent const* nativeEvent = ubuntuEvent-
please use our code style:
const MirEvent *nativeEvent
Bunch of other instances of your more Mir-y style here:
+void UbuntuInput:
+void UbuntuInput:
+void UbuntuInput:
+Qt::MouseButton extract_
+void UbuntuInput:
+void UbuntuInput:
| Gerry Boland (gerboland) wrote : | # |
- WindowEvent *nativeEvent = &ubuntuEvent-
+ MirEvent const* nativeEvent = ubuntuEvent-
certain this ok?
| Gerry Boland (gerboland) wrote : | # |
it is, ignore that
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:270
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Alberto Aguirre (albaguirre) wrote : | # |
> Fails to build with debug on:
> qmake CONFIG+=debug QMAKE_CXXFLAGS=
>
Fixed.
| Alberto Aguirre (albaguirre) wrote : | # |
> + MirEvent const* nativeEvent = ubuntuEvent-
> please use our code style:
> const MirEvent *nativeEvent
>
> Bunch of other instances of your more Mir-y style here:
>
> +void UbuntuInput:
> ev)
> +void UbuntuInput:
> ev)
> +void UbuntuInput:
> +Qt::MouseButton extract_
> +void UbuntuInput:
> ev)
> +void UbuntuInput:
> MirOrientationEvent const* event)
Done.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:271
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Albert Astals Cid (aacid) wrote : | # |
Fails to compile, is that because it needs a newer mir than the one that the debian/ specifies?
| Alberto Aguirre (albaguirre) wrote : | # |
> Fails to compile, is that because it needs a newer mir than the one that the
> debian/ specifies?
Yes, mir 0.11 will have the new spec api.
| Albert Astals Cid (aacid) wrote : | # |
- if (ubuntuEvent-
+ if (ubuntuEvent-
Should the second one be
if (ubuntuEvent-
To also cover what the previous check was doing?
| Albert Astals Cid (aacid) wrote : | # |
- //DLOG(
+ DLOG("UbuntuInp
You sure you want to reenable this debug?
| Albert Astals Cid (aacid) wrote : | # |
- DLOG("unhandled event type %d", nativeEvent->type);
+ DLOG("unhandled event type");
Any reason you decided not to include the event type anymore? I think it's nice to have it in the log, otherwise if it ever happens we'll end up wondering which event was and how it could happen.
| Albert Astals Cid (aacid) wrote : | # |
In ::postEvent you have two
reinterpret_
that should be removed since event is already a const MirEvent*
| Albert Astals Cid (aacid) wrote : | # |
const MirInputEvent *event = reinterpret_
You don't need the cast here either since ev is a const MirInputEvent*
| Albert Astals Cid (aacid) wrote : | # |
in
qt_modifiers_
why not make q_modifiers a Qt::KeyboardMod
| Albert Astals Cid (aacid) wrote : | # |
in
extract_
why not make q_modifiers a Qt::MouseButton instead of an int so you can save the last static_cast?
| Albert Astals Cid (aacid) wrote : | # |
+ // TODO: Update to use MirEvent
+ void postEvent(
This TODO is old?
| Albert Astals Cid (aacid) wrote : | # |
Compiled manually and ran some manual tests and could not find anything wrong, looks code sane too (but will wait for giving my approval until the small comments i made above are resolved)
| Robert Carr (robertcarr) wrote : | # |
Thanks sorry for all the small errors. I should read the Qt Style Guide.
>>
>> - if (ubuntuEvent-
>> + if (ubuntuEvent-
>> Should the second one be
>> if (ubuntuEvent-
>> To also cover what the previous check was doing?
Fixed.
>> Any reason you decided not to include the event type anymore? I think it's nice to have it in >> the log, otherwise if it ever happens we'll end up wondering which event was and how it could >> happen.
Fixed.
>> reinterpret_
Fixed
>> why not make q_modifiers a Qt::KeyboardMod
>> static_cast?
>> why not make q_modifiers a Qt::MouseButton instead of an int so you can save the last
>> static_cast?
Because operator| casts the Qt::KeyboardMod
>> This TODO is old?
Why yes it is!
>> Compiled manually and ran some manual tests and could not find anything wrong, looks code sane >> too (but will wait for giving my approval until the small comments i made above are resolved)
Yay. Thanks again.
Thanks :)
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:272
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Albert Astals Cid (aacid) wrote : | # |
> >> why not make q_modifiers a Qt::KeyboardMod
> can save the last
> >> static_cast?
> >> why not make q_modifiers a Qt::MouseButton instead of an int so you can
> save the last
> >> static_cast?
>
> Because operator| casts the Qt::KeyboardMod
> to assign back to a Qt::Modifier results in an illegal conversion between int
> and enum types. Enums can not be used as flags in C++ without a cast or
> operator overloading.
No, Qt::KeyboardMod
| Robert Carr (robertcarr) wrote : | # |
>>No, Qt::KeyboardMod
Whoops! I was using Qt::KeyboardMod
fixed for buttons as well, thanks.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:273
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Daniel d'Andrada (dandrader) wrote : | # |
In src/ubuntumircl
"""
843 - ua_ui_window_
844 + setWindowState(
845 +
"""
This breaks the use case of applications that start up as fullscreen, such as camera-app and media-player. They are starting as fullscreen but get immediately resized to "non-fullscreen" because setVisible(true) has the side-effect of going out of fullscreen state with the change above.
| Daniel d'Andrada (dandrader) wrote : | # |
> In src/ubuntumircl
>
> """
> 843 - ua_ui_window_
> 844 + setWindowState(
> 845 +
> """
>
> This breaks the use case of applications that start up as fullscreen, such as
> camera-app and media-player. They are starting as fullscreen but get
> immediately resized to "non-fullscreen" because setVisible(true) has the side-
> effect of going out of fullscreen state with the change above.
I recall I fixed that very same bug in platform api, becasue mir has no concept of visibility, only window states. So just have to port the fix (or hack) from platform-api to qtubuntu
| Daniel d'Andrada (dandrader) wrote : | # |
> > In src/ubuntumircl
> >
> > """
> > 843 - ua_ui_window_
> > 844 + setWindowState(
> > 845 +
> > """
> >
> > This breaks the use case of applications that start up as fullscreen, such
> as
> > camera-app and media-player. They are starting as fullscreen but get
> > immediately resized to "non-fullscreen" because setVisible(true) has the
> side-
> > effect of going out of fullscreen state with the change above.
>
> I recall I fixed that very same bug in platform api, becasue mir has no
> concept of visibility, only window states. So just have to port the fix (or
> hack) from platform-api to qtubuntu
Pushed the fix myself.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:274
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:275
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:276
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild:
http://
| Michał Sawicz (saviq) wrote : | # |
../../.
So yeah, please fix build deps.
| Robert Carr (robertcarr) wrote : | # |
r277 fixes version. Thanks :)
| Daniel d'Andrada (dandrader) wrote : | # |
I was wondering, now that it's using mirclient api directly, shouldn't it have libmirclient-dev in Build-Depends in debian/control?
| Robert Carr (robertcarr) wrote : | # |
Yes, thanks! Corrected, should beretaed.

Im carrying it around on my phone and it seems to work fine but will get more testing.