deadbeef icon indicating copy to clipboard operation
deadbeef copied to clipboard

Enqueue shouldn't steal focus

Open fulalas opened this issue 3 years ago • 3 comments

If we enqueue a file from a file manager, DeaDBeeF steals focus, but it shouldn't.

fulalas avatar Apr 10 '21 07:04 fulalas

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 avatar Apr 15 '21 20:04 saivert

@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.

Oleksiy-Yakovenko avatar May 21 '21 19:05 Oleksiy-Yakovenko

Marking as enhancement / ux issue, since this is generally not a bug, but the current implementation causes some inconvenience.

Oleksiy-Yakovenko avatar May 21 '21 19:05 Oleksiy-Yakovenko