https://bugs.winehq.org/show_bug.cgi?id=56237
Bug ID: 56237 Summary: Erratic behavior of dialog boxes Product: Wine Version: 9.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: ch.panel@free.fr Distribution: ---
Created attachment 75944 --> https://bugs.winehq.org/attachment.cgi?id=75944 visual studio small project showing wine bug
under Windows: the action of <ENTER> returns the code of the button which has the focus under wine: the action returns nothing (0) unless we have moved the focus if we replace
=============== IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "My About Box" FONT 8, "MS Sans Serif" BEGIN PUSHBUTTON "OK",1001,174,18,50,14 PUSHBUTTON "Cancel",1002,174,35,50,14 GROUPBOX "About this program...",IDC_STATIC,7,7,225,52 CTEXT "An example program showing how to use Dialog Boxes\r\n\r\nby theForger", IDC_STATIC,16,18,144,33 END ===============
by
=============== IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "My About Box" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",1001,174,18,50,14 PUSHBUTTON "Cancel",1002,174,35,50,14 GROUPBOX "About this program...",IDC_STATIC,7,7,225,52 CTEXT "An example program showing how to use Dialog Boxes\r\n\r\nby theForger", IDC_STATIC,16,18,144,33 END ===============
then <ENTER> returns the OK key (1001) if we return to the previous situation (2 PUSHBUTTON), and we replace the codes 1001 and 1002 by ID_OK and ID_CANCEL (in the RC and the source code) then <ENTER> returns OK (ID_OK)
attached code showing the bug
https://bugs.winehq.org/show_bug.cgi?id=56237
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |dark.shadow4@web.de Status|UNCONFIRMED |NEW Keywords| |download, testcase
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- Confirming
https://bugs.winehq.org/show_bug.cgi?id=56237
--- Comment #2 from Rafał Mużyło galtgendo@o2.pl --- If you're talking about odd dialog behavior (not related to modality, as that has (well, *had* - haven't checked in awhile and no longer recall the places where I've seen it) quite a few quirky corner cases due to Windows/Linux different take on the concept), would you mind looking at bug 54233 ?
There's a simple hierarchy of *centered* dialog->static->dialog that somehow pushes the internal dialog partially outside the bounds of the outer dialog.
https://bugs.winehq.org/show_bug.cgi?id=56237
--- Comment #3 from Christian PANEL ch.panel@free.fr --- @rafal : not at all, nothing to do with the modality it's a different behavior : when the dialog box opens, if you have not given the DEFPUSHBUTTON attribute to a button and you press <ENTER>, windows return the Id of button with focus (first), wine does not.
run dlg_one.exe under wine then help|About then you have a dialog box with 2 responses (OK, CANCEL): press <ENTER> under wine does not give anything, under windows, returns the ID (1001) NB: Tab and shift+Tab to reset the focus back to the first control then give a correct behavior.