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

Don't bypass focus stealing prevention #633

Open
mcatanzaro opened this issue May 8, 2020 · 7 comments
Open

Don't bypass focus stealing prevention #633

mcatanzaro opened this issue May 8, 2020 · 7 comments

Comments

@mcatanzaro
Copy link
Contributor

After ABRT uploads data to the retrace server, then retrace server processing fails because the retrace server has been broken for a past year, then ABRT will prompt you "do you want to install debuginfo locally?" This prompt steals focus from whatever else I was doing. Half the time, I hit the spacebar because I am typing something else in another window, ABRT steals the focus to its prompt, and spacebar means "Yes go ahead!" So I've accidentally submitted the prompt before I ever had a chance to read it.

Guess: ABRT is using gtk_get_current_event_time() -- or similar -- and then gtk_window_present_with_time() to raise the window? To fix this, you can use the time of the last user action, rather than the current time.

@ernestask ernestask transferred this issue from abrt/abrt May 8, 2020
@ernestask
Copy link
Collaborator

const int ret = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_YES;

Seems not.

@mcatanzaro
Copy link
Contributor Author

Maybe you present the main window, then run the dialog?

The behavior I describe is really happening, so something must be causing it. :)

@ernestask
Copy link
Collaborator

I’m trying to reproduce the issue, but I’m struggling. Are you on an X or a Wayland session? Which version of Fedora?

F32 with X results in no thievery here as far as I can see.

@ernestask
Copy link
Collaborator

There are 0 calls to gtk_window_present_with_time() in libreport, so the mind is properly boggled.

@ernestask
Copy link
Collaborator

gnome-abrt does call gtk_window_present(), but that’s on its own window during activation.

@ernestask
Copy link
Collaborator

And my familiarity with gnome-shell and mutter is limited, so trying to find a candidate for this will be through brute force.

@mcatanzaro
Copy link
Contributor Author

Weird. :S

F32 with X results in no thievery here as far as I can see.

F32 with Wayland, though the bug has been around for at least a couple previous Fedoras.

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

No branches or pull requests

2 participants