Make Focus() / Blur() reliable and let Blur() return focus to the previous app
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- cpp
- Bereich
- desktop, operating-systems
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- C++
- Sterne
- 34
- Forks
- 7
- Ø Merge
- 3 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus libnativeapi/nativeapi
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
libnativeapi/nativeapi#81 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
libnativeapi/nativeapi#80 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
libnativeapi/nativeapi#79 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
libnativeapi/nativeapi#78 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
libnativeapi/nativeapi#77 ·
Alle Issues in libnativeapi/nativeapi
Ähnliche Issues
-
AuTest Bug Tests
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apache/trafficserver#13714 ·
-
bug build
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
facebookincubator/velox#19143 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
tenstorrent/tt-metal#57393 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
objectionary/eo-graphs#74 ·