mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
Popover: If can't get widget rect, zero output ptr
cherry-pick of commit a6d40b610b
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/893#note_1766079
This commit is contained in:
parent
a02fc2d290
commit
d0ebd42e3e
@ -133,6 +133,8 @@
|
||||
|
||||
#include "gdk/gdksurfaceprivate.h"
|
||||
|
||||
#include <string.h> /* memset */
|
||||
|
||||
#define MNEMONICS_DELAY 300 /* ms */
|
||||
|
||||
#define TAIL_GAP_WIDTH 24
|
||||
@ -2192,7 +2194,10 @@ gtk_popover_get_pointing_to (GtkPopover *popover,
|
||||
GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (popover));
|
||||
|
||||
if (!gtk_widget_compute_bounds (parent, parent, &r))
|
||||
return FALSE;
|
||||
{
|
||||
memset (rect, 0, sizeof (GdkRectangle));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rect->x = floorf (r.origin.x);
|
||||
rect->y = floorf (r.origin.y);
|
||||
|
Loading…
Reference in New Issue
Block a user