HomePhabricator

elementary: Check for valid cursor_rect when (un)setting focus

Authored by devilhorns on Aug 14 2018, 7:45 AM.

Description

elementary: Check for valid cursor_rect when (un)setting focus

Summary:
As the cursor_rect for elm_code_widget is not created until the code
widget gets focus, we cannot just assume it is already there when
trying to emit a focus signal. The cursor_rect does not get created
until widget_cursor_update is called.

This fixes an issue where NULL is passed to efl_layout_signal_emit.

To test this, just launch elementary_test and click the Code Editor
test. As soon as you try to click into the Code Editor, this gets
triggered.

ref T7030

Reviewers: netstar, ajwillia.ms

Reviewed By: netstar

Subscribers: reviewers, cedric, committers, zmike

Tags: efl

Maniphest Tasks: T7030

Differential Revision: https://phab.enlightenment.org/D6701