After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757036 - focus-out-event called a few more times when the widget is removed in the focus-out-event handler
focus-out-event called a few more times when the widget is removed in the foc...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-10-23 20:37 UTC by Alex Băluț
Modified: 2018-04-14 23:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Python script showing the bug (472 bytes, text/plain)
2015-10-23 20:37 UTC, Alex Băluț
Details

Description Alex Băluț 2015-10-23 20:37:09 UTC
Created attachment 313968 [details]
Python script showing the bug

Run the attached script, notice the entry is focused, click in another window, notice "out" printed 5 more times, along with some warnings:

$ python bug.py
sys:1: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.

(bug.py:20318): IBUS-WARNING **: Unable to connect to ibus: Could not connect: Connection refused
in
out <gtk.gdk.X11Window object at 0x7fd55f737510 (GdkX11Window at 0x1af22e0)> <Box object at 0x7fd569accf30 (GtkBox at 0x1b39110)>
out None None

(bug.py:20318): Gtk-CRITICAL **: gtk_container_remove: assertion '_gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container) || GTK_IS_ACTION_BAR (container) || GTK_IS_POPOVER_MENU (container)' failed
out None None

(bug.py:20318): Gtk-CRITICAL **: gtk_container_remove: assertion '_gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container) || GTK_IS_ACTION_BAR (container) || GTK_IS_POPOVER_MENU (container)' failed
out None None

(bug.py:20318): Gtk-CRITICAL **: gtk_container_remove: assertion '_gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container) || GTK_IS_ACTION_BAR (container) || GTK_IS_POPOVER_MENU (container)' failed
out None None

(bug.py:20318): Gtk-CRITICAL **: gtk_container_remove: assertion '_gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container) || GTK_IS_ACTION_BAR (container) || GTK_IS_POPOVER_MENU (container)' failed
out None None

(bug.py:20318): Gtk-CRITICAL **: gtk_container_remove: assertion '_gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container) || GTK_IS_ACTION_BAR (container) || GTK_IS_POPOVER_MENU (container)' failed
Comment 1 Matthias Clasen 2015-10-23 20:50:24 UTC
Changing the widget hierarchy in focus-in or focus-out is not a good idea.
Comment 2 Alex Băluț 2015-10-23 20:58:44 UTC
widget.props.has_focus is already False. Maybe it could be taken into consideration when deciding whether to trigger the signal.
Comment 3 Matthias Clasen 2018-02-10 04:55:13 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 4 Matthias Clasen 2018-04-14 23:58:41 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new