wxPD_APP_MODAL : is its absence taken into account ?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
nmset
Knows some wx things
Knows some wx things
Posts: 29
Joined: Fri Nov 26, 2010 4:48 pm

wxPD_APP_MODAL : is its absence taken into account ?

Postby nmset » Tue Aug 07, 2018 6:59 pm

Since my last 'git pull' 2 days ago, it seems to me that when a wxProgressDialog is created without the wxPD_APP_MODAL flag, the application frame gets disabled until the progress dialog is destroyed. That's with my daily app. I tested with the dialog sample app after commenting out that flag and I noticed the same behaviour, on Linux (Dialogs/Informative dialogs/Progress dialog).

I expect the app frame to be still enabled without that flag, which was the case before updating wxWidgets.

I wish someone else could kindly confirm that.

Thanks.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 2674
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxPD_APP_MODAL : is its absence taken into account ?

Postby ONEEYEMAN » Wed Aug 08, 2018 6:07 pm

Hi,
Can you try to do

Code: Select all

git log


and see what change might be causing it?
Or try to bisect the tree to find an exact commit?

Thank you.

nmset
Knows some wx things
Knows some wx things
Posts: 29
Joined: Fri Nov 26, 2010 4:48 pm

Re: wxPD_APP_MODAL : is its absence taken into account ?

Postby nmset » Wed Aug 08, 2018 6:37 pm

'git log' was not very helpful. Bisecting over the week end will be what I dreaded. Have to find a good commit.

nmset
Knows some wx things
Knows some wx things
Posts: 29
Joined: Fri Nov 26, 2010 4:48 pm

Re: wxPD_APP_MODAL : is its absence taken into account ?

Postby nmset » Wed Aug 08, 2018 8:04 pm

Tried a few commits, more than a year old, without observing a non-modal app window.
Next I tried a very old checkout that failed as such

Code: Select all

LC_ALL=C git checkout v3.0.0
error: The following untracked working tree files would be overwritten by checkout:
        art/osx/README
        art/osx/close.png
        art/osx/close_current.png
...
...
        build/wince/missing/widec.h
        build/wince/missing/wtime.h
        demos/life/setup/wince/Common/breeder.lif
        de
Aborting


Without a good commit as reference, it's not possible to bisect.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 2674
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxPD_APP_MODAL : is its absence taken into account ?

Postby ONEEYEMAN » Wed Aug 08, 2018 8:15 pm

Hi,
Take a look here.
Adjust as appropriate.

Thank you.

nmset
Knows some wx things
Knows some wx things
Posts: 29
Joined: Fri Nov 26, 2010 4:48 pm

Re: wxPD_APP_MODAL : is its absence taken into account ?

Postby nmset » Thu Aug 09, 2018 5:29 pm

I tested with wxWidgets 3.0.3 as a zip archive from github. Sill the same unexpected behaviour. If it was wxWidgets related, such an old version should have been OK. It's not a real problem for my use case, just annoying as I have to wait for the app window to be enabled, so I'm giving up. May be it's GTK related.

Thanks for your replies.

User avatar
doublemax
Moderator
Moderator
Posts: 12671
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxPD_APP_MODAL : is its absence taken into account ?

Postby doublemax » Thu Aug 09, 2018 6:01 pm

it seems to me that when a wxProgressDialog is created without the wxPD_APP_MODAL flag, the application frame gets disabled until the progress dialog is destroyed
This sounds like the normal behavior for me. How did it behave for you before the change?

wxPD_APP_MODAL:
Make the progress dialog modal. If this flag is not given, it is only "locally" modal - that is the input to the parent window is disabled, but not to the other ones.
Use the source, Luke!

nmset
Knows some wx things
Knows some wx things
Posts: 29
Joined: Fri Nov 26, 2010 4:48 pm

Re: wxPD_APP_MODAL : is its absence taken into account ?

Postby nmset » Thu Aug 09, 2018 6:52 pm

.... the parent window ...

I missed that in all the above. Let me clarify.

Use case situation : my app copies files to some destination, the copy progress is shown in multiple progress dialogs. For years, I could continue using the app window while the file copy is going on. Indeed, the parent field of the wxProgressDialog constructor is NULL in my app. Until my last update from git, without any code modification in my app.

Sample dialogs application : so I commented out wxPD_APP_MODAL in dialogs.cpp, AND set the parent field to NULL. With wxWidgets 3.0.3, the dialogs sample application does NOT disable the app window when wxProgressDialog is shown. With wxWidgets current from git, wxProgressDialog DOES disable the app window when it is shown.

So I'll try bisecting again with parent == NULL and without wxPD_APP_MODAL.

