Hey :)
I'm on Arch LInux with Gnome 3.18.
In my mouseDown(), ... functions the Alt-key never gets set as a modifier. I tried to find the error and after searching in the linux windowing code I think I found it. After the Alt-key was pressed and a keyboard event was send everything is fine and the flag for the Alt-key is set properly. But as soon as you move the mouse it gets unset.
The difference between the two cases is that after a keyboard event updateKeyModifiersFromSym() in juce_linux_Windowing.cpp is called and after a mouse event the function updateKeyModifiers() is called.
The updateKeyModifiers() triggered the Alt-key when I pressed Meta on my keyboard. It checks for a flag specified by Keys::AltMask that is set in updateModifierMappings(). The keycode for Alt gets determined by XKeysymToKeycode(display, XK_Alt_L), and this seems to be the source of the whole error. On my system that function call returns the same keycode for XK_Alt_L and XK_Meta_L. Based on that error also the value for Keys::AltMask gets set wrong. With my configuration everything worked correct when I set Keys::AltMask manually to 8, but I'm not sure how to make this work in a dynamic way with false output from XKeysymToKeycode().
(I'm also not 100% sure if the bitshifting "if (mapping->modifiermap [i << 1] == altLeftCode)" is correct that way, according to https://tronche.com/gui/x/xlib/input/keyboard-encoding.html#XModifierKeymap it should be something like modifiermap[i * mapping->max_keypermod])
Already lots of thanks in advance :)