deadbeef
deadbeef copied to clipboard
Enqueue shouldn't steal focus
If we enqueue a file from a file manager, DeaDBeeF steals focus, but it shouldn't.
What causes this is the dialog box that pops up to show progress of adding items.
If the dialog doesn't show long enough then focus isn't stolen on a drag and drop event.
After some experiments this is what I found:
For GTK2 this can be solved with something like:
gtk_window_set_focus_on_map (progressdlg, FALSE);
gtk_window_set_accept_focus (progressdlg, FALSE);
For GTK3 additionally I had to remove the gtk_window_set_transient_for()
calls for this dialog. But this makes the dialog popup in the middle of the screen and still taking focus but at least the drag source window will get the focus back as soon as this dialog is hidden again.
The easiest way to solve this is to not use a dialog box but show progress of adding files in the statusbar instead.
@saivert this issue is not about drag-drop though, it's about "enqueue", which is a command line option. Although, I think the root cause is probably the same.
Marking as enhancement / ux issue, since this is generally not a bug, but the current implementation causes some inconvenience.