[epiphany/gnome-3-26] option-menu: Fix calculation of x value for multiple screen setups



commit 3b6a0282e3c97a9fa37ed4e6a7194b25d09b5962
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 e4ec7f6..14fd1c4 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]