[epiphany] option-menu: Fix calculation of x value for multiple screen setups
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] option-menu: Fix calculation of x value for multiple screen setups
- Date: Mon, 29 Jan 2018 14:32:09 +0000 (UTC)
commit 37b9c6e69950729981c352e245772f2e51c9d78f
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Fri Jan 26 23:26:11 2018 +0100
option-menu: Fix calculation of x value for multiple screen setups
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=792940
embed/ephy-option-menu.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-option-menu.c b/embed/ephy-option-menu.c
index 75441a2..15d1dd9 100644
--- a/embed/ephy-option-menu.c
+++ b/embed/ephy-option-menu.c
@@ -584,9 +584,7 @@ ephy_option_menu_popup (EphyOptionMenu *menu,
gtk_scrolled_window_set_min_content_height (swindow, n_items * height);
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL);
- if (x < area.x)
- x = area.x;
- else if (x + menu_req.width > area.x + area.width)
+ if (x + menu_req.width > area.x + area.width)
x = area.x + area.width - menu_req.width;
if (y + rect->height + menu_req.height <= area.y + area.height ||
@@ -595,6 +593,7 @@ ephy_option_menu_popup (EphyOptionMenu *menu,
} else {
y -= menu_req.height;
}
+
gtk_window_move (GTK_WINDOW (menu), x, y);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (menu->view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]