Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify parent window for popups. #3406

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

karliss
Copy link
Member

@karliss karliss commented Jan 21, 2025

Your checklist for this pull request

Detailed description

Message boxes without parent are almost always a mistake. Such message boxes

  • Aren't properly position on top of current window, instead they get placed in the corner of screen possibly away from main window.
  • They get treated as separate window by window manager, but they still prevent proper interaction with main window. If you alt tab the message box can get lost, resulting in confusing behavior where you don't know why you can't interact with main window.

This PR doesn't fix all such cases in Cutter, but at least it cleans up a good portion of easy ones.

Test plan (required)

  • Try at least a few of the affect message boxes.

Closing issues

Message boxes without parent are almost always a mistake. Such message boxes
* Aren't properly position on top of current window, instead they get placed in the corner of screen possibly away from main window.
* They get treated as separate window by window manager, but they still prevent proper interaction with main window. If you alt tab the message box can get lost, resulting in confusing behavior where you don't know why you can't interact with main window.
@wargio wargio changed the title Specify parrent window for popups. Specify parent window for popups. Jan 22, 2025
@@ -66,7 +66,7 @@ void WelcomeDialog::onLanguageComboBox_currentIndexChanged(int index)
QString language = ui->languageComboBox->itemText(index);
Config()->setLocaleByName(language);

QMessageBox mb;
QMessageBox mb(this);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't the main window not available when the welcome dialog is up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants