[Bug 58505] New: Odd windows management behaviour in later dev versions
http://bugs.winehq.org/show_bug.cgi?id=58505 Bug ID: 58505 Summary: Odd windows management behaviour in later dev versions Product: Wine Version: 10.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: kg.hammarlund(a)gmail.com Distribution: --- I run a geneaology database program written for windows under wine. It runs fine on v10.0 (stable) and on dev versions up to 10.4. From v10.5 and upwards, including v1012, I'm encountering an odd issue. When opening a search window, this window opens in the background instead of on top of the main window. I then have to move or resize the main window in order to highilght the search window and fill in the search data. But this only happens the first time I open the search window. Next time it opens in the foreground. If I untick the box "Allow the window manager to control the windows" in winecfg > graphics, the search window opens expected. But this solution has its drawbacks. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #1 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- A regression test will help pinpoint the change in Wine. https://gitlab.winehq.org/wine/wine/-/wikis/Regression-Testing -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #2 from kg.hammarlund(a)gmail.com --- Sorry to say that I lack time, hardware resources and probably the knowledge needed for a proper regression test. However, looking at the v10.5 changelog, my uneducated guess is that it could be related to the fix that was implemented for this bug: https://bugs.winehq.org/show_bug.cgi?id=2155 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression --- Comment #3 from Austin English <austinenglish(a)gmail.com> --- What program is this? Does it have a free demo/download available? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #4 from kg.hammarlund(a)gmail.com --- A database from a regional geneaology society in Sweden, available on a USB stick only, no free demo or anything similar available. I can, of course, make an iso file from the usb for the wine devs if they have time enough to look at it. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |68c4fa377f20e7c5009d85096df | |5bb8413cb9e03 CC| |alexhenrie24(a)gmail.com, | |rbernon(a)codeweavers.com URL| |http://www.plfoskarshamn.se | |/upload/documents/presinst. | |exe Component|-unknown |winex11.drv Ever confirmed|0 |1 Keywords| |download Summary|Odd windows management |SSFpres search window |behaviour in later dev |appears behind main window |versions |since Wine 10.5 Status|UNCONFIRMED |NEW Version|10.12 |10.5 --- Comment #5 from Alex Henrie <alexhenrie24(a)gmail.com> --- I got in touch with the bug reporter over email. The program is called SSFpres and I can reproduce the bug using the free version available at <http://www.plfoskarshamn.se/upload/documents/presinst.exe>. Steps to reproduce: 1. Run `wine presinst.exe` to install the software. Click "Nästa" to proceed through the setup wizard, then click "Avsluta" to exit. 2. Run `touch "$HOME/.wine/drive_c/Program Files (x86)/SSFpres/1/hdbas/ssfpp0001l3.i"` to create a dummy database. (You're supposed to get a real database from an external source such as a CD, but an empty file works for the purpose of reproducing the Wine bug.) 3. Run `wine 'C:\Program Files (x86)\SSFpres\1\pres.exe'` to run the software. 4. Click the "SÖK DÖDA" button at the bottom of the window. 5. Resize the main window to see that a dialog has opened behind it. `git bisect` says: 68c4fa377f20e7c5009d85096df5bb8413cb9e03 is the first bad commit commit 68c4fa377f20e7c5009d85096df5bb8413cb9e03 (HEAD) Author: Rémi Bernon <rbernon(a)codeweavers.com> AuthorDate: Sat Dec 7 20:58:23 2024 +0100 Commit: Alexandre Julliard <julliard(a)winehq.org> CommitDate: Fri Mar 28 17:17:55 2025 +0100 winex11: Keep _NET_WM_USER_TIME on individual toplevel windows. dlls/winex11.drv/event.c | 2 -- dlls/winex11.drv/keyboard.c | 7 ++++++- dlls/winex11.drv/mouse.c | 8 +++++++- dlls/winex11.drv/window.c | 50 +++++++++++++++----------------------------------- dlls/winex11.drv/x11drv.h | 3 ++- 5 files changed, 30 insertions(+), 40 deletions(-) $ sha256sum presinst.exe 1da3b260788ea293f5dec19b04a3f0ca2a0041f82e450156a345ac229fbbc871 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #6 from Rémi Bernon <rbernon(a)codeweavers.com> --- I can't reproduce the problem, which WM are you using? Could you make a log with WINEDEBUG=+x11drv,+event,+win ? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #7 from Alex Henrie <alexhenrie24(a)gmail.com> --- Created attachment 79908 --> http://bugs.winehq.org/attachment.cgi?id=79908 WINEDEBUG=+x11drv,+event,+win I'm using Cinnamon. Here is the requested log. Are you clicking "SÖK DÖDA" or "SÖK ALLA"? The problem only happens with "SÖK DÖDA". It's worth noting that the problem does NOT happen in a virtual desktop. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #8 from Rémi Bernon <rbernon@codeweavers.com> --- Created attachment 79917 --> http://bugs.winehq.org/attachment.cgi?id=79917 Possible workaround Yes, I've been trying with GNOME and KDE and both seem to work fine to me. From the log it looks like that the WM doesn't offer focus to the window (which doesn't have any _NET_WM_USER_TIME set) after it's requested to be shown. This could be a bogus implementation of _NET_WM_USER_TIME by the WM as, from the it should only do that if _NET_WM_USER_TIME is set to 0, not when it's missing. EWMH specification (https://specifications.freedesktop.org/wm/latest/ar01s05.html#id-1.6.16) says: Clients can obtain the timestamp that caused its first window to appear from the DESKTOP_STARTUP_ID environment variable, if the app was launched with startup notification. If the client does not know the timestamp of the user interaction that caused the first window to appear (e.g. because it was not launched with startup notification), then it should not set the property for that window. The special value of zero on a newly mapped window can be used to request that the window not be initially focused when it is mapped. At least to confirm this, does the attached patch help? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #9 from Alex Henrie <alexhenrie24@gmail.com> --- (In reply to Rémi Bernon from comment #8)
At least to confirm this, does the attached patch help?
I'm afraid the patch does not help. But I did confirm that the bug does not happen on KDE or XFCE. Cinnamon's window manager must be doing _something_ differently. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #10 from Rémi Bernon <rbernon@codeweavers.com> --- This seems to be caused by Wine requesting activation of the new window with _NET_ACTIVE_WINDOW request before it's even mapped. This seems to confuse Cinnamon and it doesn't later raise and activate the window when it is actually mapped. This is probably a Cinnamon/Muffin bug, but it's also probably something we can safely avoid doing in the first place and https://gitlab.winehq.org/wine/wine/-/merge_requests/9805 should fix the issue. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 Rémi Bernon <rbernon@codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |c8422a619b46d25e55907fd5526 | |b1d9fae8c3943 Resolution|--- |FIXED --- Comment #11 from Rémi Bernon <rbernon@codeweavers.com> --- This should be fixed with c8422a619b46d25e55907fd5526b1d9fae8c3943 (in wine-11.0-rc3) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #12 from Alex Henrie <alexhenrie24@gmail.com> --- Yep, it's fixed. Thanks Rémi! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #13 from kg.hammarlund@gmail.com --- Many thanks for the fix, compiling RC3 right now... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #14 from Rémi Bernon <rbernon@codeweavers.com> --- Well, the fix actually caused some other regressions elsewhere, and although we can probably add more workarounds, I'm also tempted to revert it and decide that this is a muffin bug that needs to be reported and fixed there, other WMs don't suffer from it. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #15 from kg.hammarlund@gmail.com --- Sorry to hear it might be reverted... just compiled 11.0-rc3 and can confirm that the fix solves the issue on my MATE desktop (so it's not just cinnamon/muffin that are affected, maybe other Gnome-related desktop as well?) But I can understand that if the fix causes severe regressions elsewhere, reverting might be a prudent choice. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #16 from Rémi Bernon <rbernon@codeweavers.com> --- It's not too severe and we can probably workaround them, but Wine always had this policy that it's not its role to workaround bugs in other software, especially because it tends to keep those bugs hidden and they never get fixed, and doesn't help the ecosystem. Yet this was a regression, and the issue (Wine trying to request activation of an non-visible window) seemed like a misuse of the API from our side, so arguably we can still try to do something about it... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #17 from kg.hammarlund@gmail.com --- I'll keep my fingers criossed then, and hope for the best possible outcome for everyone. And sincere thanks for your work so far! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #18 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.0-rc4. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #19 from kg.hammarlund@gmail.com --- The issue with windows opening in background reappears after upgrading to wine-11.0-rc4. S -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #20 from kg.hammarlund@gmail.com --- I tried compiling wine-11.0-rc4 after first rolling back the changes to dlls/winex11.drv/windows.c from this commit: https://gitlab.winehq.org/wine/wine/-/commit/c8422a619b46d25e55907fd5526b1d9... After upgrading, window management runs OK again, just as in wine-11.0-rc3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 Alex Henrie <alexhenrie24@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|FIXED |--- --- Comment #21 from Alex Henrie <alexhenrie24@gmail.com> --- Reopening because it's still not clear whether this is a bug in Wine or a bug in Muffin. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #22 from kg.hammarlund@gmail.com --- As far as I can understand, after looking at the diffs between rc3 and rc4 in dlls/winex11.drv/window.c, it's commit e4a14b8c that makes the issue reappear in rc4. Search window opens in the background both in MATE and Cinnamon sessions, although it works as it should in a XFCE session. I'll try rolling back the changes from that commit, compile again, and see what will happen. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #23 from kg.hammarlund@gmail.com --- Yes, that was it. After rolling back the changes in commit e4a14b8c and compile again, window behaviour is back to normal on MATE, Cinnamon, and XFCE desktops. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #24 from kg.hammarlund@gmail.com --- After upgrading to wine-11.0 (stable): Although windows work as they should in a xfce session, the problem is still present in Cinnamon and MATE. So I created a patch that rolls back the changes to the window.c file in commit e4a14b8c, recompiled, and window management now is OK on both MATE and Cinnamon. The other few programs I run under wine also works with this patched version. But of course it might create issues elsewhere, so if the devs choose to keep sources as they are, that's perfectly understandable. After all, (a) it seems to affect only a fairly obscure program, and (b) only on Cinnamon and MATE desktops. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #26 from Rémi Bernon <rbernon@codeweavers.com> --- There's been a small change with https://gitlab.winehq.org/wine/wine/-/merge_requests/10133 that could have helped here, would you mind checking again after a3b40267c57877aafebe21b3dcf8d86bdc78d40f? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 --- Comment #27 from kg.hammarlund@gmail.com --- Thanks, Rémi, that last commit seems to have solved this issue. Compiled, upgraded, and tested with XFCE, MATE, and Cinnamon DEs. Window behaviour OK on all three. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58505 Rémi Bernon <rbernon@codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1|c8422a619b46d25e55907fd5526 |a3b40267c57877aafebe21b3dcf |b1d9fae8c3943 |8d86bdc78d40f Resolution|--- |FIXED Status|REOPENED |RESOLVED --- Comment #28 from Rémi Bernon <rbernon@codeweavers.com> --- Awesome, thank you! Marking as fixed then. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (3)
-
WineHQ Bugzilla -
WineHQ Bugzilla -
WineHQ Bugzilla