/srv/irclogs.ubuntu.com/2014/12/04/#ubuntu-mir.txt

=== LockeAnarchist- is now known as LockeAnarchist
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
duflu_Hmm, is CI really asleep now? I guess it will take some hours to be sure03:41
=== duflu_ is now known as duflu
rsalvetiracarr: still around?04:33
rsalvetiracarr: do you know who is the one responsible for sending the input events to qt and then shell?04:37
rsalvetiracarr: just trying to understand the big picture04:37
rsalvetimy problem is that I'm getting KEY_PLAYPAUSE from the input device (kernel level), but I'm not getting Qt::Key_MediaTogglePlayPause in Qt, but getting another event id instead04:38
rsalvetisame for KEY_MEDIA04:38
rsalvetiI'm checking that in the qml available for the shell04:39
rsalvetiI know mir is handling the input events, but don't yet know how that works with the rest of the stack04:39
rsalvetiif it's something like evdev -> mir -> qt -> shell or different than that04:39
RAOFrsalveti: That's right; evdev -> mir -> Qt -> shell.04:42
rsalvetiRAOF: do you know if mir is doing any parsing or filtering of the evdev events before sending that to Qt?04:43
rsalvetialso, do we need any sort of platform specific backend in Qt to handle the input device messages from Mir?04:44
rsalvetithis is specifically to touch, not sure if that would be any different from the desktop use case04:44
duflursalveti: AFAIK we have a lack of key translation, which is a missing feature :)04:46
RAOFrsalveti: So, we do some input parsing before feeding to Qt; the bit that you'd be interested in is in qtmir - src/platforms/mirserver/qteventfeeder.{h,cpp}04:46
rsalvetiawesome04:47
RAOFAs you see, that implements a mir::input::InputDispatcher, which hooks into the Mir event feeding.04:48
rsalvetiright, and hooks into Qt04:50
rsalvetiperfect, thanks!04:50
racarrrsalveti: RAOF: By the time unity8 receives it its already gone through USC05:01
racarrso the events are fully processed, keys are XKB mapped, etc...05:01
racarralso my buffer stream bug is hilariously comical05:01
racarrwas05:02
racarr*swats*05:02
RAOFDon't leave us hanging!05:05
RAOFracarr: Oh, yeah. That bit too :)05:05
racarrRAOF: Haha...its hard to explain. Ok so imagine you are trying to implement05:06
racarrms::BasicSurface::set_cursor_buffer_stream(...05:07
* RAOF imagines05:07
racarrso I had the idea, ok well, it will just install an adapter object05:07
racarrwhich will register itself as an observer with the buffer stream05:07
racarrand each time a buffer appears, create a cursor image from it and05:08
racarrjust call Surface::set_cursor_image05:08
RAOFThis seems sensible.05:08
racarryeah not totally insane, not the easiest to make efficient but quick05:08
racarrso, this adapter object is a member of the surface05:09
racarr...so in set_cursor_image05:09
RAOF...you take a lock...05:09
racarrno haha even sillier05:09
racarrI reset the adapter object!05:09
racarrbecause05:09
racarrset_cursor_image was a request to switch to05:09
racarran image05:09
racarran uninstall05:09
racarrthe buffer stream observer05:09
RAOFOooh, yeah!05:10
racarr(which you would need to happen if you really did change to a static image)05:10
racarrand then the icing on the cake is I eronneously concluded it was client buffer swaps not properly completing05:10
racarrby debugging the deprecated SessionMediator::advance_buffer function05:11
racarrlol05:11
RAOFHah. Gold!05:11
racarrclassic comedy lol05:11
racarrok thats good though05:11
racarrthen tomorrow morning I can focus on cleaning it up and in the afternoon05:11
racarron client clean up05:12
racarromg I never ate dinner05:12
RAOFOoops!05:12
racarrhmm05:15
racarrthe Qt::Key_MediaTogglePlayPause problem must just be05:15
racarrthe static table in qteventfeeder05:15
racarrhowever for clients...05:15
racarrthere is the other table in qtubuntu05:15
racarrbut how does (Qtmir::)MirSurfaceItem::consume05:16
racarrwork05:16
racarre.g. do we translate xkb key code -> qt key code -> back to xkb05:16
racarror is it broken and clients can't receive things like media keys05:16
racarrfor most things it will work because xkb key sym corresponds05:16
racarrwith qt keycode05:16
racarrcorresponds with unicode code point05:16
racarrbut media keys, etc are the exception and thats what the table is for05:16
racarr*looks*05:17
racarrah not cool, qt tracks the "native virtual key"05:18
racarrno* cool05:18
racarrand thats used to reconstruct05:18
racarrthe mir event05:18
racarrrsalveti: It should work if you add it to the top of the table at qteventfeeder.cpp05:19
racarrWHAT TO EAT05:19
dufluracarr: While you are cursor tinkering... it's occurred to me that a cursor isn't just per-surface but also varies between tools. E.g. mouse vs stylus vs finger touchpoints. They could (should) have different appearance05:51
dufluWhen playing with a stylus I thought it would be nice if the cursor on screen showed which tool actually produced the last event to move the cursor05:52
racarrmm maybe05:53
racarrI think shells should be able to implement that05:54
dufluracarr: Yeah definitely shells/clients pick the images. But you have to tell them from the server what the tool is05:55
dufluBut before all that, we would need to teach Android input how to move the cursor with tools other than the mouse05:56
dufluBecause it doesn't want to05:56
racarryeah, after we transition out old MirKeyEvent and MirMotionEvent05:59
racarrim looking forward to starting to unwind this by differentiating05:59
racarrMirTouchInputEvent and MirPointerInputEvent05:59
dufluracarr: Which is a hovering stylus? :)05:59
racarrand all the various combinations of synthesis required to support, synaptics, pointer emulation, wacom<->pointer, etc.05:59
racarrduflu: Well, in this case if the stylus was configured for pointer emulation06:00
racarryou would first receive the "raw" MirTouchInputEvent06:00
racarrand it would have a non null06:00
racarr"synthesized_to" member06:00
racarrwhich is the ID, of an event which you can expect immediately06:00
racarrsynthesized from the event06:00
racarrand the client can choose to interpret it06:01
racarras a touch06:01
dufluHmm, I've got another semi-broken laptop with stylus. I think it turns on now... so will try that06:01
racarror interpret the cursor motion in the synthetic pointer event06:01
racarrI mean it definitely06:01
racarrdoesnt work at the moment haha06:01
dufluracarr: I like how it works now (stylus is like a finger). Just want a cursor shown during hover06:01
RAOFHm.06:35
RAOFI don't think you want per-tool cursors.06:35
RAOFBut mainly because only the mouse - virtual or otherwise - has a cursor.06:35
RAOFTouchpoints obviously don't get cursors; the stylus likewise.06:35
RAOF(Unless it's manipulating the virtual mouse cursor, but in that case see virtual mouse cursor)06:36
dufluRAOF: I can see a cursor for the stylus in X. But would prefer it looked different to the mouse06:52
RAOFHow would that work?06:53
RAOFThe cursor would change depending on what input device you touched?06:53
dufluRAOF: Change the cursor to match whatever tool caused it to move last06:53
RAOFThat's possible, I guess, but why would you ever want to do that?06:54
RAOFIt always does the same thing.06:54
dufluRAOF: It's a subtle bit a feedback that makes the user more comfortable that the system understands what they're doing06:55
dufluAn arrow for the stylus looks kludgy06:56
RAOFMaybe, I guess?06:56
dufluAnd may be visibly annoying too (too big)06:56
dufluMan, I'm digging myself in. This branch went from just implementing fullscreen to doing half the WM spec06:57
dufluStill in under 1000 lines :)06:57
RAOFIf you're using the stylus for anything stylus-y then you won't have the arrow, anyway?06:58
RAOFIt might be useful; I suspect that it'll actually appear weird.06:58
dufluRAOF: If you're using the stylus primarily then you don't want to switch to mouse to click a button. So you have to see where you're aiming06:59
RAOFRight, but why would you want the cursor to be smaller when you're using the stylus?07:00
dufluRAOF:  I guess I'm imagining that a paint app forgets to change its cursor07:00
RAOF:)07:01
=== chihchun is now known as chihchun_afk
mlankhorstdoes eglSwapBuffers block?11:40
mlankhorstor what call should I use to check when a new mir surface is available for rendering11:40
=== alan_g is now known as alan_g|lunch
mlankhorstoh seems to block then..14:18
=== dandrader_ is now known as dandrader|afk
=== alan_g|lunch is now known as alan_g
=== dandrader|afk is now known as dandrader
=== chihchun_afk is now known as chihchun
=== Saviq_ is now known as Saviq
=== chihchun is now known as chihchun_afk
=== dandrader is now known as dandrader|lunch
=== dandrader|lunch is now known as dandrader
=== alan_g_ is now known as alan_g|EOD
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader

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