Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background window popping up in the foreground when dragging a main window over it with applications created with Qt #148

Closed
mint-b opened this issue Jan 18, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@mint-b
Copy link

mint-b commented Jan 18, 2022

Dear XPRA devs,

I am new to Github, so please excuse me if this is not the proper way to report an issue.

I am currently using XPRA HTML5 client for RHEL 7.9, the latest version as of 19/12/2021 (https://xpra.org/dists/RedHat/7.9.2009/x86_64/) with xpra-html5-4.5.2-1.r1107.el7.noarch

The issue that I have encountered is that when I have 2 application windows, lets say Firefox, and I drag the active window over the background window, this will force the background/inactive window to the foreground, making it the active window again.

The steps I took to reproduce the issue are:

  1. Launch XPRA through a web browser (I used Google Chrome)
  2. Open 2 new Firefox windows, so there will be 2 of them on screen (So we have Window A and Window B).
  3. Drag window B away from window A so they don't overlap.
  4. Drag window B over window A and release the mouse button.
  5. You will notice than now Window A comes in front of Window B, hiding it. The correct behavior should be that Window B remains above Window A

This error also happens with other applications, not only Firefox, I just picked this one as it is generic.

Below I attach a log of when I was able to reproduce this issue.

XPRA_error_log.txt

Again, I am new to reporting issues in github. If you need any additional info, please let me know.

Many thanks in advance!

@totaam totaam added the bug Something isn't working label Jan 18, 2022
@totaam
Copy link
Collaborator

totaam commented Jan 19, 2022

the latest version as of

That will be 3.1.2, right? (see https://github.com/Xpra-org/xpra/wiki/Reporting-Bugs)

Does this also happen if you use a more recent version of the xpra server? (ie: 4.3 series)
You will need to test on something other than RHEL 7 for that.
I am unable to reproduce the problem here.

@mint-b
Copy link
Author

mint-b commented Jan 25, 2022

Hi again,
Sorry for the delay in my response. I was setting up another VM with the latest fully updated CentOS 8.5 version. (Both are running on virtual environments. I am accessing through the HTML5 client on Google Chrome.

The original issue I reported was on RHEL 7.9 and the versions, as a result from the instructions in your link is the following... it is version 3.1.2

-bash-4.2$ rpm -qa | grep xpra
libvpx-xpra-1.9.0-1.el7_9.x86_64
xorg-x11-drv-dummy-0.3.8-1.xpra3.el7.x86_64
pygtkglext-1.1.0-31.xpra2.el7.x86_64
python2-xpra-client-3.1.2-10.30245xpra1.el7.x86_64
xpra-common-client-3.1.2-10.30245xpra1.el7.noarch
x264-xpra-20210301-1.el7.x86_64
python2-rencode-1.0.6-11.xpra2.el7.x86_64
xpra-common-3.1.2-10.30245xpra1.el7.noarch
python2-pyopengl-3.1.5-1xpra1.el7_9.x86_64
python2-xpra-server-3.1.2-10.30245xpra1.el7.x86_64
**xpra-3.1.2-10.30245xpra1.el7.x86_64**
libwebp-xpra-1.2.0-1.el7.x86_64
python2-xpra-3.1.2-10.30245xpra1.el7.x86_64
ffmpeg-xpra-4.4.1-1.el7.x86_64
xpra-common-server-3.1.2-10.30245xpra1.el7.noarch
**xpra-html5-4.5.2-1.r1107.el7.noarch**

For CentOS 8.5 I tested v4.3.1 as you suggested.

[root@cen8vm]# rpm -qa | grep xpra
xorg-x11-drv-dummy-0.3.8-1.xpra3.el8.x86_64
x264-xpra-20211215-1.el8.x86_64
xpra-common-4.3.1-10.r30771.el8.noarch
python3-rencode-1.0.6-11.xpra1.el8.x86_64
python3-xpra-server-4.3.1-10.r30771.el8.x86_64
xpra-common-server-4.3.1-10.r30771.el8.noarch
python3-xpra-client-4.3.1-10.r30771.el8.x86_64
python3-pyopengl-3.1.5-2xpra1.el8_3.x86_64
xpra-common-client-4.3.1-10.r30771.el8.noarch
ffmpeg-xpra-4.4.1-3.el8.x86_64
**xpra-4.3.1-10.r30771.el8.x86_64**
**xpra-html5-4.5.2-1.r1107.el8.noarch**
python3-xpra-4.3.1-10.r30771.el8.x86_64

I can confirm that I am not able to reproduce the issue in this version (v4.3.1). It works as expected.

would there be big incompatibilities if I install this version on RHEL 7.9? or would some sort of specific patch for this version be required?

please let me know if you need more details.

Thanks again! :-)

@totaam
Copy link
Collaborator

totaam commented Jan 26, 2022

I can confirm that I am not able to reproduce the issue in this version (v4.3.1). It works as expected.

Then I am afraid that I just don't have the time to find the fix to backport to the 3.x branch and I am closing this ticket.

would there be big incompatibilities if I install this version on RHEL 7.9?

You can't. CentOS 7 is only supported in the 3.x branch.
https://github.com/Xpra-org/xpra/wiki/Platforms

or would some sort of specific patch for this version be required?

As per above, identifying the patch required is the hard part.
Bisecting between those versions would take a long time.

@totaam totaam closed this as completed Jan 26, 2022
@mint-b
Copy link
Author

mint-b commented Jan 27, 2022

Hi, Sorry to open the issue again, but I did manage to reproduce this error under the newest XPRA versions.

[root@cen8vm ~]# rpm -qa |grep xpra
xorg-x11-drv-dummy-0.3.8-1.xpra3.el8.x86_64
x264-xpra-20211215-1.el8.x86_64
xpra-common-4.3.1-10.r30771.el8.noarch
python3-rencode-1.0.6-11.xpra1.el8.x86_64
python3-xpra-server-4.3.1-10.r30771.el8.x86_64
xpra-common-server-4.3.1-10.r30771.el8.noarch
python3-xpra-client-4.3.1-10.r30771.el8.x86_64
python3-pyopengl-3.1.5-2xpra1.el8_3.x86_64
xpra-common-client-4.3.1-10.r30771.el8.noarch
ffmpeg-xpra-4.4.1-3.el8.x86_64
xpra-4.3.1-10.r30771.el8.x86_64
xpra-html5-4.5.2-1.r1107.el8.noarch
python3-xpra-4.3.1-10.r30771.el8.x86_64

[root@cen8vm ~]# uname -a
Linux cen8vm 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I tested with other common applications:
Google Earth Pro and VLC media player, and Telegram Messenger.

What I found in common with these apps is that these applications are created using Qt
this seems to indicate that XPRA is having issues with software that is created using Qt

This does not happen when using these applications directly in the desktop environment (directly in the VM), only when using XPRA through the HTML5 client.

Thanks in advance :-)

@mint-b mint-b changed the title Background window popping up in the foreground when dragging a main window over it Background window popping up in the foreground when dragging a main window over it with applications created with Qt Jan 27, 2022
@totaam totaam reopened this Jan 28, 2022
@mint-b
Copy link
Author

mint-b commented Jan 28, 2022

Thanks for reopeneeing the ticket. the only difference from my previous comment is that I upgraded to the version
xpra-4.3.2-10.r30895.el8.x86_64 that I saw that was modified in the repository on 2022-01-27

[root@cen8vm ~]# rpm -qa |grep xpra
ffmpeg-xpra-4.4.1-3.el8.x86_64
xpra-4.3.2-10.r30895.el8.x86_64
xpra-html5-4.5.2-1.r1107.el8.noarch
python3-xpra-4.3.2-10.r30895.el8.x86_64
python3-rencode-1.0.6-11.xpra1.el8.x86_64
xpra-common-server-4.3.2-10.r30895.el8.noarch
xpra-common-4.3.2-10.r30895.el8.noarch
xpra-common-client-4.3.2-10.r30895.el8.noarch
python3-xpra-server-4.3.2-10.r30895.el8.x86_64
xorg-x11-drv-dummy-0.3.8-1.xpra3.el8.x86_64
x264-xpra-20211215-1.el8.x86_64
python3-xpra-client-4.3.2-10.r30895.el8.x86_64
[root@cen8vm ~]#
[root@cen8vm ~]# uname -a
Linux cen8vm 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

thanks! :-)