Sorry for having bothered you.

nmset
Knows some wx things
Knows some wx things
Posts: 29
Joined: Fri Nov 26, 2010 4:48 pm

Re: wxPD_APP_MODAL : is its absence taken into account ?

Postby nmset » Fri Aug 10, 2018 8:50 pm

Here is the bisect result :

Code: Select all

git bisect log
git bisect start
# bad: [e136f349441b3675547b41806e7a924bb81bbda0] Removing extra semicola
git bisect bad e136f349441b3675547b41806e7a924bb81bbda0
# good: [f4b73fd99ec246d4e1dfac080903ac78152c7277] Account for wxTE_PROCESS_TAB when doing tab navigation on wxOSX.
git bisect good f4b73fd99ec246d4e1dfac080903ac78152c7277
# bad: [e3575d1f9c6371927508600cab227043acc4a71e] Use temporary wxConfig for persistence unit tests
git bisect bad e3575d1f9c6371927508600cab227043acc4a71e
# bad: [e3575d1f9c6371927508600cab227043acc4a71e] Use temporary wxConfig for persistence unit tests
git bisect bad e3575d1f9c6371927508600cab227043acc4a71e
# good: [eff7a2e07f674ccb326bf4727e491d7ff5c501bc] Improve wxJSScriptWrapper methods comments
git bisect good eff7a2e07f674ccb326bf4727e491d7ff5c501bc
# good: [eff7a2e07f674ccb326bf4727e491d7ff5c501bc] Improve wxJSScriptWrapper methods comments
git bisect good eff7a2e07f674ccb326bf4727e491d7ff5c501bc
# bad: [dc751d3f3310557379e86ada76816962e102488d] Add a hint about making wxProgressDialog initially wide enough
git bisect bad dc751d3f3310557379e86ada76816962e102488d
# bad: [dc751d3f3310557379e86ada76816962e102488d] Add a hint about making wxProgressDialog initially wide enough
git bisect bad dc751d3f3310557379e86ada76816962e102488d
# good: [b130595975443be0d0ce2d90b724d06191402b5e] Remove accidental global variable from the font sample
git bisect good b130595975443be0d0ce2d90b724d06191402b5e
# good: [4df04a88c5dc09ccc566be6b3b3b0668832d37ad] Set wxPG cell background colour as wxPGComboBox background colour
git bisect good 4df04a88c5dc09ccc566be6b3b3b0668832d37ad
# good: [046d3be2156e28e332019e532b74d9d84b8db2f7] Don't require calling DoNativeBeforeUpdate() with locked CS
git bisect good 046d3be2156e28e332019e532b74d9d84b8db2f7
# bad: [2b8e84ca493db01ce86334deb1cf63a326cb5058] Avoid deadlock when closing the progress dialog
git bisect bad 2b8e84ca493db01ce86334deb1cf63a326cb5058
# good: [12efb20ad23815d74fd7bfb14149ee408720fb97] Disable close title bar button in wxProgressDialog too
git bisect good 12efb20ad23815d74fd7bfb14149ee408720fb97
# bad: [ffe84cfb994a5ff04977998cf30254a2bcbad91f] Factor out wxProgressDialog::GetTaskDialogRect()
git bisect bad ffe84cfb994a5ff04977998cf30254a2bcbad91f
# bad: [d240c1f20f902991fea5b0ec59da23d70e85922c] Just use wxGenericProgressDialog::m_parentTop directly
git bisect bad d240c1f20f902991fea5b0ec59da23d70e85922c
# bad: [58f90d36a01090bb0cd66ec59a96f73ae13d10a6] Remove redundant wxGenericProgressDialog::m_parentTop assignment
git bisect bad 58f90d36a01090bb0cd66ec59a96f73ae13d10a6
# first bad commit: [58f90d36a01090bb0cd66ec59a96f73ae13d10a6] Remove redundant wxGenericProgressDialog::m_parentTop assignment


I hope the app window can be again enabled when the parent of wxProgressDialog is NULL.

User avatar
doublemax
Moderator
Moderator
Posts: 12671
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxPD_APP_MODAL : is its absence taken into account ?

Postby doublemax » Fri Aug 10, 2018 9:31 pm

This might be worth opening a ticket at http://trac.wxwidgets.org

On a side note: Theoretically it should have been possible to get the old behavior by adding the wxDIALOG_NO_PARENT style flag to the constructor. Unfortunately the wxGenericProgressDialog constructor ignores that and forcefully sets the wxDEFAULT_DIALOG_STYLE flags.
Use the source, Luke!


Return to “C++ Development”

Who is online

Users browsing this forum: No registered users and 19 guests