Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NUI] Awake process controller when someone add ProcessEventOnce #5575

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/Tizen.NUI/src/internal/Common/ProcessorController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ public void Process()
onceEventIndex = 0;
internalProcessorOnceEvent[1]?.Invoke(this, null);
internalProcessorOnceEvent[1] = null;

// If once event added during 1 event invoke, request Process again as Idle.
if (internalProcessorOnceEvent[0] != null)
{
Awake();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 동작이 되는건가요? 제가 테스트했을땐, Process callback안에서 호출하는 Awake()는 동작을 안하는것 같은데.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://review.tizen.org/gerrit/c/platform/core/uifw/dali-adaptor/+/299045
https://review.tizen.org/gerrit/c/platform/core/uifw/dali-csharp-binder/+/299044

위 두 패치가 반영되어야지 동작을 합니다. Description 에도 추가해놓겠습니다.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dali에 넣은 코드만으로 충분한것 아닌가요?
Dali의 변경 사항은 Awake가 Process callback중에 호출되었을때 동작하도록 수정한것 같은데,

기존에 ProcessorOnceEvent 에 이벤트를 등록 하는 행위가 Awake를 의미하지 않았고, 이벤트를 등록한 후에 명시적으로 Awake를 하도록 가이드가 되었었습니다.

그런데 지금 변경 사항은 ProcessOnceEvent 수행 도중에 ProcessOnceEvent에 핸들러를 추가가 발생 했을 때 자동으로 Awake를 호출해주는 상황이 되어 버립니다.

그래서 ProcessorOnceEventProcessorOnceEvent이벤트 처리 중에 추가 하는 것과 그렇지 않은 상황에 있어서 동작이 달라져 버립니다.

Copy link
Contributor Author

@hinohie hinohie Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

승근님 의견이 맞는 듯 합니다. 이 PR 없이 달리쪽 수정사항 만으로도 현재 제가 원하는 동작을 할 수 있을 듯 합니다. 이 PR 은 close 해두겠습니다.

}
}

/// <summary>
Expand All @@ -124,7 +130,7 @@ protected override void Dispose(DisposeTypes type)
/// It will call ProcessController.processorCallback and ProcessController.processorPostCallback hardly.
/// </summary>
/// <note>
/// When event thread is not in idle state, This function will be ignored.
/// When event thread is not in idle state, This function will request process on next idle state.
/// </note>
[EditorBrowsable(EditorBrowsableState.Never)]
public void Awake()
Expand Down