It’s long been an issue for GNOME that users cannot drag items from background windows without activating those windows. There was never a consensus reached (within GNOME or among other free software projects) about how such a thing should be done.
Wayland may make this possible.
To that effect, I’ve created an issue for wayland-protocols: xdg-shell: support background window actions (#143) · Issues · wayland / wayland-protocols · GitLab
There’s no discussion there at this time, but I hope that will change.
If background window actions do become possible, an API change may be needed in gtk.
As far as I can tell, gtk on X11 still uses the locally active input model and the current expectation on wayland is no different. What may be needed, in X11 terms, is to change to the globally active input model. This can actually be done without an API change. Because every extant window manager always sends a WM_TAKE_FOCUS message on window clicks in click-to-focus mode, gtk doesn’t need to change at all; it can use the globally active input model by just changing the InputHint to false and doing nothing else.
If things change so that background actions are possible, gtk will need to do a little more work. A button press event will no longer always cause a compositor to activate a window, but the client will need to call for activation if there’s no possible background action to be performed. The simplest change to gtk, requiring no API change at all, is to always request activation in response to a button press event. That’s less than ideal, because background actions will still not be possible, but it’s a step along the way.
For gtk to actually support background actions, there will need to be a way to determine if such an action is possible and act accordingly. I believe, but I’m not sure, that this will require an API change. The API will only matter to people creating widgets that may be drag sources; everything should just work for everyone else. I haven’t been familiar with gtk since version 2.x, but I think all that is needed is a signal for GtkWidget that returns a boolean indicating whether activation should be requested, and defaults to true. Drag sources would just return false if a drag may be starting. I know it’s more involved with that, but I’d be writing patches if I knew what to do right now.
I’m just getting back to looking at free software after a long hiatus, so I’m still getting familiar with both code and customs. I apologize if I’m approaching this the wrong way. I’ve long been bothered by the lack of parity between free software and Apple software when it come to drag-and-drop, and I hope to do something about that.