Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

[Linux] show/hide emission hooks are never removed; verify clean exit

Ouverte
#60 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
68/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
cpp, linux

Piste de recherche

Start in src/platform/linux/window_manager_linux.cpp at InstallGlobalSwizzling(), comparing the show/hide hooks with the nearby focus-in/focus-out hooks. Trace where window_manager shuts down and verify the hook lifecycle there. Done means a nativeapi Flutter app exits cleanly on Linux under X11 and Wayland, including after closing a secondary window created through package:nativeapi/windowing.dart.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug

InstallGlobalSwizzling() in src/platform/linux/window_manager_linux.cpp adds show / hide emission hooks on GtkWidget with g_signal_add_emission_hook(), but doesn't keep the hook ids, so they are never removed. The focus-in/focus-out hooks next to them are removed properly.

window_manager had a similar never-removed button-press-event emission hook in its Linux plugin. Users reported crashes when the app exits, or when a secondary Flutter window closes: FlutterEngineRemoveView ... The implicit view cannot be removed, followed by an epoxy/GLX assertion. The hooks here pass no user data, so they probably can't use a freed plugin pointer, but that should be confirmed:

  • keep the hook ids and remove them when the manager shuts down
  • check that a Flutter app with nativeapi exits cleanly on Linux (X11 and Wayland), including after a secondary window created through package:nativeapi/windowing.dart is closed

Background:

  • leanflutter/window_manager#585: crash on exit on Fedora 44 KDE X11, from just having the plugin
  • leanflutter/window_manager#567: a PR that removes the emission hook on plugin dispose
Langage dominant
C++
Étoiles
34
Forks
7
Merge moyen
3 j 1 h
PR mergées (30 j)
1

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de libnativeapi/nativeapi

Toutes les issues de libnativeapi/nativeapi

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.