/srv/irclogs.ubuntu.com/2013/04/22/#ubuntu-mir.txt

duflurobert_ancell: Did you notice I had a go at the strings-on-the-protocol issue? https://code.launchpad.net/~vanvugt/mir/method-index/+merge/15978203:27
robert_ancellduflu, yeah, I've got a branch where I converted it to an enum03:27
robert_ancellduflu, the RPC code is yuck though and we could probably get away without it03:27
duflurobert_ancell: Yeah I think we would need to avoid strings... if we were to go to a more efficient transport in future. But not yet03:28
robert_ancellI am so sick of seeing "Internal compiler error: Error reporting routines re-entered.03:29
robert_ancell"03:29
* duflu has never seen it03:29
* RAOF wonders if he should try defaulting to gcc 4.8, which doesn't suffer that.03:43
robert_ancellRAOF, yes, we should if 4.8 is available and not broken03:46
RAOF4.8 is available in raring, will be default in S, and isn't broken (in that way ☺)03:46
robert_ancellRAOF, are you sure it is in raring - it's not showing for me03:48
RAOFIt's packaged as gcc-snapshot03:49
robert_ancellhmm, that doesn't sound like something we should depend on. We can shift when we go to S I guess03:49
robert_ancellRAOF, btw, is XMir working? I tried it on Friday and was getting the "no screens" error03:50
RAOFI wasn't suggesting that we default to it in the build, but locally you could easily install and use it, and not get stupid ICEs.03:50
RAOFXMir worked last time I tried.03:51
RAOFOh, no it didn't; I need to fold in a new package. You probably don't have an xmir server installed.03:51
robert_ancellRAOF, I did downgrade to the latest XMir package but it wasn't connecting03:51
RAOFHm. *That* did work on my machine. Let me check...03:52
RAOFBah! I wish launchpad was updated to something more recent than Hardy.05:36
RAOFThen I could use a bzr builder recipe version 0.4, which means I could use {debver:packaging} in the version, which means I wouldn't have to change the recipe each time someone uploads xserver-xorg-video-intel to Ubuntu!05:38
=== seb128_ is now known as seb128
=== mmrazik is now known as mmrazik|otp
=== mmrazik|otp is now known as mmrazik
=== alan_g is now known as alan_g|afk
=== alan_g|afk is now known as alan_g
kdubgood morning, status, friday worked on hwc1.0 for galaxy nexus, will continue with that today. going pretty well15:05
kgunnkdub: mornin'15:12
alan_gGood morning15:14
alf_status: some performance investigations, but mostly getting laptop ready for sprint15:23
alan_gstatus: having a look through our generated documentation (and learning a bit more about doxygen)15:29
alan_gBTW does anyone know how frequently http://unity.ubuntu.com/mir/index.html is updated? It seems to be some days behind the trunk.15:30
racarr_Morning15:34
racarr_Working on touch/pointer input15:34
=== racarr_ is now known as racarr
racarralf_: I am workingon a software cursor and need some APIs to15:37
racarrdamage the compositor15:37
racarrseperate through the renderables15:38
racarrto trigger rendering15:38
racarrany ideas?15:38
alan_gracarr: I think alf_ was the last one to rework that area.15:39
alf_racarr: alan_g: so basically two options: 1. Pass an object to the compositor and register a notification internally (like we do for renderables currently) 2. Expose e.g. Compositor::damage() and call it when the cursor moves (that is make the cursor depend on the compositor)15:42
racarrCompositor::damage seems more appropriate for me because in this case15:42
racarrthe shell is rendering the software cursor15:42
racarrvia overriding the compositing strategy15:42
racarrFixed gmock warnings on reflow-input-focus-selection15:44
racarralan_g: So the crash in demo shell15:45
racarris the shared_ptr to the Eventfilter which is returned via initializer_list from the server configuration15:46
racarris released in the process of being passed from DefaultServerConfiguration to InputConfiguration15:46
racarrI can't understand it to the point where I think it might be a G++ bug15:46
racarr:/15:46
alan_gracarr: That sounds wrong. Give me 10 and I'll have a look.15:47
racarrthanks :)15:47
racarrI think it's actually lost in the constructor of eventfilter chain (when passingfrom DefaultInputConfiguration to EventFilterChain)15:51
racarrbut either way it makes no sense :(15:51
kdubalan_g, maybe thomi would know about how often the doc site is updated, i'll ask when he signs on later15:55
alan_gracarr: you're saying the shared_ptr to the initializer list is OK, but the one *in* the initializer list gets reset?16:06
racarralan_g: Err there is a shared_ptr to the initializer list?16:09
racarrisn't it passed by value16:09
racarrwhat I mean is, the_input_configuration calls the_event_filters and in gdb you can observe the_event_filters returns an initializer list16:10
racarrwith a shared_ptr as it's first member16:10
racarrand m_ptr as non zer016:10
alan_gracarr: sorry, misreading the code16:10
racarrthen it gets passed to the input configuration constructor16:10
racarrand it also non zero16:10
racarrwhen it's passed to the EventFilterChain constructor16:10
racarrthe initializer list is empty16:10
racarrand the EventFilterChain later attempts to call a method on the event filter (0x0)16:10
racarrwell, it's not empty16:10
racarrit contains one member, a shared_ptr with m_ptr = 016:11
racarralan_g: Just pushed a revision (604) which you can see fixes it by moving ownership to main16:16
racarrbut why?16:16
alan_gracarr: It still doesn't make sense16:22
racarralan_g: I think it has to be a GCC bug :/ I du nno16:28
racarrI went through with valgrind etc...16:28
alan_gracarr: the initializer list captures by reference, but and the reference is to a temporary std::shared_ptr<mi::EventFilter> created in the function call. Because app_switcher is a std::shared_ptr<me::ApplicationSwitcher> and needs conversion to std::shared_ptr<mi::EventFilter>.16:28
racarrbut the initializer list16:29
racarrshould own that reference16:29
racarruntil it passes it to the vector of std::shared_ptr<EventFilter in EventFilterChain right?16:29
alan_gracarr: temporaries don't exist after you leave the enclosing scope16:31
alan_gI.e. return from the_event_filters()16:31
racarralan_g: Then why doesn't it work if I make16:32
racarrthe_event_filters a const member of DemoServerConfiguration16:32
racarrerr16:32
racarrmake std::initializer_list event_filters16:32
racarra const member16:32
racarrand initialize it at construction time16:32
alan_gBecause, when you exit the constructor the temporary it references goes out of scope16:33
racarr(not as in r604 where the list is created in main)16:33
racarrHmm16:33
alan_gIf you had a  std::shared_ptr<EventFilter> member you could pass a reference to that around in the initializer list16:34
racarrthat's what I was just going to say16:34
racarrdo you think its better to keep it like r60416:34
racarror to keep the app_switcher in the config like it was in 603 and just use16:34
racarrshared_ptr EventFilter16:34
alan_gUsing initializer lists like this might be a bad idea. ;)  (I don't have the experience of them to be sure yet)16:35
racarrthat's what I was wondering...16:36
racarrso I just tried16:36
racarrconstructing the app_switcher from main16:36
racarrpassing itto the demo server configuration (as mi::EventFilter16:37
racarrsaving it as a shared_ptr on the demo server configuratino and returning { event_filter }16:37
racarrsame problem16:37
racarrI think r604 is the way to go :p16:39
alan_gsaving it as a shared_ptr on the demo server configuration ought to work - you didn't save a reference by mistake did you?16:41
racarrno, const value16:42
=== smspillaz is now known as notsmspillaz
=== notsmspillaz is now known as smspillaz
=== alan_g_ is now known as alan_g
bschaeferRight now for KeyEvents I don't see a define/const saying if the key event is pressed or released for the event...besides checking if the event.action is true/false, have I missed something?17:39
bschaefererr, event.action 1 or 017:39
bschaeferall I see is: test/mir_test/event_factory.h:29:enum class EventAction17:42
bschaeferwhich isn't exposed to the C apis :(17:42
racarrbschaefer: For now you can see them in17:54
racarr 3rd_party/android-input/android_pristine/frameworks/native/include/android/input.h17:55
racarrAKEY_EVENT_ACTION17:55
racarrwill try and get them added to a header in trunk17:55
racarrI tried once but people argued about if they were needed yet until I gave up :p17:55
bschaeferracarr, cool, yeah I had to print them out to figure out what was down/up so I can hold up and actually using a name fo ir17:55
racarr:)17:56
bschaeferracarr, yeah, well the action is an int32_t which...you can't do a nice enum with that :(17:56
bschaeferracarr, thanks! Also one more question while you're around :)17:56
racarrSure17:57
bschaeferracarr, soo for the cursor, how is mir going to be handling the 'themeing' of the cursor?17:57
bschaeferor will that be left up to the client I suppose17:58
racarrI don't entirely know ;)17:59
racarrI guess the shell will eb responsible for the general themeing of the cursor17:59
racarrbut there are times where the clients need to request stuff, etc. or i.e. needs to change from cursor to text cursor...17:59
racarrill get back to you :p thanks for bringing that up17:59
bschaeferyeah, I was just digging through what Ill have to do for the mouse, and saw that SDL was making the own theme based on the video :)17:59
racarrbschaefer: I have a branch with a software cursor in mir but it's not uite ready to propose18:00
bschaeferyeah, X11 does it a bit different where you just request the cursor? (I think) and wayland was doing it a bit differently18:00
racarrand you need this branch to18:00
racarrhttps://code.launchpad.net/~robertcarr/mir/enable-pointer-touch-input/+merge/16015318:00
bschaeferracarr, sweet, I can give it run!18:00
racarrreceive motion events/pointer events18:00
bschaefernice, I should able to mock a cursor for now and get events working :)18:01
bschaeferracarr, thanks!18:01
racarrCool! Let me know if it works :)18:01
bschaeferracarr, will do! So far key events work well :)18:01
racarrhurrah18:01
bschaeferusing scan codes from the events there was already a mapping of the xfree86_scancode_table218:01
bschaeferwhich was nice18:02
racarrHmm18:02
racarrbut then how are you getting things like18:02
racarr$18:02
racarras shift + 418:02
racarror does SDL do its own mapping18:02
bschaeferSDL has its own mapping, but yeah I want to write some tests where it'll make sure all are working18:03
* bschaefer checks mod events18:03
bschaeferracarr, you're right, not working :)18:06
racarrI don't know how SDL expects it to work but my guess would be you need the keycodes -> SDL keycodes18:07
racarrunless SDL can listen to shift down or modifiers or whatever itself18:07
racarrand do the mapping18:07
racarrbut seems best to use the mapping from mir18:07
R__you guys ported SDL to mir then?18:07
R__or in the process?18:07
bschaeferright, I need to use xkb and set the modifier, im thinking something like: xkb_state_update_mask18:07
bschaeferR__, in the process18:08
R__I hear SDL 2.0 is getting the final blessing in May18:08
bschaeferracarr, theres a mapping form Mir already? Or are you talking about the xkb state from Mir?18:08
R__think you'll get it merged?18:08
bschaeferR__, that would be nice :), well...lets hope!18:08
bschaeferracarr, and right, the SDL keycodes Ill have to do my own mapping now for the '$' stuff, but as along as I can get the correct keysym I should be fine18:10
* bschaefer looks into it18:10
racarrbschaefer: Well I mean the mir key"code"18:10
bschaeferthanks for pointing that out!18:10
racarris a keysym18:10
bschaeferright18:10
racarrso if shift was down and 4 is hit the key code18:10
racarrwill be XKB_KEY_dollar18:10
bschaeferoo alright, so ill have to make my own mapping of the special mod + <key> symbols18:11
bschaeferunless they are around somewhere18:11
racarr?18:13
racarrthe values for MirEvent::keycode are all in18:13
racarrxkbcommon/xkbcommon-keysyms.h18:13
racarrso I am guessing you can translate from like18:13
racarrXKB_KEY_dollar to SDL_KEY_dollar and thats all that is needed18:13
racarrunless that was what you meant by your own mapping :)18:14
bschaeferracarr, well I was just saying Ill have to do my own mapping of that stuff18:14
bschaeferyup18:14
racarrshould see how the wayland backend works18:14
bschaeferracarr, unless theres like a magic -48 :)18:14
racarrthey are probably doing xkb in the client18:14
racarrbut there must be a translation somewhere18:14
racarrbschaefer: Not normally, though almost all xkb keysyms are unicode characters18:14
racarrso maybe SDL is the same way18:14
bschaeferright, well whats strange is they only use the scan codes for input18:14
bschaeferand then SDL_SendKeyboardText(text);18:15
bschaeferfor everything else18:15
bschaefersoo, from what I see wayland doesn't handle sending: SDL_SendKeyboardKey of mod + <key>18:15
bschaeferracarr, but I need to do some more digging, im fairly new to xkb as well :)18:15
racarryou can use xkb_keysym_to_utf818:19
racarrto send text18:19
racarrit wont always return a value18:19
racarri.e. KEY_left18:19
bschaeferyup, thats what I was planning18:20
bschaeferbut im getting curious to why SDL_SendKeyboardKey seems to only be used w/o modifiers. From what I see they all use something similar  to the scan code mapping18:21
bschaeferinteresting...18:21
racarrwell maybe you send shift down to SDL and then send 4 to sdl and it maps itself18:23
racarrI dunno18:23
racarrwould be a little weird but not the weirdest!18:23
racarrbut then who knows why its not working18:23
bschaeferthat would weird, but nice ;)18:23
bschaeferbut im not setting the mod in sdl, soo thats what im looking for18:23
bschaeferhmm: SDL_SetModState(SDL_Keymod modstate);18:23
* bschaefer tires to use that18:23
racarrbschaefer: You can find themodifier states in...qtubuntu/src/platforms/base/input.cc lol18:27
racarrI'm not sure where else oO18:27
bschaefermir/include/shared/mir_toolkit/events.h is what im more or less stuck with :)18:28
bschaeferSDL is in C18:28
bschaeferand lol, a .cc file18:28
* bschaefer looks18:28
racarrbschaefer: No but I mean you can18:28
racarrcopy them for now18:28
racarrand they will end up in events.h soon18:28
bschaeferyeah, i thought you were pointing to a header at first18:28
bschaefercool, I can look at doing some of that work as well18:29
racarrnope just a hipster C++ file18:29
bschaeferhaha18:29
racarrawesome yes :) propose away18:29
bschaeferracarr, thanks for all the info! That'll give me a bunch to do today :), ill also test out your cursor branch later!18:30
racarrGreat :) np I am happy someone else is testing input18:33
thomihi kdub19:58
thomikdub: the docs should be uypdated daily - are they not?19:58
thomikdub: more specifically, they should get updated every time something gets merged into trunk19:59
racarrBack from lunch :)20:02
racarrthomi: https://jenkins.qa.ubuntu.com/job/mir-quantal-amd64-ci/474/console halp20:07
racarr404?20:07
thomiracarr: how long ago did the build fail?20:07
racarruh within an hour20:08
thomiracarr: it takes a few minutes to publish20:08
racarrbut I had the same problem on the first build that failed earlier20:08
thomishould work, let me see20:08
thomiracarr: got the MP link handy?20:09
racarrhttps://code.launchpad.net/~robertcarr/mir/enable-pointer-touch-input/+merge/16015320:09
racarrthomi: ^20:09
racarrHad just run off to get it then I got distracted by firefox20:09
thomiheh20:11
thomithat's really odd20:12
thomineither the private nor the public jenkins have got to job 47420:12
racarrwhat about their sentient jenkins love child?20:13
racarrhmm20:13
racarrI dunno.20:13
racarrI could resubmit the branch20:13
thomiracarr: do you have VPN access?20:13
racarrprobably resets some state20:13
racarryeah20:13
thomiracarr: the job ran20:14
thomilook here: http://10.97.2.10:8080/job/mir-quantal-amd64-ci/474/console20:14
thomithere's your problem ^^ a failed test20:14
thomi 93/112 Test  #93: memcheck(integration-tests.AndroidInputManagerAndEventFilterDispatcherSetup.*) ...***Failed    3.98 sec20:14
thomi*sad trombone*20:14
racarrAhhh20:15
racarrthat isn't much of an Ahh because who knows why the test fails ;)20:15
racarrlets look20:15
racarrhmm20:17
racarrgtest-repeat=100 is ok locally but20:17
racarrthat would be too easy if it were reproducable ;)20:17
racarrI can't reproduce the memory errors either20:18
racarrwish it had --track-origins=yes20:18
racarr(though that is slow :()20:18
kgunnracarr: hey, so i was chatting with dandrader20:20
kgunnabout possibly working on input filtering from the shell20:20
kgunne.g. filter edge events, pass the rest to whatever qt app is "beneath" the shell20:21
thomiracarr: there seems to be an issue with publishing job data from the private jenkins, we're looking into it. Until we fix it, you can just look at the private jenkins server instead20:21
kgunnin order to minimize any throw away & work on real integration issues20:21
kgunncan't we run mir w/ ubuntu touch on top ?20:22
kgunnwe're not too early to try are we?20:22
kgunnracarr: kdub ^20:22
racarrkgunn: Just 3 minutes :) 5 things at once20:22
kgunn;)20:22
racarrneed to write down what I am doing or I will forget something20:23
racarrOk hi!20:25
racarrhi dandrader :)20:25
racarrI am going to go backwards20:25
dandraderracarr, hi20:25
racarrwe can run mir w/ ubuntu touch on top, with the stuff kdub has set up (and this is continually tried) but this setup is using20:25
* kgunn dandrader in for some racarr entertainment :)20:25
racarrsurface flinger with input only windows shadowing the mir surfaces20:26
racarrand mir input shut down20:26
racarrerr..20:26
racarrwell basically? Kevin can correct me20:26
racarrbut mir input is shut down so that configuration isn't ready for event filtering stuff20:26
racarrI do not think we are too early to start trying to run ubuntu touch on mir20:27
racarrI mean it is possible to take a Launcher.qml today and write a few hundred lines of C++ to run it in process and get it events20:27
racarran event filter can be plugged in for edge events, etc for the gestures20:28
racarrnormal events (i.e. clicked on a button)20:28
racarrcan just go over the normal input dispatch20:28
racarreven though it's inprocess, it will be kind of wasteful it gets something going20:29
racarrThere is one blocker of some sort20:30
racarrno in process EGL support on android20:30
racarrnot sure how much work that is20:30
racarrkdub: ^ ?20:30
kgunnracarr: mmm, so we'd be better off just to create some event filtering scheme in absence of mir20:30
racarrBut I mean, we can get things going on GBM20:30
racarrkgunn: Hmm I'm not sure I mean I think this week/next week20:31
kdubshould have put the lunch nick on!20:31
racarris the time to really get this off the ground20:31
racarrI'm trying to tie up a lot of loose ends now in demo shell + touch/crsor input stuff, and the basically what Mir can offer the shell for event filtering is20:32
kgunnracarr: right...timing...so we're kind of close enough we might need to sus up mir input w/ touch on top first20:32
kdubthomi, unity.ubuntu.com/mir seems to be out of sync with the doc folder20:32
racarra global event filter, where it sees the raw stream and can alter/filter it/whatever20:32
dandraderone thing is that I would like an event canceling mechanism.20:32
racarrand for shell surface clients (i.e. launcher dash, etc)20:33
racarrthey can receive events much like a regular client would (through Qt) and20:33
racarrhandle them or not20:33
dandradere.g. both shell and client application get touch events and once (if) shell recognizes a gesture it wants (out of the current touches) if would grab the gesture and the client app would be a event/gesture/touches canceled event20:34
kgunndandrader: mmm, are  you sure? have you considered shell _being_ the filter for both ?...i know you said replay touches expensive but shouldn't it be "gestures" not touches by then?20:35
racarrhmm. sounds tricky20:35
thomikdub: ok, thanks - will investigate today.20:35
racarrwhat if the client has already processed the event? It can't20:35
racarrnecessarily rewind what it has done20:35
racarrso there are lots of situations there where20:35
racarrthe right thing happening is left open to a race of whomever recognizes the gesture first20:36
racarrthere are a few cases events can be cancelled20:36
racarri.e. removed by the event filter, cancelled before dispatch (by a sort of dispatch filter)...but this could allow events to go through to certain surfaces or certain shell surfaces while not allowing dispatch to20:36
racarroccur.20:37
racarrThen when events are unhandled20:37
racarrthey can be cancelled or retargeted20:37
racarrI think...hmm. I think in the future if we want to get in to this sort of give client and shell event and let gesture recognizing decide who gets it20:38
racarrwe can extend the idea of event handling with some sort of score.20:38
dandraderwhat I mean is the rationale explained here: http://lwn.net/Articles/485484/20:39
racarrdandrader: This is describing sequential delivery though right? like the shell has a chance to see it and back up the stream20:40
dandraderalthough it requires an application have logic to undo whatever it has done with the events of a touch point that got cancelled (because the shell grabbed it)20:40
racarrthen unflood them20:40
racarrYes. if we could count on applications20:41
racarrto have that logic it would be a very cool solution20:41
racarrbut I'm not sure it's possible.20:41
dandraderit's all about removing the latency involved in replaying a bunch of touch events to an application after gesture recognition is done by the shell and shell decides it does not want this touch point20:41
kgunndandrader: dumb question...so is there something on the qt i/f where an app says "handled" wrt touch events/gestures?20:43
kgunnkgunn: it would seem you either make the shell the master, filter & replay...or you have some other detached monitoring object you can have shell & app20:43
kgunndandrader: both indicate to...."i've got it"20:44
kgunnand avoid the replay20:44
kgunnwhile at the same time avoiding having both shell20:45
kgunn& app operate on the same event stream20:45
dandradera similar (but simpler) situation happens when you flick a list of buttons in a touchscreen. you press over a button and it goes to pressed state, but once you start dragging your finger vertically the flickable component takes over the touch point and the button receives a cancellation event. so the button gets "unpressed" instead of released (and therefore clicked) and the list scrolls20:47
dandraderkgunn, no qt doesn't have that. if I understood you correctly20:51
dandraderbut, well, gotta go. let's continue the discussion tomorrow20:51
racarrWe can allow qt in the shell to have it perhaps though20:54
bschaeferracarr, sweet, receiving mouse events :)20:56
bschaeferracarr, also, it looks like you don't have to do the modifiers, as you are suppose to do that on the user side i guess...20:56
bschaefercheck if the event.mod & LSHIFT && SDLK_4 works for me for '$'...strange though...20:57
bschaeferas how I was checking the "$" before was even failing in X1120:58
kdubfrom the android side, if the first edition of ubuntu touch with mir underneath doesn't rely on qt, then we're ok from the graphics side21:00
kdubandroid 'in process egl' is slated in the blueprints for ubuntu-13.07:21:01
thomikdub: docs uploading fixed - they should be up to date now (well, once the web cache times out anyway) - let me know if you see anything else amiss21:06
kdubthomi, cool, thanks!21:06
racarrtest was failing due to uninitialize memory accidentally enabling21:29
racarrpointer acceleration21:29
racarrhaha!21:29
racarrComment on https://code.launchpad.net/~robertcarr/platform-api/mirclient/+merge/160217 would be really appreciated21:44
racarrif it seems confusing, please harass me and ask questions because a qt backend supporting input is something we need to move forward on quickly if we want to get the most out of next week :)21:45
racarrAlso does anyone have time to check https://code.launchpad.net/~robertcarr/mir/demo-shell/+merge/159253 out? alf is on vacation so it needs another review21:46
kdubracarr, i'll review21:55
racarrkdub:  thanks :)21:58
racarrkdub: The crash in demo shell22:50
racarrwas due to initializer_list secretly capturing by reference22:50
racarrso we had an me::ApplicationSwitcher22:50
racarrand a temporary mi::EventFilter shared_ptr was created22:50
racarrfor the initializer_list22:50
racarrthen it was destroyed when the scope exited and22:51
racarrinitializer list has a bogus reference22:51
racarrinitializer_list is weird :p22:51
racarrit's fixed now due to owning the list in main22:51
racarrAnyone have any problem with me switching this to approved: https://code.launchpad.net/~robertcarr/mir/reflow-input-focus-selection/+merge/15922523:08
racarrapprove from alan + an old (addressed) needs fixing from alf23:08
kdubracarr, looking it over... one min23:29

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!