https://bugs.winehq.org/show_bug.cgi?id=52974
Bug ID: 52974 Summary: MuLab 9: subwindow loses focus instantly Product: Wine Version: 7.7 Hardware: x86-64 URL: https://www.mutools.com/mulab/app/mulab-app-9-0-35-win 64.zip OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: oldcastlehq@protonmail.com Distribution: ArchLinux
When you open ML9 and right-click on any track head, and then click on "Choose Target Module", the subwindow loses focus instantly. It likes that the new window that should pop up stays behind the main window.
No idea why the specific client causes so much trouble and how much this is application specific (ie. whether the focus handling is supposed to be completely handled by wine or whether it forwards some windows API), but it does seem that the window reacts to changes in the active window and my guess is that this turns into a race between the main window (claiming focus and becoming active when the popup closes) and the target module window when the context "popup" closes.
More information about this bug can be found at https://bbs.archlinux.org/viewtopic.php?id=276107
https://bugs.winehq.org/show_bug.cgi?id=52974
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=52974
OldCastle oldcastlehq@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|7.7 |7.12 URL|https://www.mutools.com/mul |https://www.mutools.com/mul |ab/app/mulab-app-9-0-35-win |ab/app/mulab-app-9-0-37-win |64.zip |64.zip
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #1 from OldCastle oldcastlehq@protonmail.com --- Any action here? This app is so close to going to the Platinum List. We just need this issue to be fixed.
https://bugs.winehq.org/show_bug.cgi?id=52974
OldCastle oldcastlehq@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|7.12 |7.15
https://bugs.winehq.org/show_bug.cgi?id=52974
OldCastle oldcastlehq@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|MuLab 9: subwindow loses |MuLab 9: dialog window |focus instantly |loses focus instantly
https://bugs.winehq.org/show_bug.cgi?id=52974
OldCastle oldcastlehq@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|MuLab 9: dialog window |MuLab 9: context menu loses |loses focus instantly |focus instantly
https://bugs.winehq.org/show_bug.cgi?id=52974
OldCastle oldcastlehq@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|7.15 |7.17
https://bugs.winehq.org/show_bug.cgi?id=52974
OldCastle oldcastlehq@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|https://www.mutools.com/mul |https://www.mutools.com/mul |ab/app/mulab-app-9-0-37-win |ab/app/mulab-app-9-0-59-win |64.zip |64.zip Version|7.17 |7.22
https://bugs.winehq.org/show_bug.cgi?id=52974
OldCastle oldcastlehq@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|7.22 |8.0
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #2 from OldCastle oldcastlehq@protonmail.com --- Could someone take a look at this, PLEASE!
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #3 from OldCastle oldcastlehq@protonmail.com --- Hi Guys, any change to take a look at here?
https://bugs.winehq.org/show_bug.cgi?id=52974
Maotong Zhang zmtong1988@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zmtong1988@gmail.com
--- Comment #4 from Maotong Zhang zmtong1988@gmail.com --- (In reply to OldCastle from comment #3)
Hi Guys, any change to take a look at here?
Modify the following code, recompile and run validation again.
static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) { DWORD style, ex_style;
if (!managed_mode) return FALSE;
//-----------Repair "Choose Target Module" window issue------// if(1) { WCHAR classnm[MAX_PATH]={0}; UNICODE_STRING class_name = { .Buffer = classnm, .MaximumLength = ARRAY_SIZE(classnm)*sizeof(WCHAR) }; NtUserGetClassName( hwnd, FALSE, &class_name ); if(strcmp(debugstr_w(class_name.Buffer), "L"TheMuToolsWindowClass"") == 0) { TRACE( "Cancel %s Window task management!!! \n", debugstr_w(class_name.Buffer)); return FALSE; } } //-----------Repair "Choose Target Module" window issue------//
/* child windows are not managed */ style = NtUserGetWindowLongW( hwnd, GWL_STYLE ); if ((style & (WS_CHILD|WS_POPUP)) == WS_CHILD) return FALSE;
...... }
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #5 from OldCastle oldcastlehq@protonmail.com --- Sorry, I'm no dev, but I can test it if there is a repository/branch with this code.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #6 from Maotong Zhang zmtong1988@gmail.com --- (In reply to OldCastle from comment #5)
Sorry, I'm no dev, but I can test it if there is a repository/branch with this code.
The simplest way to not modify the code is to close the 'Window Manager', which can be used temporarily.
winecfg --> GrapHics --> Allow the window manager to control the windows (Close this item)
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #7 from OldCastle oldcastlehq@protonmail.com --- If I do that, the software works flawless.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #8 from Maotong Zhang zmtong1988@gmail.com --- (In reply to OldCastle from comment #7)
If I do that, the software works flawless.
Yes, this is a temporary solution.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #9 from OldCastle oldcastlehq@protonmail.com --- Sure, I've being doing that, but the problem is that we "lose" the host control.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #10 from Maotong Zhang zmtong1988@gmail.com --- (In reply to OldCastle from comment #9)
Sure, I've being doing that, but the problem is that we "lose" the host control.
Understood, that requires modifying the code.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #11 from OldCastle oldcastlehq@protonmail.com --- First, thank you for looking into this. Secondly, if you need help with testing it, just point me to your repository that I will build wine from there and test it here.
https://bugs.winehq.org/show_bug.cgi?id=52974
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #12 from Maotong Zhang zmtong1988@gmail.com --- (In reply to OldCastle from comment #11)
First, thank you for looking into this. Secondly, if you need help with testing it, just point me to your repository that I will build wine from there and test it here.
First use the virtual desktop, and then study how to handle the manager. winecfg --> GrapHics --> Emualete a virtual desktop(1600x800)
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #13 from OldCastle oldcastlehq@protonmail.com --- I do that as an alternative. But did you identify the issue? I could record a video showing the problem. Would that help?
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #14 from Maotong Zhang zmtong1988@gmail.com --- (In reply to OldCastle from comment #13)
I do that as an alternative. But did you identify the issue? I could record a video showing the problem. Would that help?
Source code download link: https://gitlab.winehq.org/xiaotong/wine/-/tree/MuLab9-windows?ref_type=heads
Set variables before running: export MULAB9=1
Can you test and see how it runs ?
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #15 from OldCastle oldcastlehq@protonmail.com --- I tested it and it didn't work. I set the variable to my .bashrc and still nothing changed.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #16 from Maotong Zhang zmtong1988@gmail.com --- (In reply to OldCastle from comment #15)
I tested it and it didn't work. I set the variable to my .bashrc and still nothing changed.
This fix is on the wine branch. Did you compile the wine master?
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #17 from OldCastle oldcastlehq@protonmail.com --- I compiled the MuLab9-windows branch.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #18 from Maotong Zhang zmtong1988@gmail.com --- (In reply to OldCastle from comment #17)
I compiled the MuLab9-windows branch.
Terminal Execution:
export MULAB9=1
WINEPREFIX=xxxx wine /xxx/xxx/MuLab.exe
Is that so?
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #19 from OldCastle oldcastlehq@protonmail.com --- Yes, no change.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #20 from Maotong Zhang zmtong1988@gmail.com --- Created attachment 77272 --> https://bugs.winehq.org/attachment.cgi?id=77272 run result
app: MuLab App 9.5.34 for Windows (32 bit) wine: wine-9.19(modify)
I execute the command as follows: work@work:~$ export MULAB9=1
work@work:~$ WINEPREFIX=~/mulab-20241017 wine '/home/work/mulab-20241017/drive_c/Program Files/MuLab (32 bit)/MuLab.exe'
The running results are shown in the attached image.
Check if there is any "mulab" in the running log: fixme:event:handle_wm_protocols Handle: MuLab focus window
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #21 from OldCastle oldcastlehq@protonmail.com --- Ah...it's working. The issue was that my Mulab is outside of the WINEPREFIX. I have the default prefix /home/oldcastle/.wine, but for MuLab I have it in /home/oldcastle/Applications/MuLab.
After I moved it to /home/oldcastle/.wine/drive_c/Program Files/MuLab it started to work.
One question. Is this fix future-proof? I'm asking because MuLab 10 is around the corner.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #22 from Maotong Zhang zmtong1988@gmail.com --- There shouldn't be any problem
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #23 from OldCastle oldcastlehq@protonmail.com --- Hi. Is this fix to be merged?
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #24 from Fabian Maurer dark.shadow4@web.de --- (In reply to OldCastle from comment #23)
Hi. Is this fix to be merged?
Not as is, no. This is only a workaround, only a proper solution can be merged.
https://bugs.winehq.org/show_bug.cgi?id=52974
--- Comment #25 from Maotong Zhang zmtong1988@gmail.com --- This is a modification for this application and is not suitable for merging into the mainline.