Page MenuHomePhabricator

Ecore KeyDown missing window id on OS X
Closed, ResolvedPublic


When using the ECORE_EVENT_KEY_DOWN event handler on OS X the Ecore_Event_Key->window property is nil when pressing a meta key.

Shift, Ctrl, Alt and Cmd all don't have a window associated with the created event info.

bu5hm4n triaged this task as High priority.
zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:50 AM
bu5hm4n edited projects, added efl: input; removed Restricted Project.Jun 11 2018, 7:38 AM
zmike assigned this task to jayji.Jun 20 2018, 11:28 AM
zmike added subscribers: netstar, zmike.

I'm not an expert on mac system programming or whatever language the .m files are written in.

With that said, it seems like the implementation for key events is missing a couple of things:

  • key name memory is never explicitly duplicated, so probably this is invalid access any time you are reading it?
  • there is an explicit block at ecore_cocoa.m:264 for creating events for modifiers, and this never sets the window struct member (causing this bug)

I'm not sure what the status of our macos developer manpower is, but if someone on this ticket isn't planning to solve it then probably it won't be solved.

I can have a little look.

This was causing issue in using EFL.

Fixed in: a939b57c7b4da5171d92de93f1d837bcef842765

Thanks Mike for tertiary investigation!

zmike added a comment.Jun 21 2018, 5:58 AM

@netstar and what about the key string allocation?

Should be okay and point to valid address in data segment I reckon?

zmike added a comment.Jun 22 2018, 6:33 AM

Yes, but what about when it is just setting ->key to the event member? Is this memory guaranteed to persist too?