After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792940 - Combo box does not open in dual screen setup
Combo box does not open in dual screen setup
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Interface
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-26 22:25 UTC by Jan-Michael Brummer
Modified: 2018-01-29 14:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing option box (1.23 KB, patch)
2018-01-26 22:27 UTC, Jan-Michael Brummer
committed Details | Review

Description Jan-Michael Brummer 2018-01-26 22:25:30 UTC
Within a dual screen setup epiphanys own implementation of combobox does not open on the screen next to primary (0/0) screen. This is caused by computing the wrong x value of the popup.
Comment 1 Jan-Michael Brummer 2018-01-26 22:27:19 UTC
Created attachment 367490 [details] [review]
Patch fixing option box
Comment 2 Michael Catanzaro 2018-01-27 02:13:24 UTC
Review of attachment 367490 [details] [review]:

::: embed/ephy-option-menu.c
@@ +586,2 @@
   gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL);
+  if (x + menu_req.width > area.x + area.width)

So... are x and area.x using values from two separate coordinate systems? Is x given in "global coordinates" taking into consideration both monitors, while area.x is given in monitor-specific coordinates?

My concern is that this check might not be right either, if the check you removed is not right.

And then what about the y coordinate checks below? I assume that will break if you stack monitors vertically instead of horizontally, right?
Comment 3 Jan-Michael Brummer 2018-01-27 09:04:00 UTC
Well, beside my trust in code i double checked it with all configurations:

- Left/Right/Up/Down with Primary/Secondary configuration both on a dual screen setup using Wayland and X

Everything works as expected now.
Comment 4 Jan-Michael Brummer 2018-01-27 09:05:16 UTC
And sorry for not answering your question: those values are monitor specific.
Comment 5 Carlos Garcia Campos 2018-01-29 07:42:00 UTC
This code was copied from gtkcombobox.c, so we should do the same thing than GTK+. Are GTK+ combo boxes working fine for you?
Comment 6 Jan-Michael Brummer 2018-01-29 12:50:08 UTC
Yes, gtk combobox has been changed to gtk_menu_popup_xxx function.
Comment 7 Michael Catanzaro 2018-01-29 14:21:07 UTC
(In reply to Jan-Michael Brummer from comment #6)
> Yes, gtk combobox has been changed to gtk_menu_popup_xxx function.

So can we use that...?
Comment 8 Jan-Michael Brummer 2018-01-29 14:27:17 UTC
Not yet, as they have a menu and we have a treeview with a window. Why is that btw? Could it be switched to gmenu?
Comment 9 Michael Catanzaro 2018-01-29 14:31:44 UTC
(In reply to Jan-Michael Brummer from comment #8)
> Not yet, as they have a menu and we have a treeview with a window. Why is
> that btw? Could it be switched to gmenu?

I'll let Carlos answer this