Mir

Code review comment for lp:~alan-griffiths/mir/drag-and-drop-II

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

On 20/03/17 18:52, Brandon Schaefer wrote:
> + const_cast<MirPointerEvent*>(mir_input_event_get_pointer_event(input_event))->set_dnd_handle(handle);
> Why const cast this?

Because mir_input_event_get_pointer_event() returns a MirPointerEvent
const* which makes the set_dnd_handle() call illegal.

> You can do auto input_event = event.to_input(); Or if it defaults to const, MirInputEvent* input_event = event.to_input()

Eh?

--
Alan Griffiths +44 (0)798 9938 758
Octopull Ltd http://www.octopull.co.uk/

« Back to merge proposal