Code review comment for lp:~samuel-thibault/compiz/shortcuts

Revision history for this message
Samuel thibault (samuel-thibault) wrote :

Hello,

I agree that selecting XI2 events only when needed would be ideally ideal, but
the obtained optimization (avoiding to trivially convert from XI2 events to core
events) does not seem to me worth the complexity cost.

Assuming that we avoid that complexity and just make compiz use XI2 whenever
available (Unity requires it anyway), things would be much simpler:

- Unity can use XIGetSelectedEvents() to determine what Compiz configured, and
merge it before XISelectEvents() and resume it, as you suggested.

- Compiz only disables XI2 temporarily within PrivateWindow::reparent(), so it
can also use XIGetSelectedEvents() to restore it as it was, either the original
compiz set or the set as merged by Unity.

That way, both sides are easily careful about what was set by the other side.

What do you think?

Samuel

« Back to merge proposal