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 743437 - GtkPopover attached to GtkCellEditable is misplaced
GtkPopover attached to GtkCellEditable is misplaced
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkPopover
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 743260
 
 
Reported: 2015-01-24 09:33 UTC by Kjell Ahlstedt
Modified: 2018-05-02 16:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (11.89 KB, text/plain)
2015-01-24 09:33 UTC, Kjell Ahlstedt
Details

Description Kjell Ahlstedt 2015-01-24 09:33:07 UTC
Created attachment 295314 [details]
Test case

If a GtkPopover is attached to an editable cell in a GtkTreeView when the
cell is opened for editing, the GtkPopover is not drawn at that cell.


When the popover is attached in an editing-started signal handler, the
GtkCellEditable (which is a GtkEntry) has not yet been added to a container
widget. When it is added to a container, the hierarchy-changed signal is
emitted, and the following functions are called:
  _gtk_popover_parent_hierarchy_changed()
  gtk_popover_update_position()
  _gtk_window_set_popover_position()

But _gtk_window_set_popover_position() does not update the position of any
GdkWindow. That's done in popover_size_allocate() in gtkwindow.c.

It's tempting to try to fix the bug by calling popover_size_allocate() from
_gtk_window_set_popover_position(), but that would result in infinite
recursive function calls:
  _gtk_window_set_popover_position()
  popover_size_allocate()
  gtk_popover_update_position()
  _gtk_window_set_popover_position()
  ...........


The test case also shows a second bug. When the editing is finished, and the
GtkEntry is unmapped, warnings such as these are printed:

(example:2861): Gtk-WARNING **: GtkWindow 0x802230 is mapped but visible child
                GtkPopover 0x8679f0 is not mapped

They come from gtk_widget_verify_invariants().
Comment 1 Kjell Ahlstedt 2016-07-08 11:45:15 UTC
Some things have changed since I filed this bug. The popover is still misplaced,
but the warning messages have changed. No warning is printed when the editing
is finished. Instead several warnings such as this one are printed while the
popover is shown:

(example:3599): Gtk-WARNING **: GtkPopover 0x224e400 is drawn without a current
                allocation. This should not happen.

This warning has recently been added to gtk_widget_draw_internal().
Comment 2 Daniel Boles 2017-10-12 11:38:39 UTC
As of now, I see no warnings, but the popover still stays pointing at the top-left corner of the column containing the relevant editables.
Comment 3 GNOME Infrastructure Team 2018-05-02 16:22:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/528.