mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-19 18:00:09 +00:00
Fix for bug 672961 - Custom theme can crash apps with GtkEntryCompletion
This commit is contained in:
parent
52bd5f2f1f
commit
94dbefda1c
@ -1513,7 +1513,9 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
|
|||||||
monitor_num = gdk_screen_get_monitor_at_window (screen, window);
|
monitor_num = gdk_screen_get_monitor_at_window (screen, window);
|
||||||
gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
|
gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
|
||||||
|
|
||||||
if (y > monitor.height / 2)
|
if (height == 0)
|
||||||
|
items = 0;
|
||||||
|
else if (y > monitor.height / 2)
|
||||||
items = MIN (matches, (((monitor.y + y) - (actions * action_height)) / height) - 1);
|
items = MIN (matches, (((monitor.y + y) - (actions * action_height)) / height) - 1);
|
||||||
else
|
else
|
||||||
items = MIN (matches, (((monitor.height - y) - (actions * action_height)) / height) - 1);
|
items = MIN (matches, (((monitor.height - y) - (actions * action_height)) / height) - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user