Running under Gnome, calling ComponentPeer::forceSetBounds immediately
after creating a new peer causes the peer to emit a visibility-changed
event because the window manager sometimes reports that the new window
is in IconicState.
_NET_WM_STATE_HIDDEN seems to more accurately reflect whether the window
is really minimised or off-screen.
- Created a new detail namespace
- Moved shared module implementation details into the detail namespace
- Split dependencies so source files only rely on details in the detail namespace
- Removed all code from the juce_gui_basics.cpp file
The biggest new feature in this commit is the addition of
NativeMessageBox::scopedAsync and AlertWindow::scopedAsync, both of
which return an instance of ScopedMessageBox that will hide the message
box in its destructor.
The code for displaying modal dialogs on Windows has also been updated.
Now, the dialog itself is run from a new thread with its own message
loop. This means that when the dialog is dismissed, the background
thread can be joined safely. In plugins, this means that there's no
danger of the plugin view being destroyed from within the message box
runloop, for example.
This new factoring is a bit more typesafe, as it avoids casting
internals to void*.
It also allows cursors to scale appropriately on high resolution
displays on Windows.
- Add AlertWindow::show() and showAsync() methods that take a MessageBoxOptions argument
- Add NativeMessageBox::show() and showAsync() methods that take a MessageBoxOptions argument
- Update the DialogsDemo to demonstrate the new methods
- Deprecate AlertWindow::showNativeDialogBox() in favour of the NativeMessageBox methods
- Pass button strings specified in MesssageBoxOptions to native dialog boxes correctly
- Use modern TaskDialog on Windows for the native dialog box where available
X11 cannot maximise windows that have their maximum size set. When not
using the native titlebar we now revert to setting the window bounds
without involving the X11 maximise function.
Ardour seems to listen to the bounds of the plugin window, and will call
`onSize` on the plugin editor when move/resize events are sent to the X
window - even if the size of the window didn't really change. This can
result in an infinite resize loop, where calling `onSize` on the VST3
instance sends a resize event to the plugin window, and this event
causes Ardour to call `onSize` on the plugin view.
To get around this, the Linux ComponentPeer will no longer request a
bounds change from the window system if the requested bounds are the
same as the current bounds.
Previously, things like PopupMenus which were created in their own
windows were not being scaled correctly on HiDPI displays on Linux.
This patch forces the display scale to 1.0 in plugins, meaning that
the transform applied to the main plugin window is the sole source
of truth for component scaling in plugins.
Previously we were choosing a Visual and Colormap on initialisation of the X11 Display which could lead to bugs when opening a window with different visual and colour requirements. This commit makes 16, 24 and 32-bit visuals available and chooses the correct one when opening a window.
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.