I’m trying to get the key modifier state when handling a drag and drop on a GtkDropTarget. I tried using gtk_event_controller_get_current_event_state on the GtkDropTarget in the “drop” signal callback. It always returns a 0 value though, even when modifier keys are pressed. I also tried getting this value in the “motion” signal callback, with the same results.
Any ideas? This is with Gtk 4.20.1 on Ubuntu 25.10.
I’ve linked an example C application based on the gtk4-demo drag and drop example which I built with ```gcc -o dragndrop-test dragndrop-test.c `pkg-config --cflags --libs gtk4` -lm```.
The issue can be demonstrated by dragging one of the squares in the center of the screen and then pressing CTRL, ALT, or SHIFT modifiers while dragging. Or dragging one of the bottom colors to one of the squares in the middle of the screen and holding down modifier keys before dropping it. In all cases I’ve observed a value of 0x0000, instead of the expected modifier bits.