GtkWindow: Fix a use-after-free
We were printing a string in a warning after freeing it. Also, fix an x/y typo that might cause popovers to be mispositioned.
This commit is contained in:
@ -6452,7 +6452,7 @@ popover_get_rect (GtkWindowPopover *popover,
|
|||||||
{
|
{
|
||||||
rect->y = popover->rect.y + popover->rect.height;
|
rect->y = popover->rect.y + popover->rect.height;
|
||||||
|
|
||||||
if (rect->y + rect->height < win_alloc.x + win_alloc.height &&
|
if (rect->y + rect->height < win_alloc.y + win_alloc.height &&
|
||||||
gtk_widget_get_vexpand (popover->widget))
|
gtk_widget_get_vexpand (popover->widget))
|
||||||
rect->height = win_alloc.y + win_alloc.height - rect->y;
|
rect->height = win_alloc.y + win_alloc.height - rect->y;
|
||||||
}
|
}
|
||||||
@ -11163,14 +11163,16 @@ gtk_window_activate_menubar (GtkWindow *window,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
gtk_accelerator_parse (accel, &keyval, &mods);
|
gtk_accelerator_parse (accel, &keyval, &mods);
|
||||||
g_free (accel);
|
|
||||||
|
|
||||||
if (keyval == 0)
|
if (keyval == 0)
|
||||||
{
|
{
|
||||||
g_warning ("Failed to parse menu bar accelerator '%s'\n", accel);
|
g_warning ("Failed to parse menu bar accelerator '%s'\n", accel);
|
||||||
|
g_free (accel);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (accel);
|
||||||
|
|
||||||
/* FIXME this is wrong, needs to be in the global accel resolution
|
/* FIXME this is wrong, needs to be in the global accel resolution
|
||||||
* thing, to properly consider i18n etc., but that probably requires
|
* thing, to properly consider i18n etc., but that probably requires
|
||||||
* AccelGroup changes etc.
|
* AccelGroup changes etc.
|
||||||
|
|||||||
Reference in New Issue
Block a user