fix: 오버레이 창 고정/항상 위 토글 시 오버레이가 사라지는 버그#80
Open
eun-yeon wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
설정에서 오버레이 창 고정이나 항상 위에 표시를 토글하면 오버레이 창이 꺼져버리는 버그 수정
Windows에서 오버레이 show/hide를 raw
ShowWindow로 처리하고 있어서 tao 내부 VISIBLE 플래그가 실제 창 상태와 어긋나는 중tao는 윈도우 플래그가 하나라도 바뀌면 내부 상태 기준으로 창 상태를 통째로 재적용하는데(
apply_diff), 이때 내부 VISIBLE이 false면 무조건SW_HIDE를 호출하는 문제가 있어요.그래서 "숨김으로 생성됐다가 raw로 표시된" 창(= 앱 시작 시 오버레이가 꺼져 있다가 나중에 켠 세션)에서
set_ignore_cursor_events/set_always_on_top이 불리는 순간 창이 증발앱 시작부터 오버레이가 켜져 있으면 플래그가 일치해서 멀쩡한 거였고 글로벌 단축키로 토글해도 동일하게 발생하는 문제였습니다.
같은 메커니즘으로 raw
SetWindowLongW로 적용한WS_EX_NOACTIVATE도 tao가 모르는 상태라 스타일 재적용 때 소실되고 토글 한 번 후부터 오버레이가 클릭 시 포커스를 뺏는 잠재 버그도 같이 있었습니다.raw
ShowWindow우회가 들어온 92109f1(1.3.0)부터 있던 문제변경 내용
백엔드
show_overlay_window: rawShowWindow(SW_SHOWNOACTIVATE)직후window.show()호출로 tao 내부 VISIBLE 플래그 동기화hide_overlay_window: rawSW_HIDE→ taowindow.hide()로 교체 (숨김은 포커스 우려가 없어 우회 자체가 불필요)set_window_no_activate제거 →window.set_focusable(false)로 대체 — tao가 FOCUSABLE 플래그로WS_EX_NOACTIVATE를 추적해서 스타일 재적용에도 보존.focused(false)추가 tao의 첫 표시가SW_SHOWNOACTIVATE로 처리되도록 변경macOS는 원래 tao API 경로를 쓰고 있어서 변경 안 했어용
테스트
cargo check/cargo clippy/cargo fmt통과