Skip to content

gtk.cfg: Fix gtk_widget_destroy definition and usage#8546

Open
Tamaranch wants to merge 1 commit into
cppcheck-opensource:mainfrom
Tamaranch:gtk_widget_destroy
Open

gtk.cfg: Fix gtk_widget_destroy definition and usage#8546
Tamaranch wants to merge 1 commit into
cppcheck-opensource:mainfrom
Tamaranch:gtk_widget_destroy

Conversation

@Tamaranch
Copy link
Copy Markdown
Contributor

gtk_widget_destroy is only for GtkWidget derived objects.

@chrchr-github
Copy link
Copy Markdown
Collaborator

Please add a (simple) example using gtk_widget_destroy() in gtk.c.

@Tamaranch Tamaranch force-pushed the gtk_widget_destroy branch from 5d43e32 to 435e7b4 Compare May 11, 2026 13:43
@Tamaranch
Copy link
Copy Markdown
Contributor Author

Please add a (simple) example using gtk_widget_destroy() in gtk.c.

Done. I also removed duplicate definition of gtk_widget_destroy and added definition of gtk_window_new for proper test.

@chrchr-github
Copy link
Copy Markdown
Collaborator

The value of GTK_WINDOW_TOPLEVEL seems to be documented, so you could add it to gtk.cfg to fix the CI failure.

@Tamaranch Tamaranch force-pushed the gtk_widget_destroy branch from 435e7b4 to b3bad5f Compare May 11, 2026 14:56
@Tamaranch
Copy link
Copy Markdown
Contributor Author

Tamaranch commented May 11, 2026

The value of GTK_WINDOW_TOPLEVEL seems to be documented, so you could add it to gtk.cfg to fix the CI failure.

I wasn't notified for the CI failure, sorry. (err: now I am :))

@Tamaranch Tamaranch changed the title gtk.cfg: Remove incorrect release function gtk.cfg: Fix gtk_widget_destroy definition and usage May 12, 2026
gtk_widget_destroy is only for GtkWidget derived objects, and in
practice should only be used for GtkWindow derived widgets (it is
replaced with gtk_window_destroy in gtk4).
@Tamaranch Tamaranch force-pushed the gtk_widget_destroy branch from b3bad5f to b4da3c5 Compare May 12, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants