Tryton - Issues

 

Issue7879

Title GTK-Client: Filter not working in wayland
Priority bug Status deferred
Superseder Nosy List Timitos, ced, hbrandes, nicoe, pokoli, rhertzog
Type behavior Components tryton
Assigned To Keywords
Reviews

Created on 2018-11-23.12:09:40 by hbrandes, last changed by nicoe.

Files
File name Uploaded Type Edit Remove
tryton-weston.png rhertzog, 2020-05-14.14:23:45 image/png
Messages
msg58031 (view) Author: [hidden] (nicoe) (Tryton committer) Date: 2020-05-14.21:35:04
* Cédric Krier [mai 14, 2020 17:43]:
> 
> Cédric Krier <cedric.krier@b2ck.com> added the comment:
> 
> I could reproduce the problem using weston under X by using series 5.0.

Indeed I do have the same behaviour under a "normal" wayland session
with sway on 5.0

But on trunk the issue disappear probabaly as Cédric says because
we're now using the more correct way to display popover windows
instead of cooking our own implementation.
-- 
Nicolas Évrard - B2CK SPRL
E-mail/Jabber: nicolas.evrard@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
msg58027 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-05-14.17:43:07
I could reproduce the problem using weston under X by using series 5.0.
It seems that that wayland prevents the focus because we set the window type hint to POPUP_MENU. By removing it, it works (there is still the positioning issue):

diff -r 6dd6d0f242ac tryton/gui/window/view_form/view/screen_container.py
--- a/tryton/gui/window/view_form/view/screen_container.py      Sun May 10 11:23:03 2020 +0200
+++ b/tryton/gui/window/view_form/view/screen_container.py      Thu May 14 17:40:49 2020 +0200
@@ -537,8 +537,8 @@
             self.search_window = gtk.Window()
             Main().add_window(self.search_window)
             self.search_window.set_transient_for(widget.get_toplevel())
-            self.search_window.set_type_hint(
-                gtk.gdk.WINDOW_TYPE_HINT_POPUP_MENU)
+            #self.search_window.set_type_hint(
+            #    gtk.gdk.WINDOW_TYPE_HINT_POPUP_MENU)
             self.search_window.set_destroy_with_parent(True)
             self.search_window.set_decorated(False)
             self.search_window.set_deletable(False)
msg58020 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-05-14.16:08:43
If it is tryton 5.0 series, it does not use the popover but a window disguised as a popup (to get focus). We changed to popover later because it was the new proper way to get. So it is highly probable that it does not work on Wayland. So it is better to upgrade Tryton or to use X11 (for which tryton was developed at that time).
msg58017 (view) Author: [hidden] (rhertzog) (Tryton committer) Date: 2020-05-14.14:23:45
I made a quick try with weston under X11 with a small screen size (1024x768), and the popup window does not even open. I get a message:
Gdk-WARNING: **: ...: Tried to map a popup with a non-top most parent

This is with tryton-client 5.0.22-1, weston 8.0.0, wayland 1.18.0, gtk+ 3.24.20.

I made the same try with a larger screen (1600x1200) and now I get the filter popup but with the bug that I reported. I can't change any field. When I change the date through the widget I get another warning:

Window 0x... is already mapped at the time of grabbing. gdk_seat_grab() should be used to simultaneously grab input and show this popup. You may find oddities ahead.

(screenshot attached)
msg58016 (view) Author: [hidden] (rhertzog) (Tryton committer) Date: 2020-05-14.14:07:05
In my case, it's gnome-shell and not weston. First difference. And then gnome-shell runs on top of KMS and not on top of X11. That's the second difference. Not sure which one is relevant to the bug.

I don't think it makes any difference but we tested the filter screen on "Invoices" views.
msg58013 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-05-14.13:01:42
I tested it using weston in X11 and it works as expected with:

- weston 8.0.0
- gtk+ 3.24.16
- wayland 1.18.0

The only differences I could find are:

- popup windows are not centered as requested
- popover overflow the main window (I see that it was a known issue)
msg58010 (view) Author: [hidden] (nicoe) (Tryton committer) Date: 2020-05-14.11:03:23
> We had the issue for a long time and I only recently made the link with the usage of wayland. It should be easy to reproduce in Debian testing/unstable but  I guess that it also applies to Debian stable.

I'll try with sway (from debian/unstable) later today but I don't remember having this issue with this compositor (but I don't use that window very often it's true, so I might have never opened it yet).
msg58009 (view) Author: [hidden] (rhertzog) (Tryton committer) Date: 2020-05-14.10:55:51
The "popovers" demo in gtk3-demo is working fine. The various popovers are well placed and we can input stuff in the text fields of those popovers.
msg58006 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-05-14.09:46:39
Please try the Popovers in gtk3-demo to reproduce the problem and see if the problem is general or not.
msg58005 (view) Author: [hidden] (rhertzog) (Tryton committer) Date: 2020-05-14.09:43:32
We are running libgtk-3-0 3.24.20-1 in Debian testing, it has the API that is reported as missing in the bug that you quoted. And to me the bad position of the window is not the main issue... it would be nice to get it fixed for sure, but the real problem is the impossibility to configure a filter because we can't input anything.
msg58001 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-05-14.09:36:48
For me it is a GTK+ bug. I think this may be this one: https://gitlab.gnome.org/GNOME/gtk/issues/997
msg57997 (view) Author: [hidden] (rhertzog) (Tryton committer) Date: 2020-05-14.09:07:49
To be even more precise, this was reproduced with gnome-shell 3.36.2-1 as wayland compositor.
msg57996 (view) Author: [hidden] (rhertzog) (Tryton committer) Date: 2020-05-14.09:05:56
If you try using tryton under Wayland for example under a recent GNOME, the search filter opens on top-left corner of the screen instead of its usual place and it's impossible to modify any field except the date based ones.

We had the issue for a long time and I only recently made the link with the usage of wayland. It should be easy to reproduce in Debian testing/unstable but  I guess that it also applies to Debian stable.
msg46721 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-03.22:50:53
Almost two months without answer. I'm invalidating it, re-open if you still have the problem and provide a way to reproduce it.
msg45313 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-12-14.12:35:14
Hi Hendrik, 

First fo all thanks for reporting.

Could you please specify which criteria is not possible to enter?

It will be great if you can provide some steps to reproduce your using the standard modules and to explain on which tryton version you are working.
msg44987 (view) Author: [hidden] (hbrandes) Date: 2018-11-23.12:09:39
The filter within the GTK client is not working on several clients. It is possible to open the filter input dialog, but it is not possible to enter some criteria.
History
Date User Action Args
2020-05-14 21:35:05nicoesetmessages: + msg58031
2020-05-14 17:43:07cedsetmessages: + msg58027
2020-05-14 16:08:44cedsetstatus: need-eg -> deferred
messages: + msg58020
2020-05-14 14:23:46rhertzogsetfiles: + tryton-weston.png
messages: + msg58017
2020-05-14 14:07:05rhertzogsetmessages: + msg58016
2020-05-14 13:01:42cedsetstatus: testing -> need-eg
messages: + msg58013
2020-05-14 11:03:24nicoesetnosy: + nicoe
messages: + msg58010
2020-05-14 10:55:51rhertzogsetstatus: chatting -> testing
messages: + msg58009
2020-05-14 09:46:39cedsetmessages: + msg58006
2020-05-14 09:44:40cedsetstatus: testing -> chatting

Showing 10 items. Show all history (warning: this could be VERY long)