The following code does not size an application’s window to the maximum possible user area correctly since the Unity “Launcher” and title bar are not being taken into account.
const juce::Desktop::Displays::Display& mainDisplay = juce::Desktop::getInstance().getDisplays().getMainDisplay();
[attachment=0]Application Ain’t Sized Correctly.png[/attachment]
And obviously, here’s the problem: the total area and the user area are set to the same dimensions! (Also, Xinerama there or not, the issue is the same)
if (xineramaIsActive != nullptr
&& xineramaQueryScreens != nullptr
&& xineramaIsActive (display))
int numMonitors = 0;
if (XineramaScreenInfo* const screens = xineramaQueryScreens (display, &numMonitors))
for (int index = 0; index < numMonitors; ++index)
for (int j = numMonitors; --j >= 0;)
if (screens[j].screen_number == index)
d.userArea = d.totalArea = Rectangle<int> (screens[j].x_org,
Would totally help on this one, but I have no idea where to find documentation or example code on getting the necessary screen information via this Xinerama/X11/Xlib business. (Don’t mind me, I’m just new at this Linux stuff…)
Edit: Found some xlib docs… but nothing on the “Unity Launcher”. I guess it goes by a different name entirely? Or has no relation.
Edit: Or such thing does not exist.
Edit: Attempted looking into this again, seems there is absolutely no code related. X11 is complete crap.