@totaam
Copy link
Collaborator

totaam commented Feb 10, 2022

I've seen this bug now.
I believe that this is caused by either or both:

  • 4d44587 - I don't think we need this one any more, and if we do it could be done more smartly by keeping track of the buttons we have clicked and only releasing those
  • 92b03d9 - this one is more tricky because it helps some buggy Java applications close their popup menus

totaam added a commit that referenced this issue Feb 11, 2022
only send unpress events for the ones we have pressed
@totaam
Copy link
Collaborator

totaam commented Feb 11, 2022

The commits above address this bug.

If someone complains about a regression with Java applications not closing their child windows, we can try to fix them again some other way.

The workaround we had was just too problematic: we can't just click randomly and hope for the best!

@totaam totaam closed this as completed Feb 11, 2022
@mint-b
Copy link
Author

mint-b commented Feb 11, 2022

Hi!!

Thank you very much for your time and for looking in to this!
I will try it as soon as I can.

Best regards!

@mint-b
Copy link
Author

mint-b commented Mar 11, 2022

Hi Totaam. I hope all is well :-)
I was just wondering if you know an approximate date when this fix will be released in the main version of XPRA?

I have been looking (and added the repository to my system) and I haven't seen the update that fixes this yet in the main or beta branch. or am I looking in the wrong place?

Thanks!

@totaam
Copy link
Collaborator

totaam commented Mar 13, 2022

Until xpra-html5 v5 is released, please use the beta channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants