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

Reduce window flicker and loss of focus #9311

Merged
merged 1 commit into from Jul 3, 2021

Conversation

RussKie
Copy link
Member

@RussKie RussKie commented Jun 28, 2021

Proposed changes

Reduce window flicker and loss of focus

  1. Force child window ownership to FormBrowse

  2. Show the rebase dialog before starting any operations. This is what appears to be the main cause of the loss of focus. The dialog isn't yet shown when we invoke the progress dialog, which is then gets closed but the window that spawned it is not visible. MS Windows gets confused and pushes another window to the foreground, thus causing the app to lose focus.

Screenshots

Before

rebase-before

After

rebase-after


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned RussKie Jun 28, 2021
@gerhardol
Copy link
Member

If using the quick commands, I do not expect the dialog to be opened unless there are conflicts.

@RussKie
Copy link
Member Author

RussKie commented Jun 28, 2021 via email

@gerhardol
Copy link
Member

This is what causes the flicker and the loss of focus.

But I find the opening of the window more annoying...

@RussKie
Copy link
Member Author

RussKie commented Jun 28, 2021 via email

Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

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

I can get used to the extra popup, then the fixed loss of focus for rebase is an improvement

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

🎉 Rebasing without Alt+Tab. Thank you!

1. Force child window ownership to FormBrowse

2. Show the rebase dialog *before* starting any operations. This is what
appears to be the main cause of the loss of focus. The dialog isn't yet
shown when we invoke the progress dialog, which is then gets closed
but the window that spawned it is not visible. MS Windows gets confused
and pushes another window to the foreground, thus causing the app to
lose focus.
@RussKie
Copy link
Member Author

RussKie commented Jul 3, 2021

I rolled all "Owner" related changes as in some scenarios those could lead to the active top window could get under another window with the same parent. Since now the rebase dialog is visible and lives longer any of its children, the existing ownership model is correct.

@RussKie RussKie merged commit 8f9d901 into gitextensions:release/3.5 Jul 3, 2021
@RussKie RussKie deleted the fix_form_rebase branch July 3, 2021 10:49
mstv pushed a commit to mstv/gitextensions that referenced this pull request Jul 3, 2021
@RussKie RussKie added this to the 3.5.1 milestone Jul 4, 2021
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.

None yet

3 participants