Use correct size in fullscreen mode

Android does not report the full screen size in display metrics.
However, it does report the correct size for layouts, which we use
to get the available geometry. Since by definition, the available
geometry should always be inside the screen geometry, it is safe to
use the maximum of the two sizes.

Task-number: QTBUG-39977
Change-Id: I78d974f12274ca67eada43f5e1d80e70149efe3f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Resize correctly on orientation change.

Make sure that the screen geometry is updated before the available
geometry, since Qt uses available geometry change as the trigger
for updating the application.

Task-number: QTBUG-39965
Change-Id: Icb660f2de739367cf1fa99ddfe600f37eb6174eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Make QWindowContainer handle drag'n'drop

Drag'n'drop events were not propagated by a the QWindowContainer to the
embedded QWindow. This patch makes the widget accept the events and
pass them on

Task-number: QTBUG-40603
Change-Id: I97320fbcad27f7c6aa48c95c90bb42dda634764e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Detect wrongly labelled wheel buttons

A mouse device with both missing labels and a wrongly placed label
on the mouse wheel buttons have been spotted.

This patch makes the XInput2 code even more lenient to better match
legacy systems that always assumed button 4 and 5 are mapped that way.

Task-number: QTBUG-40806
Change-Id: I7cc52f3d9c54e15e6f3ddcc2bdeb1bb8e0ac9eca
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fix several regressions in font selection

In Qt 5.3.0 a change was added which automatically adapts Common
script to surrounding scripts in accordance with the Unicode tr#24.

This broke *a lot* of cases of font selection because the font
selection algorithm is not prepared for handling characters with
adapted scripts. We need to disable this change for now and redo it
later with patches to font selection to avoid the regressions.

[ChangeLog][Text] Fixed several regressions in font selection when
combining different writing systems in the same text.

Task-number: QTBUG-39930
Task-number: QTBUG-39860
Change-Id: Id02b5ae2403c06542ed5d81e7c4deb2e0c7d816e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Fix invalid memcpy(dst, src) calls where dst == src

The convert_generic_inline method was not correctly handling the case
where both the conversion methods were passthrough and the last store
is therefore not needed and may trigger an invalid memcpy call.

Change-Id: Ic88780f50e1ff9dedc04b8ff1ab3527dd0c8150c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Android: use correct size when leaving fullscreen

On Android, fullscreen means enabling "immersive mode", which
results in the screen available geometry changing. When restoring
normal mode, oldAvailableGeometry == oldGeometry, which means that
the fullscreen branch would be chosen even though the state is not
fullscreen. By doing the maximized test first, we will default to
non-fullscreen geometry for non-fullscreen windows.

Task-number: QTBUG-39977
Change-Id: Ifc7e8b4de7e96d8c00603ce0cd136b95f58012bb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>