You are not logged in.
Ahoy!
I have an issue where keybinds don't seem to work while dragging files from a GTK-based application (afaik). I can't use alt-tab to switch windows while dragging something, for example.
The problem seems to happen with Thunar, Nautilus and File Roller, but not with Dolphin and Ark.
This seems like it could be a widespread issue, but I can barely find anything about it, and what I can find is from years ago, which makes me believe the issue might be local.
My laptop has the same issue, though, so I'm not entirely sure.
I'd appreciate any lights one might shed on this issue.
Last edited by Furyspark (2022-01-04 05:10:04)
Offline
Wayland or X11?
Online
I'm using X11. Also, I forgot to mention that it seems to happen on Plasma and Gnome (haven't tested other DEs). It's still X11 in both cases, according to the output of
echo $XDG_SESSION_TYPEOffline
Do other keys work?
I'd assume the dragging client might grab either the entire keyboard or the modifiers (ctrl, alt, shift) for special drag actions (what could lead to the misassumption that only global shortcuts are affected)
Online
Other keys don't seem to work either. Print screen (which is set to run a screenshot script) doesn't work while dragging, and neither does F1 to call Thunar or Nautilus' help function. Although with that last one, I'm not sure if it normally would call the help function while dragging. I'm just assuming with that one, admittedly.
Offline
setxkbmap -o "grab:break_actions" shoudl™ allow you to break the grab (ctrl+alt+* or ctrl+alt+/ - the other one kills the grabbing client… I forgot which one was which)
If that allows you to use the system shortcuts during the drag you know the cause, but that's not a viable solution and there's probably some reason for the grab (albeit maybe a suboptimal implementation)
Edit: ffwi, using the DND demo from gtk-demo I can run global shortcuts (tried print for a scrot) fine (and the screengrabber will typically try to grab the keyboard)
Last edited by seth (2021-12-27 16:26:31)
Online
Just to be sure: did you mean to use `-option` instead of `-o`? Because for me, setxkbmap reported that -o is not an applicable argument.
Error! Option "-o" not recognizedis the output, to be precise.
Unfortunately, after running that command using `-option` instead of `-o`, neither pressing ctrl+alt+* or ctrl+alt+/ during dragging seemed to have any effect.
Strangely enough, when I tried the DnD demo from gtk-demo, I was able to alt tab just fine during those drags, so it's not every GTK-based drag. The one thing I can say for sure (whether it'll be relevant or not) is that this faulty dragging happens with files, but not with random widgets, I suppose.
Offline
Sorry, I somehow thought there was a short option.
I forgot that this only works w/ the */ keys on the numpad (and it's actually ctrl+alt+/ that breaks the grab)
The problem is likely the fileview widget (happens w/ geeqie too) and I tried: it does grab the entire keyboard and ctrl+alt+/ (I actually required my nose to enter that while holding the mouse button down ;-) released the grab and the global shortcuts would function as expected.
You probably want to alt+tab while dragging?
Online
Aye, I would really like to alt tab during drag operations.
I've also read somewhere a few weeks ago that clicking and holding down the left mouse button over a file, then alt tabbing to the other window, and only then start moving the mouse works, and it does, but it feels icky.
Plus, it's difficult to get used to.
Anyway, if you have more advice or anything for me to try out, please let me know.
Offline
If you have some sort of taskbar, it might respond to the dragenter/dragmove messages and activate windows for you.
Other than that and filing a bug against gtk to not grab the entire keyboard but only the relevant keys (escape, I guess) you could only add a shortcut dameon that uses xinput2/libinput/evdev that listens to the keyboard events on a lower level and remote controls your WM via dbus or NETWM
The downside of the latter is that screensavers/lockers grab the keyboard to prevent exactly that from happening… (which is also why the grab releasing shortcuts of the X11 server are not enabled by default)
Online
Apologies for the late reply. I tinkered around a bit more, and found that I had set an environment variable in my .xprofile which caused these issues.
The variable in question (and the given value) was:
GDK_CORE_DEVICE_EVENTS=1Hopefully this information will help another unfortunate soul sometime in the future.
Offline
I do have it as well. It used to be a mitigation against GTKs broken mousewheel handling, so you might want to check whether there're now issues w/ that (and otherwise be happy ;-)
Online
Aye, the comment I had above did suggest as much. So far I haven't noticed anything weird with GTK mousewheel handling, thankfully. I hope it stays that way, though.
Anyway, thanks for all the suggestions and patience!
Offline