Why do KMessageBox windows prevent input to all other windows?

Have you been annoyed by the fact that KMessageBox windows always disable input to all other windows in your application, even those in another main window hierarchy? Contrary to its API documentation, KMessageBox is in fact always set as application modal. You now have another option in KDE 4.7.1 onwards.

To avoid breakage of existing applications, the decision was made to keep the existing behaviour and to modify the API docs instead to reflect the actual behaviour. But you can now specify in the Options parameter, using a new Option enum value, that the window should be window-modal instead of application-modal. This will allow windows in a different main window hierarchy from the KMessageBox parent to remain usable.


About djarvie

KDE software developer: KAlarm author, maintainer of KDE date/time classes.
This entry was posted in KDE and tagged . Bookmark the permalink.

5 Responses to Why do KMessageBox windows prevent input to all other windows?

  1. xpete says:

    why not just attach the kmessagebox to the app main form just like Opera, Firefox and Mac OS X already does? This avoid windows geting on the way on our work and make it easier to know what the message is related to.

  2. djarvie says:

    KMessageBox is a class which provides a separate window, if that’s what is wanted. To do things the way you are suggesting, KMessageBox wouldn’t be the appropriate class to use.

  3. xpete says:

    I know KMessageBox creates a separate window. I think that would be better if KMessageBox worked like i said becoming the default way to show messages in all KDE apps… this avoid the problem of blocking other windows and the problems i said. thay’s why i asked…. why not do it?

    • djarvie says:

      The bug fix I reported eliminates the immediate problem of being unable to prevent blocking of other windows. What you’re suggesting is a redesign of KMessageBox. I’m not the maintainer of KMessageBox, so the place to raise your suggestion is on the kde-core-devel mailing list.

  4. xpete says:

    ok. thx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s