Make Focus() / Blur() reliable and let Blur() return focus to the previous app
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- desktop, operating-systems
Direzione di ricerca
Start by locating the platform implementations of Window::Focus(), Blur(), and IsFocused(), then inspect the Windows, Linux, and macOS focus behavior described in the issue. Done means focus changes succeed reliably across those platforms and Blur() returns focus to the previously active window or app.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Window::Focus() and Blur() follow the platforms' simplest calls and fail in common cases:
- Windows:
Focus()isSetForegroundWindow+SetFocus, which the foreground lock refuses when the app isn't in the foreground (only the taskbar flashes). Consider theAttachThreadInput/AllowSetForegroundWindowapproaches, and checkIsFocused()after focus changes. - Linux:
gtk_window_present()without a timestamp is subject to focus-stealing prevention; usegtk_window_present_with_time()with the last event time. Blur()should hand focus back to the previously active window or app. On macOS it only doesorderBack:, and on WindowsSetFocus(nullptr), which leaves the app active. Typical use: a launcher/search bar that hides and pastes into the previous app. Related: libnativeapi/nativeapi#59 (app-level hide on macOS).
Background:
- leanflutter/window_manager#364: focus() not always working, isFocused() always false (Windows)
- leanflutter/window_manager#218: focus() doesn't focus the window on Ubuntu
- leanflutter/window_manager#387: how to unfocus the window and bring back the previous one
- leanflutter/window_manager#352: focus the previous window when hiding
- Lingua principale
- C++
- Stelle
- 34
- Fork
- 7
- Merge medio
- 3g 1h
- PR unite (30g)
- 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di libnativeapi/nativeapi
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
libnativeapi/nativeapi#81 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
libnativeapi/nativeapi#80 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
libnativeapi/nativeapi#79 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
libnativeapi/nativeapi#78 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
libnativeapi/nativeapi#77 ·
Tutte le issue di libnativeapi/nativeapi
Issue simili
-
AuTest Bug Tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/trafficserver#13714 ·
-
bug build
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
facebookincubator/velox#19143 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
tenstorrent/tt-metal#57393 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
objectionary/eo-graphs#74 ·