https://bugs.winehq.org/show_bug.cgi?id=51984
Bug ID: 51984 Summary: Logos 9 Bible Software (.NET 4.7 app) regression selection popups no longer show Product: Wine Version: 6.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: johnpgoodman@gmail.com Distribution: ---
Created attachment 70971 --> https://bugs.winehq.org/attachment.cgi?id=70971 terminal output from moment after selecting text.
Selecting text in the app causes a popup. This popup no longer shows in 6.20 staging if selecting left to right. If selecting right to left it appears sometimes after a delay. This is a regression, in wine 6.19 and for many versions before it was instant.
I've attached the terminal output from the moment before selection to the moment after selection.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #1 from m0rvj johnpgoodman@gmail.com --- Help is much appreciated! Below is the installation guide.
The app is a bit like kindle in so much as the engine is free but the resources cost so there is a free download. Unlike kindle it has many advanced research features and books link together etc. The main app is free but there are paid features, resources and subscriptions. To use the app you need a free account https://www.logos.com/product/194909/logos-9-basic. It uses a downloader app which last I tried doesn't work with wine. The actual msi link is https://downloads.logoscdn.com/LBS9/Installer/9.6.0.0024/Logos-x64.msi
Manual Install Procedure: 1 Install wine 6 or newer 2 winetricks corefonts 3 winetricks settings fontsmooth=rgb 4 winetricks dotnet48 5 winetricks settings renderer=gdi (you might need to set the reg key manually) 6 Install the Logos.msi download but don't run it. 7 wine64 reg add "HKCU\Software\Wine\AppDefaults\LogosIndexer.exe" /v Version /t REG_SZ /d vista /f 8 Run Logos and sign in with your free account.
There is a script which downloads a preconfigured wine bottle and sets it all up in $USER/Logos_BibleP directory which you can then easily remove etc. https://github.com/ferion11/LogosLinuxInstaller/releases Choose fast install without wine AppImage.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #2 from m0rvj johnpgoodman@gmail.com --- Created attachment 70989 --> https://bugs.winehq.org/attachment.cgi?id=70989 bisect log
Log attached. First time I've used git bisect. Hopefully got it right.
https://bugs.winehq.org/show_bug.cgi?id=51984
m0rvj johnpgoodman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |8892b79118fde5f2307ecbbdb03 | |a8d0c489c8b3d
https://bugs.winehq.org/show_bug.cgi?id=51984
m0rvj johnpgoodman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzhang@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=51984
m0rvj johnpgoodman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |johnpgoodman@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #3 from m0rvj johnpgoodman@gmail.com --- Also checked out master and reverted just that commit. Now works fine, so pretty confident I've found the right commit.
https://bugs.winehq.org/show_bug.cgi?id=51984
m0rvj johnpgoodman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |user32
https://bugs.winehq.org/show_bug.cgi?id=51984
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression URL| |https://downloads.logoscdn. | |com/LBS9/Installer/9.6.0.00 | |24/Logos-x64.msi
https://bugs.winehq.org/show_bug.cgi?id=51984
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|https://downloads.logoscdn. |https://web.archive.org/web |com/LBS9/Installer/9.6.0.00 |/20211127171755/https://dow |24/Logos-x64.msi |nloads.logoscdn.com/LBS9/In | |staller/9.6.0.0024/Logos-x6 | |4.msi Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |focht@gmx.net
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive.
https://web.archive.org/web/20211127171755/https://downloads.logoscdn.com/LB...
https://www.virustotal.com/gui/file/a1b4cea2a1e9fe633a5e867291bbaa7333172bfe...
$ sha1sum Logos-x64.msi fab0f9bed35257683495a2bbc253a219a1a3614c Logos-x64.msi
$ du -sh Logos-x64.msi 217M Logos-x64.msi
Regards
https://bugs.winehq.org/show_bug.cgi?id=51984
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Logos 9 Bible Software |Logos 9 Bible Software |(.NET 4.7 app) regression |(.NET 4.7 app) selection |selection popups no longer |popups don't show |show |
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #5 from m0rvj johnpgoodman@gmail.com --- Created attachment 71215 --> https://bugs.winehq.org/attachment.cgi?id=71215 patch which fixes
The original regression patch stated: When UpdateLayeredWindow() is called to paint a window and update its size, USER_Driver->pUpdateLayeredWindow() needs to be called after the window position and size are updated. Otherwise, UpdateLayeredWindow() may flush the painted content to a smaller window and then enlarge it, losing the painted result.
Fix Word 2016 window frame corruption after restoring from maximized state.
No explanation was given for removing the return false condition. This patch restores that whilst retaining the new call to pUpdateLayeredWindow().
I don't have a copy of word 2016 to test it with but it certainly fixes Logos.
https://bugs.winehq.org/show_bug.cgi?id=51984
m0rvj johnpgoodman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #6 from m0rvj johnpgoodman@gmail.com --- With the 7.0-rc1 release changes this now works! Thanks!
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #7 from Zhiyi Zhang zzhang@codeweavers.com --- (In reply to m0rvj from comment #6)
With the 7.0-rc1 release changes this now works! Thanks!
Ehh, I don't remember any patch touching the related area. Would like mind doing a bisect and see which commit fixes this?
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #8 from m0rvj johnpgoodman@gmail.com --- Actually just realised I'm running 7.0rc1 staging.
git log -L :UpdateLayeredWindow:dlls/user32/win.c
shows commit 89530400a06f176fcc1982f2304160d89f98c287 Author: Jacek Caban jacek@codeweavers.com Date: Mon Nov 8 14:48:28 2021 +0100
win32u: Move NtUserGetLayeredWindowAttributes implementation from user32.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
diff --git a/dlls/user32/win.c b/dlls/user32/win.c --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -4093,58 +4070,58 @@ BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info ) { DWORD flags = SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW; RECT window_rect, client_rect; SIZE offset;
if (!info || info->cbSize != sizeof(*info) || info->dwFlags & ~(ULW_COLORKEY | ULW_ALPHA | ULW_OPAQUE | ULW_EX_NORESIZE) || !(GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) || - GetLayeredWindowAttributes( hwnd, NULL, NULL, NULL )) + NtUserGetLayeredWindowAttributes( hwnd, NULL, NULL, NULL ))
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #9 from m0rvj johnpgoodman@gmail.com --- That's the edit. Can't say I understand it.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #10 from m0rvj johnpgoodman@gmail.com --- I'm pretty confused about doing a bisect because when I build from source the problem is still there. Using the winehq 7.0rc1-staging package for ubuntu it is resolved.
https://bugs.winehq.org/show_bug.cgi?id=51984
m0rvj johnpgoodman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |---
--- Comment #11 from m0rvj johnpgoodman@gmail.com --- Apologies, I seem to have been caught out by the launch script. The reason the bug is still there with my local build when I tried the bisect is because the bug is still there! When I thought I was running on 7.0rc1-staging, the script was picking up a wine app image of v6.5. This has caused me a lot of confusion.
So in short the bug is still present in 7.0rc1-staging and the patch is still relevant. I very much hope we can solve it for the 7 release.
https://bugs.winehq.org/show_bug.cgi?id=51984
m0rvj johnpgoodman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #71215|0 |1 is obsolete| |
--- Comment #12 from m0rvj johnpgoodman@gmail.com --- Created attachment 71303 --> https://bugs.winehq.org/attachment.cgi?id=71303 patch which fixes
This patch should fix - it restores the return false possibility. I've tested this with Logos and it works but not having a copy of Word 2016 I'm not able to test if it still resolves that issue. Hopefully!
https://bugs.winehq.org/show_bug.cgi?id=51984
Gabriel Ivăncescu gabrielopcode@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gabrielopcode@gmail.com
--- Comment #13 from Gabriel Ivăncescu gabrielopcode@gmail.com --- (In reply to m0rvj from comment #12)
Created attachment 71303 [details] patch which fixes
This patch should fix - it restores the return false possibility. I've tested this with Logos and it works but not having a copy of Word 2016 I'm not able to test if it still resolves that issue. Hopefully!
That ends up calling the driver's UpdateLayeredWindow twice if it returns TRUE, I don't think it's correct.
This commit also breaks systray icons for me; it makes them have a black background instead of transparent for apps minimized to the systray. For this problem, the issue seems to be set_window_pos. It needs to be called after the driver's UpdateLayeredWindow *even* if it doesn't resize or move the window at all. i.e. even if the flags are the default base flags set at the top.
So I'm assuming it needs to be called before it first if the window needs to be resized or moved, and then again with the base flags to update it. I don't know if this fixes your problem though, but it fixes the systray issue.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #14 from Gabriel Ivăncescu gabrielopcode@gmail.com --- Created attachment 71356 --> https://bugs.winehq.org/attachment.cgi?id=71356 Always call set_window_pos after the driver's UpdateLayeredWindow.
Here's the diff that fixes it for me.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #15 from m0rvj johnpgoodman@gmail.com --- I tested the patch with 7.0rc2 and it works nicely... thanks!
https://bugs.winehq.org/show_bug.cgi?id=51984
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |zzhang@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #16 from Zhiyi Zhang zzhang@codeweavers.com --- Hi m0rvj/Gabriel, I am having trouble finishing the Logos installation due to networking issues. Could you upload a zip of your wine prefix somewhere for me to download?
And Gabriel, are you actively working on this issue and submitting the fix? I don't want to duplicate work. Do you know what's wrong exactly that this bug exists?
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #17 from Gabriel Ivăncescu gabrielopcode@gmail.com --- (In reply to Zhiyi Zhang from comment #16)
Hi m0rvj/Gabriel, I am having trouble finishing the Logos installation due to networking issues. Could you upload a zip of your wine prefix somewhere for me to download?
And Gabriel, are you actively working on this issue and submitting the fix? I don't want to duplicate work. Do you know what's wrong exactly that this bug exists?
I wasn't able to test the Logos software either, but this commit also broke systray icons as I mentioned, and my patch was tested on that.
I posted it here so that it can be tested on the actual app, and m0rvj said it fixed it so that's good. If possible I'd like you to test Office 2016 as well if you can (the original reason for the commit was to fix that) and see if it still works (which should in theory...).
If it works I'll submit the patch.
I don't know the exact reason, but set_window_pos seems to do surface related updates even when it doesn't move or resize anything, which apparently need to be done after the driver call.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #18 from m0rvj johnpgoodman@gmail.com --- I'm sorry my internet connection isn't fast enough to upload it and the account is individual. The download for Logos is only a few hundred mb but even with a free account its about 3gb of data that it downloads. I can quite quickly test any further patches though.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #19 from Gabriel Ivăncescu gabrielopcode@gmail.com --- Just some extra info: set_window_pos ends up calling the driver's WindowPosChanged, which is needed at the very least (commenting it out in a copy-pasted function breaks it again) to update it; and of course all the necessary work before that to retrieve the valid rects and so on.
I was worried about messages sent but set_window_pos doesn't seem to send any, since it's an internal helper, so that shouldn't be a problem either.
So I'm guessing that the patch is correct, without overcomplicating matters—Zhiyi, please let me know if it doesn't break Office, so I can send it.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #20 from Zhiyi Zhang zzhang@codeweavers.com ---
So I'm guessing that the patch is correct, without overcomplicating matters—Zhiyi, please let me know if it doesn't break Office, so I can send it.
Your patch doesn't break Office 2016. However, I am not very comfortable with the patch as the root cause for the regression is still unknown. Regardless, feel free to send your patch whenever you think it's ready. And some tests would be nice.
https://bugs.winehq.org/show_bug.cgi?id=51984
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|zzhang@codeweavers.com |wine-bugs@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #21 from Gabriel Ivăncescu gabrielopcode@gmail.com --- (In reply to Zhiyi Zhang from comment #20)
So I'm guessing that the patch is correct, without overcomplicating matters—Zhiyi, please let me know if it doesn't break Office, so I can send it.
Your patch doesn't break Office 2016. However, I am not very comfortable with the patch as the root cause for the regression is still unknown. Regardless, feel free to send your patch whenever you think it's ready. And some tests would be nice.
Not sure how to add tests for this, since it's purely X11 behavior, it would probably involve grabbing the screen with X11 and we can't test that on Windows for obvious reasons.
So, I looked into it in a lot more depth to find out the root cause. I'm still not entirely sure why it happens (could be quirk/bug in compositor?), but I know for sure *what* part is required *at the very least*.
Here's what I did: I replaced the last set_window_pos in this patch with set_window_pos2, a copy-pasted identical function, except it calls a new driver WindowPosChanged2. WindowPosChanged2 is copy-pasted on winex11 side. Of course it worked now since it's identical but duplicated.
I started returning early/commenting out parts from it and I found that, at least for the systray icons case, it reaches this chunk:
if ((new_style & WS_VISIBLE) && ((new_style & WS_MINIMIZE) || is_window_rect_mapped( rectWindow ))) { if (!data->mapped) { BOOL needs_icon = !data->icon_pixmap; BOOL needs_map = TRUE;
/* layered windows are mapped only once their attributes are set */ if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) needs_map = data->layered || IsRectEmpty( rectWindow ); release_win_data( data ); if (needs_icon) fetch_icon_data( hwnd, 0, 0 ); if (needs_map) map_window( hwnd, new_style ); return; }
Removing *just* the map_window makes it broken and have black background. So that's already the thing needed. Copying this chunk's logic into UpdateLayeredWindow works, but it feels convoluted and fragile. I'm not entirely certain if Logos 9 Bible Software needs exactly this either.
Note the comment in the chunk, I think it's the important bit here.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #22 from Gabriel Ivăncescu gabrielopcode@gmail.com --- Created attachment 71385 --> https://bugs.winehq.org/attachment.cgi?id=71385 Map the window in UpdateLayeredWindow.
Here's the fix I was talking about. Please test and let me know if it works with Logos 9 Bible also.
I'm not entirely sure if it's better than set_window_pos though...
https://bugs.winehq.org/show_bug.cgi?id=51984
Gabriel Ivăncescu gabrielopcode@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #71385|0 |1 is obsolete| |
--- Comment #23 from Gabriel Ivăncescu gabrielopcode@gmail.com --- Created attachment 71386 --> https://bugs.winehq.org/attachment.cgi?id=71386 Map the window in UpdateLayeredWindow.
Oops, this was using data->mapped after it was released, fixed now.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #24 from m0rvj johnpgoodman@gmail.com --- Yeah that worked for me with Logos. I applied the patch to the latest HEAD from git.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #25 from Gabriel Ivăncescu gabrielopcode@gmail.com --- Thanks for testing. Patch sent.
I removed the icon thing because the icon was set already by set_window_pos, it was the mapping that wasn't done, since data->layered is set in UpdateLayeredWindow, but set_window_pos (and thus, the driver's WindowPosChanged) is called before it.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #26 from m0rvj johnpgoodman@gmail.com --- Thanks, I'm hugely grateful!
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #27 from m0rvj johnpgoodman@gmail.com --- Yikes, it wasn't included in 7.0rc3... I hope it gets there before the final release?!
https://bugs.winehq.org/show_bug.cgi?id=51984
Zhiyi Zhang zzhang@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|REOPENED |RESOLVED Fixed by SHA1| |a22dd45a79b80e1496820c7c7b8 | |1d9185755ff82
--- Comment #28 from Zhiyi Zhang zzhang@codeweavers.com --- Fixed by a22dd45a79b80e1496820c7c7b81d9185755ff82. Thanks, Gabriel.
https://bugs.winehq.org/show_bug.cgi?id=51984
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #29 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.0-rc4.
https://bugs.winehq.org/show_bug.cgi?id=51984
--- Comment #30 from Zhiyi Zhang zzhang@codeweavers.com --- https://source.winehq.org/git/wine.git/commitdiff/ffc02008a5475d0295f7e9aa73... fixed this bug for winemac.drv as well.