Bug 2128660

Summary: Maximized GVim window on secondary screen displayed on both screens due to direct scanout
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: mutterAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fmuellner, gnome-sig, jadahl, klember, kparal, otaylor, philip.wyett, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: mutter-43.0-2.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-25 00:18:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 2009540    
Description Flags
Reproducer video none

Description Vít Ondruch 2022-09-21 10:35:34 UTC
Description of problem:
When the GVim window is maximized on secondary screen, it suddenly appears also on the primary screen. Please see the attached video:


I am not really sure if this is issue in GVim, Gnome, Mutter, XWayland or somewhere else.

Version-Release number of selected component (if applicable):
$ rpm -q gnome-shell

$ rpm -qf `which gvim`

$ rpm -q mutter

How reproducible:

Steps to Reproduce:
1. Open GVim on secondary screend and maximize

Actual results:
The maximized window is displayed on secondary as well as on primary screen, where the window on primary screen can't be focused

Expected results:
Window is displayed only on one screen.

Additional info:

Comment 1 Fedora Blocker Bugs Application 2022-09-21 12:51:05 UTC
Proposed as a Freeze Exception for 37-final by Fedora user vondruch using the blocker tracking app because:

 Maximizing window makes the window visible on secondary, but also on primary screen. This is very confusing for users. This issue possibly affects all X11 apps. Several are listed in the upstrem ticket [1].

[1] https://gitlab.gnome.org/GNOME/mutter/-/issues/2387

Comment 2 Kamil Páral 2022-09-21 13:55:58 UTC
> https://photos.app.goo.gl/VxKBr8DbsPamSLDo7

It says "Album is empty". Why don't you upload the video to the upstream issue or here directly?

Comment 3 Vít Ondruch 2022-09-21 14:27:28 UTC
Created attachment 1913315 [details]
Reproducer video

(In reply to Kamil Páral from comment #2)
> > https://photos.app.goo.gl/VxKBr8DbsPamSLDo7
> It says "Album is empty".

I have deleted the video, but it is back up.

> Why don't you upload the video to the upstream

It seems that GL does not support video upload.

> issue or here directly?

Probably good idea, since I have created the ticket already :)

Comment 4 Kamil Páral 2022-09-21 14:38:04 UTC
Interesting, I can't reproduce this. GVim gets maximized on the secondary screen only, for me.

> It seems that GL does not support video upload.

It does, but perhaps only certain types, not sure. I do upload webm videos regularly.

Comment 5 Kamil Páral 2022-09-21 16:31:29 UTC
Actually, I just saw it with the Atom IDE. When I maximized it on the *primary* screen, it got duplicated on the secondary screen (just a picture, non-clickable). When unmaximized, the copy disappeared.

Comment 6 Jonas Ådahl 2022-09-21 18:31:55 UTC
The fix for this landed upstream and will be part of mutter-43.1.

Comment 7 Kalev Lember 2022-09-22 11:43:13 UTC
I went ahead and backported this in https://src.fedoraproject.org/rpms/mutter/c/332684b6adab3ab581bfb415db35bb9929d58c22?branch=rawhide

Comment 8 Fedora Update System 2022-09-22 12:06:17 UTC
FEDORA-2022-c7746c91b6 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-c7746c91b6

Comment 9 Kamil Páral 2022-09-22 12:47:48 UTC
When I demaximize GVim or Atom IDE window on the primary screen, there is a short flicker on the secondary screen which shouldn't be there. But apart from that, this issue seems now solved, with that patch applied.

Comment 10 Kalev Lember 2022-09-22 14:29:41 UTC
Awesome, thanks for confirming!

Can you file the flicker issue upstream, please? I don't know mutter code at all and it would be best if upstream can take a look.

Comment 11 Fedora Update System 2022-09-23 01:49:02 UTC
FEDORA-2022-c7746c91b6 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-c7746c91b6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-c7746c91b6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Vít Ondruch 2022-09-23 07:35:17 UTC
Works for me as well. Thx for backporting the fix.

Comment 13 Fedora Update System 2022-09-25 00:18:07 UTC
FEDORA-2022-c7746c91b6 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.