On Linux, repaints are only issued if the number of received SHM
completion events matches the number of events initiated with
`xShmPutImage`.
Previously, destroying a GL context was calling `XSync (display, True)`
which cleared the event queue. Sometimes, this would cause an 'SHM
Completion Event' to be removed from the queue. This meant that the
number of received events would never match the number of initiated
events, and repainting would stop indefinitely.
By calling `XSync (display, False)` instead, we ensure that pending
events are kept in the queue, so any pending SHM completion event will
be found as usual during the next repaint timer callback.
MIDI: Several ALSA Seq improvements
===================================
Many things were done in this patch (I couldn't really split in several
patches):
* Only one ALSA Sequencer client per application
* ALSA Sequencer client name is the application's name by default
* Fixed a bug when getDeivces() would return devices created by the
application itself
* Only ports created with createNewDevice() are allowed to be subscribed,
other ports (created by openDevice()) doesn't allow subscription
* AlsaPort is now handled by AlsaClient, basically having the proper
representation such as the ALSA Sequencer has.
Files: Fix default directory paths
==================================
Some information on:
* Linux LSB FHS:
http://www.linuxfoundation.org/collaborate/workgroups/lsb/fhs-30
* https://wiki.archlinux.org/index.php/Xdg_user_directories
Refactor Event loop to remove X11 dependency
============================================
The goal of this refactor was to remove X11 dependencies on juce_events
to enable non-gui applications (example, Embedded Linux apps) to have no
libx11 dependency.
The side-effect of this refactor is easy implementation of other Linux
graphical back-end, cleanup some code, better handling of X displays and
other benefits.
I removed a lot of the code from juce_linux_Windowing to separate files
for clarity. I also renamed all Linux X11 files to *linux_X11* instead of
just *linux*.
X11: Remove unnecessary XGrabButton call
========================================
This call is made unnecessary if used proper window flags when a window
is created.
Linux now compiles (clang++-3.5) without warnings when the following is enabled (these flags are identical to equator mac warnings):
-Wreorder -Wconstant-conversion -Wint-conversion -Woverloaded-virtual -Wuninitialized -Wunused-parameter -Wshorten-64-to-32 -Wstrict-aliasing -Wshadow -Wconversion -Wsign-compare -Werror -Wsign-conversion