Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp, linux

Research direction

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.

Written by the indexing model from the issue text.

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
Dominant language
C++
Stars
34
Forks
7
Avg merge
3d 1h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libnativeapi/nativeapi

All issues in libnativeapi/nativeapi

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.