http://bugs.winehq.org/show_bug.cgi?id=26503
Summary: modal windows don't stay on top Product: Wine Version: 1.3.15 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: c_pradelli@yahoo.com
Created an attachment (id=33743) --> (http://bugs.winehq.org/attachment.cgi?id=33743) Simple delphi program + source.
Under MS Windows these modal windows can be placed anywhere on the screen, clicking the main window doesn't hide them. Not so under Wine: clicking the main window puts it on top hiding the modal windows.
Ubuntu 10.04 Wine version 1.3.15
Demo from Khmelevskiy Alexandr is attached. Open "bug21039.exe" then press "MessageBox" button. Press main windows. Messagebox goes behind main window an application hangup.
http://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #1 from Christian c_pradelli@yahoo.com 2011-03-21 09:07:17 CDT --- It can be reproduced with IBExpert Personal Edition (free) from http://www.ibexpert.net Install it, when you start it for first time select MDI windows. go to menu "Options" -> "Enviroment Options..." This is a modal window, but you can select main window and it becomes on top of the "Enviroment Options" window, after this the application hangs becomes unusable and you need to kill it.
http://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #2 from Christian c_pradelli@yahoo.com 2011-03-21 09:09:13 CDT --- Desktop is Gnome 2.30.2
http://bugs.winehq.org/show_bug.cgi?id=26503
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2011-03-22 00:08:40 CDT --- (In reply to comment #0)
Demo from Khmelevskiy Alexandr is attached. Open "bug21039.exe" then press "MessageBox" button. Press main windows. Messagebox goes behind main window an application hangup.
Confirming.
http://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2011-03-22 00:25:59 CDT --- The problem is that windows with WS_DISABLED style completely ignore all input including mouse clicks (and therefore can't be activated) under Windows, while X11 happily brings this kind of windows in front. Wine prevents activation of such windows, but nothing more.
A workaround for application developers is avoid playing games with WS_DISABLED and use normal parent/owner z-order instead of desktop when creating top level windows.
http://bugs.winehq.org/show_bug.cgi?id=26503
Paul Romanyszyn pgr@arcelectronicsinc.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pgr@arcelectronicsinc.com
--- Comment #5 from Paul Romanyszyn pgr@arcelectronicsinc.com 2011-03-22 09:55:56 CDT --- (In reply to comment #1)
This is a modal window, but you can select main window and it becomes on top of the "Enviroment Options" window, after this the application hangs becomes unusable and you need to kill it.
One work around I use is to move the main window by the caption bar to uncover the dialog and then continue.
(In reply to comment #4)
A workaround for application developers is avoid playing games with WS_DISABLED and use normal parent/owner z-order instead of desktop when creating top level windows.
Not possible with legacy applications.
http://bugs.winehq.org/show_bug.cgi?id=26503
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ocean04@suomi24.fi
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2011-03-29 05:14:05 CDT --- *** Bug 26585 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=26503
Khmelevskiy Alexandr khmelevskiy@polesoft.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |khmelevskiy@polesoft.ru
http://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #7 from Christian c_pradelli@yahoo.com 2011-04-06 08:55:32 CDT ---
A workaround for application developers is avoid playing games with WS_DISABLED and use normal parent/owner z-order instead of desktop when creating top level windows.
I suspect that all SDI Delphi applications have this problem, due to the way that Delphi handle form creation. I don't think that modifying applications is the solution.
http://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #8 from Christian c_pradelli@yahoo.com 2011-04-28 10:46:44 CDT --- (In reply to comment #4)
The problem is that windows with WS_DISABLED style completely ignore all input including mouse clicks (and therefore can't be activated) under Windows, while X11 happily brings this kind of windows in front. Wine prevents activation of such windows, but nothing more.
Yes, taking a look in Delphi forms.pas I found than Delphi manage modal forms disabling all other forms, so only the remain active form can be used. If there is no way to prevent in X11 to bring disabled windows to front, I think that there is nothing to fix in wine. If all others agree with this, the bug could be closed.
http://bugs.winehq.org/show_bug.cgi?id=26503
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |contact@chillvisio.ch
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2012-03-28 02:57:33 CDT --- *** Bug 30274 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #10 from kashpirovski contact@chillvisio.ch 2012-03-28 14:51:06 CDT --- (In reply to comment #8)
Yes, taking a look in Delphi forms.pas I found than Delphi manage modal forms disabling all other forms, so only the remain active form can be used. If there is no way to prevent in X11 to bring disabled windows to front, I think that there is nothing to fix in wine. If all others agree with this, the bug could be closed.
I would highly appreciate any tip on how to modify the forms.pas in order to work around this issue with my Delphi applications. I've searched the web for any tips concerning how to modify forms.pas but did not find anything more specific on this subject. Thank you in advance!
http://bugs.winehq.org/show_bug.cgi?id=26503
Sylvain Petreolle spetreolle@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spetreolle@yahoo.fr
https://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #11 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for 2 years. Is this still an issue in current (1.7.16 or newer) wine?
https://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #12 from Bruno Jesus 00cpxxx@gmail.com --- Still in 1.7.16, tested with the comment 0 attachment.
http://bugs.winehq.org/show_bug.cgi?id=26503
Misha misha-cn-ua@ya.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |misha-cn-ua@ya.ru
--- Comment #13 from Misha misha-cn-ua@ya.ru --- Maybe it is possible for Wine to detect focus change and bring windows, that are not disabled, to front?
https://bugs.winehq.org/show_bug.cgi?id=26503
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=26503
Gelson Borsoi gelson@borsoi.com.br changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gelson@borsoi.com.br
--- Comment #14 from Gelson Borsoi gelson@borsoi.com.br --- Same happens to me. Delphi application. The problem is most noticed with Wine-Staging then Wine-devel.
I installed a Delphi application in Linux Mint 18.1 Cinnamon (i tried Mate too) with wine-staging 1.9.24. The icons appear ok in the panel (taskbar) but when i open any kind of new window that have filter selection or messagebox, this messagebox or filter is placed behind the actual window instead of in front. With wine-devel the icons aren't showed in the panel but the messageboxes and other windows appears in front 99% of time but i cannot click out of that window because they goes behind.
The solution, for now, is to move main window with mouse (to bottom) and click on hidden window.
https://bugs.winehq.org/show_bug.cgi?id=26503
Omega Software development@winomega.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |development@winomega.com
--- Comment #15 from Omega Software development@winomega.com --- Still happens with Wine 2.1.
Adding bug link from WinOmega (https://appdb.winehq.org/objectManager.php?sClass=version&iId=33538) as affected application.
Note: I think this bug qualifies to have the "testcase" and "source" keywords, but I don't have the permission to add them. Could the bug submitter and/or administrator do it?
https://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #16 from Omega Software development@winomega.com --- Happens in Delphi 7 IDE itself, too. I found it when using CTRL+F to find a string in the currently open text file. The "string not found" message box appeared below the text editor and wasn't visible (made it look like the program had crashed).
https://bugs.winehq.org/show_bug.cgi?id=26503
sergey yazov yazov.s@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |yazov.s@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=26503
Andrea ca75@libero.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ca75@libero.it
--- Comment #17 from Andrea ca75@libero.it --- Sorry for my bad english
It's an old message, if you've solved it, just ignore it.
In the winecfg program, open the page "graphics" ad uncheck
"allow the window manager to control window"
I have solved in this mode.
If anyone can confirm for others too.
https://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #18 from Omega Software development@winomega.com --- (In reply to Andrea from comment #17)
Sorry for my bad english
It's an old message, if you've solved it, just ignore it.
In the winecfg program, open the page "graphics" ad uncheck
"allow the window manager to control window"
I have solved in this mode.
If anyone can confirm for others too.
Yes, this works. Tested both on WinOmega and Delphi.
Thanks
https://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #19 from Misha misha-cn-ua@ya.ru ---
"allow the window manager to control window"
Yeah that helps with modal windows, but that option breaks desktop integration.
https://bugs.winehq.org/show_bug.cgi?id=26503
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|modal windows don't stay on |X11 hides modal windows |top |behind main windows when | |using WM management (Delphi | |forms with WS_DISABLED) CC| |o.dierick@piezo-forte.be Keywords| |source
https://bugs.winehq.org/show_bug.cgi?id=26503
Ethan Searl internetethansearl@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |internetethansearl@gmail.co | |m
--- Comment #20 from Ethan Searl internetethansearl@gmail.com --- I created this patch to raise the modal dialog back on top after focus change. https://www.winehq.org/pipermail/wine-devel/2021-December/203906.html
https://bugs.winehq.org/show_bug.cgi?id=26503
firewalker firew4lker@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |firew4lker@gmail.com
--- Comment #21 from firewalker firew4lker@gmail.com --- I tested the above patch against version 7.6 but it doesn;t seem to work. Many application don;t even start. Is it suitable for version 7.6?
https://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #22 from firewalker firew4lker@gmail.com --- I tested Ethan Searl's patch from message 20 with wine-7.10 and it seems to work OK! Is it going to be included in a later version?
https://bugs.winehq.org/show_bug.cgi?id=26503
Matthias spam@abma.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spam@abma.de
https://bugs.winehq.org/show_bug.cgi?id=26503
Tiago imperyal@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |imperyal@gmail.com
--- Comment #23 from Tiago imperyal@gmail.com --- With macOS Ventura - 13.0.1, this problem has worsen. Now it happens constantly, our software is almost unusable (developed in Delphi 10.4).
The "allow the window manager to control window" trick doesn't work from what I can assert.
Ethan Searl's patch, I don't how to test it. I'm not setup to compile. I would like to test it if someone can help me out.
Thank you!
https://bugs.winehq.org/show_bug.cgi?id=26503
Omega Software development@winomega.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|development@winomega.com |
https://bugs.winehq.org/show_bug.cgi?id=26503
Roberto Fernandez rfz@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rfz@free.fr
--- Comment #24 from Roberto Fernandez rfz@free.fr --- I tested the patch posted here by Ethan Searl, in comment #20, against wine-8.1, it actually fixes the longstanding misbehavior of X window managers with respect to Delphi based applications. I'm ready to go thru the whole process of "Submitting Patches" but it would be much easier to me if someone with commit privilege could take care of this...
https://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #25 from Rafał Mużyło galtgendo@o2.pl --- @comment #24:
Please compare and contrast your proposed solution with both the problem and the hack from bug 49933.
https://bugs.winehq.org/show_bug.cgi?id=26503
--- Comment #26 from Roberto Fernandez rfz@free.fr --- (In reply to Rafał Mużyło from comment #25)
@comment #24:
Please compare and contrast your proposed solution with both the problem and the hack from bug 49933.
If I understand bug 49933 correctly, the problem is related to a specific application (GOG Setup) which creates an invisible window, and the patch proposed by Rémi Bernon gives a workaround for taskbar to handle this application in a usable way.
This bug 26503 is about assigning a new active window. It is WM related, not taskbar, which are separate components in X11 paradigm. The patch proposed by Ethan Searl, in comment #20, gives focus to the only window of the application that can handle it when the application was developed within Delphi and uses forms with WS_DISABLED.
https://bugs.winehq.org/show_bug.cgi?id=26503
sergey yazov yazov.s@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|yazov.s@gmail.com |
https://bugs.winehq.org/show_bug.cgi?id=26503
Vladimir Borzov bvsoft@bvsoft.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bvsoft@bvsoft.ru