Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
@ -199,7 +199,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\externalpage http://www.mingw.org/
|
\externalpage https://mingw-w64.org/
|
||||||
\title MinGW
|
\title MinGW
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -555,3 +555,7 @@
|
|||||||
\externalpage http://doc.qt.io/qtcreator/creator-project-creating.html#creating-c-classes
|
\externalpage http://doc.qt.io/qtcreator/creator-project-creating.html#creating-c-classes
|
||||||
\title Qt Creator: Creating C++ Classes
|
\title Qt Creator: Creating C++ Classes
|
||||||
*/
|
*/
|
||||||
|
/*!
|
||||||
|
\externalpage http://doc.qt.io/qtcreator/creator-writing-program.html
|
||||||
|
\title Creating a Qt Widget Based Application
|
||||||
|
*/
|
||||||
|
@ -6,7 +6,7 @@ qhp.extraFiles += style/offline-simple.css
|
|||||||
HTML.headerstyles = \
|
HTML.headerstyles = \
|
||||||
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline-simple.css\" />\n" \
|
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline-simple.css\" />\n" \
|
||||||
" <script type=\"text/javascript\">\n" \
|
" <script type=\"text/javascript\">\n" \
|
||||||
" window.onload = function(){document.getElementsByTagName(\"link\").item(0).setAttribute(\"href\", \"style/offline.css\");};\n" \
|
" document.getElementsByTagName(\"link\").item(0).setAttribute(\"href\", \"style/offline.css\");\n" \
|
||||||
" </script>\n"
|
" </script>\n"
|
||||||
|
|
||||||
HTML.postheader = \
|
HTML.postheader = \
|
||||||
|
@ -74,14 +74,9 @@
|
|||||||
|
|
||||||
\snippet rasterwindow/rasterwindow.cpp 1
|
\snippet rasterwindow/rasterwindow.cpp 1
|
||||||
|
|
||||||
The constructor first of all calls \l QWindow::create(). This will
|
In the constructor we create the backingstore and pass it the window
|
||||||
create the window in the windowing system. Without calling create,
|
instance it is supposed to manage. We also set the initial window
|
||||||
the window will not get events and will not be visible in the
|
geometry.
|
||||||
windowing system. The call to create does not show the window. We
|
|
||||||
then set the geometry to be something reasonable.
|
|
||||||
|
|
||||||
Then we create the backingstore and pass it the window instance it
|
|
||||||
is supposed to manage.
|
|
||||||
|
|
||||||
\snippet rasterwindow/rasterwindow.cpp 2
|
\snippet rasterwindow/rasterwindow.cpp 2
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
\page tutorials-addressbook.html
|
\page tutorials-addressbook.html
|
||||||
|
|
||||||
\title Address Book Tutorial
|
\title Address Book Tutorial
|
||||||
|
\ingroup examples-layout
|
||||||
\brief An introduction to GUI programming, showing how to put together a
|
\brief An introduction to GUI programming, showing how to put together a
|
||||||
simple yet fully-functioning application.
|
simple yet fully-functioning application.
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\example layouts/borderlayout
|
\example layouts/borderlayout
|
||||||
\title Border Layout Example
|
\title Border Layout Example
|
||||||
|
\ingroup examples-layout
|
||||||
\brief Shows how to arrange child widgets along a border.
|
\brief Shows how to arrange child widgets along a border.
|
||||||
|
|
||||||
\e{Border Layout} implements a layout that arranges child widgets to
|
\e{Border Layout} implements a layout that arranges child widgets to
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
\example widgets/calculator
|
\example widgets/calculator
|
||||||
\title Calculator Example
|
\title Calculator Example
|
||||||
\ingroup examples-widgets
|
\ingroup examples-widgets
|
||||||
|
\ingroup examples-layout
|
||||||
\brief The example shows how to use signals and slots to implement the
|
\brief The example shows how to use signals and slots to implement the
|
||||||
functionality of a calculator widget, and how to use QGridLayout
|
functionality of a calculator widget, and how to use QGridLayout
|
||||||
to place child widgets in a grid.
|
to place child widgets in a grid.
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
\title Calendar Widget Example
|
\title Calendar Widget Example
|
||||||
\example widgets/calendarwidget
|
\example widgets/calendarwidget
|
||||||
\ingroup examples-widgets
|
\ingroup examples-widgets
|
||||||
|
\ingroup examples-layout
|
||||||
\brief The Calendar Widget example shows use of QCalendarWidget.
|
\brief The Calendar Widget example shows use of QCalendarWidget.
|
||||||
|
|
||||||
\borderedimage calendarwidgetexample.png
|
\borderedimage calendarwidgetexample.png
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
\example tools/echoplugin
|
\example tools/echoplugin
|
||||||
\title Echo Plugin Example
|
\title Echo Plugin Example
|
||||||
\ingroup examples-widgets-tools
|
\ingroup examples-widgets-tools
|
||||||
|
\ingroup examples-layout
|
||||||
|
|
||||||
\brief This example shows how to create a Qt plugin.
|
\brief This example shows how to create a Qt plugin.
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\example layouts/flowlayout
|
\example layouts/flowlayout
|
||||||
\title Flow Layout Example
|
\title Flow Layout Example
|
||||||
|
\ingroup examples-layout
|
||||||
\brief Shows how to arrange widgets for different window sizes.
|
\brief Shows how to arrange widgets for different window sizes.
|
||||||
|
|
||||||
\e{Flow Layout} implements a layout that handles different window sizes. The
|
\e{Flow Layout} implements a layout that handles different window sizes. The
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
\example painting/imagecomposition
|
\example painting/imagecomposition
|
||||||
\title Image Composition Example
|
\title Image Composition Example
|
||||||
\ingroup examples-painting
|
\ingroup examples-painting
|
||||||
|
\ingroup examples-layout
|
||||||
\brief Shows how composition modes work in QPainter.
|
\brief Shows how composition modes work in QPainter.
|
||||||
|
|
||||||
\brief The Image Composition example lets the user combine images
|
\brief The Image Composition example lets the user combine images
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
\example mainwindows/menus
|
\example mainwindows/menus
|
||||||
\title Menus Example
|
\title Menus Example
|
||||||
\ingroup examples-mainwindow
|
\ingroup examples-mainwindow
|
||||||
|
\ingroup examples-layout
|
||||||
|
|
||||||
\brief The Menus example demonstrates how menus can be used in a main
|
\brief The Menus example demonstrates how menus can be used in a main
|
||||||
window application.
|
window application.
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
\example itemviews/simpletreemodel
|
\example itemviews/simpletreemodel
|
||||||
\title Simple Tree Model Example
|
\title Simple Tree Model Example
|
||||||
\ingroup examples-itemviews
|
\ingroup examples-itemviews
|
||||||
|
\ingroup examples-layout
|
||||||
\brief The Simple Tree Model example shows how to use a hierarchical model
|
\brief The Simple Tree Model example shows how to use a hierarchical model
|
||||||
with Qt's standard view classes.
|
with Qt's standard view classes.
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\example animation/sub-attaq
|
\example animation/sub-attaq
|
||||||
\title Sub-Attaq
|
\title Sub-Attaq
|
||||||
|
\ingroup examples-layout
|
||||||
|
|
||||||
\brief This example shows Qt's ability to combine \l{The Animation Framework}{the animation framework}
|
\brief This example shows Qt's ability to combine \l{The Animation Framework}{the animation framework}
|
||||||
and \l{The State Machine Framework}{the state machine framework} to create a game.
|
and \l{The State Machine Framework}{the state machine framework} to create a game.
|
||||||
|
@ -12,7 +12,7 @@ MAKEFILE_GENERATOR = MSVC.NET
|
|||||||
QMAKE_PLATFORM = win32
|
QMAKE_PLATFORM = win32
|
||||||
QMAKE_COMPILER = msvc
|
QMAKE_COMPILER = msvc
|
||||||
CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
|
CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
|
||||||
DEFINES += UNICODE WIN32
|
DEFINES += UNICODE _UNICODE WIN32
|
||||||
QMAKE_COMPILER_DEFINES += _WIN32
|
QMAKE_COMPILER_DEFINES += _WIN32
|
||||||
contains(QMAKE_TARGET.arch, x86_64) {
|
contains(QMAKE_TARGET.arch, x86_64) {
|
||||||
DEFINES += WIN64
|
DEFINES += WIN64
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"
|
xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"
|
||||||
xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"
|
xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"
|
||||||
xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"
|
xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"
|
||||||
|
xmlns:uap3=\"http://schemas.microsoft.com/appx/manifest/uap/windows10/3\"
|
||||||
xmlns:mobile=\"http://schemas.microsoft.com/appx/manifest/mobile/windows10\"
|
xmlns:mobile=\"http://schemas.microsoft.com/appx/manifest/mobile/windows10\"
|
||||||
IgnorableNamespaces=\"uap mp mobile\">
|
IgnorableNamespaces=\"uap uap3 mp mobile\">
|
||||||
|
|
||||||
<Identity
|
<Identity
|
||||||
Name=\"$${WINRT_MANIFEST.identity}\"
|
Name=\"$${WINRT_MANIFEST.identity}\"
|
||||||
|
@ -65,6 +65,8 @@ clang {
|
|||||||
greaterThan(QT_GCC_MAJOR_VERSION, 4): QMAKE_CXXFLAGS_WARN_ON += -Wdate-time
|
greaterThan(QT_GCC_MAJOR_VERSION, 4): QMAKE_CXXFLAGS_WARN_ON += -Wdate-time
|
||||||
# GCC 6 introduced these
|
# GCC 6 introduced these
|
||||||
greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond
|
greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond
|
||||||
|
# GCC 7 has a lot of false positives relating to this, so disable completely
|
||||||
|
greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow
|
||||||
}
|
}
|
||||||
|
|
||||||
warnings_are_errors:warning_clean {
|
warnings_are_errors:warning_clean {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
QMAKE_TARGET_COMPANY = The Qt Company Ltd
|
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
|
||||||
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
|
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
|
||||||
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ application development framework.
|
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
|
||||||
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2017 The Qt Company Ltd.
|
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2017 The Qt Company Ltd.
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
CONFIG += no_launch_target
|
CONFIG += no_launch_target
|
||||||
|
isEmpty(VERSION): VERSION = $$MODULE_VERSION
|
||||||
|
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = \
|
||||||
|
"Tool for the Qt Application Development Framework"
|
||||||
load(qt_app)
|
load(qt_app)
|
||||||
|
|
||||||
CONFIG += console
|
CONFIG += console
|
||||||
|
@ -116,9 +116,8 @@
|
|||||||
|
|
||||||
INDENT = "$$escape_expand(\\r\\n) "
|
INDENT = "$$escape_expand(\\r\\n) "
|
||||||
|
|
||||||
# All Windows 10 applications need to have internetClient. It is also not marked as additional
|
# All Windows 10 applications need to have internetClient.
|
||||||
# capability anymore and is assumed to be standard.
|
WINRT_MANIFEST.capabilities += internetClient
|
||||||
*-msvc2015|*-msvc2017: WINRT_MANIFEST.capabilities += internetClient
|
|
||||||
|
|
||||||
contains(WINRT_MANIFEST.capabilities, defaults) {
|
contains(WINRT_MANIFEST.capabilities, defaults) {
|
||||||
WINRT_MANIFEST.capabilities -= defaults
|
WINRT_MANIFEST.capabilities -= defaults
|
||||||
@ -130,13 +129,39 @@
|
|||||||
WINRT_MANIFEST.capabilities_device += $$WINRT_MANIFEST.capabilities_device_default
|
WINRT_MANIFEST.capabilities_device += $$WINRT_MANIFEST.capabilities_device_default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UAP_CAPABILITIES += \
|
||||||
|
appointments \
|
||||||
|
blockedChatMessages \
|
||||||
|
chat \
|
||||||
|
contacts \
|
||||||
|
enterpriseAuthentication \
|
||||||
|
# internetClient is special, as it needs to be written without namespace
|
||||||
|
#internetClient \
|
||||||
|
musicLibrary \
|
||||||
|
objects3D \
|
||||||
|
phoneCall \
|
||||||
|
picturesLibrary \
|
||||||
|
removableStorage \
|
||||||
|
sharedUserCertificates \
|
||||||
|
userAccountInformation \
|
||||||
|
videosLibrary \
|
||||||
|
voipCall
|
||||||
|
|
||||||
|
UAP3_CAPABILITIES += backgroundMediaPlayback remoteSystem userNotificationListener
|
||||||
|
|
||||||
# Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
|
# Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
|
||||||
WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
|
WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
|
||||||
WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
|
WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
|
||||||
!isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) {
|
!isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) {
|
||||||
MANIFEST_CAPABILITIES += "<Capabilities>"
|
MANIFEST_CAPABILITIES += "<Capabilities>"
|
||||||
for(CAPABILITY, WINRT_MANIFEST.capabilities): \
|
for (CAPABILITY, WINRT_MANIFEST.capabilities) {
|
||||||
MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
|
contains(UAP_CAPABILITIES, $$CAPABILITY): \
|
||||||
|
MANIFEST_CAPABILITIES += " <uap:Capability Name=\"$$CAPABILITY\" />"
|
||||||
|
else:contains(UAP3_CAPABILITIES, $$CAPABILITY): \
|
||||||
|
MANIFEST_CAPABILITIES += " <uap3:Capability Name=\"$$CAPABILITY\" />"
|
||||||
|
else: \
|
||||||
|
MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
|
||||||
|
}
|
||||||
for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
|
for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
|
||||||
MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
|
MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
|
||||||
MANIFEST_CAPABILITIES += "</Capabilities>"
|
MANIFEST_CAPABILITIES += "</Capabilities>"
|
||||||
|
@ -13,7 +13,7 @@ include(../common/g++-base.conf)
|
|||||||
MAKEFILE_GENERATOR = MINGW
|
MAKEFILE_GENERATOR = MINGW
|
||||||
QMAKE_PLATFORM = win32 mingw
|
QMAKE_PLATFORM = win32 mingw
|
||||||
CONFIG += debug_and_release debug_and_release_target precompile_header
|
CONFIG += debug_and_release debug_and_release_target precompile_header
|
||||||
DEFINES += UNICODE
|
DEFINES += UNICODE _UNICODE
|
||||||
QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
|
QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
|
||||||
|
|
||||||
QMAKE_EXT_OBJ = .o
|
QMAKE_EXT_OBJ = .o
|
||||||
|
@ -61,16 +61,19 @@ SurfaceD3D::SurfaceD3D(RendererD3D *renderer,
|
|||||||
mDepthStencilFormat(config->depthStencilFormat),
|
mDepthStencilFormat(config->depthStencilFormat),
|
||||||
mSwapChain(nullptr),
|
mSwapChain(nullptr),
|
||||||
mSwapIntervalDirty(true),
|
mSwapIntervalDirty(true),
|
||||||
|
mWindowSubclassed(false),
|
||||||
mNativeWindow(window, config, directComposition == EGL_TRUE),
|
mNativeWindow(window, config, directComposition == EGL_TRUE),
|
||||||
mWidth(width),
|
mWidth(width),
|
||||||
mHeight(height),
|
mHeight(height),
|
||||||
mSwapInterval(1),
|
mSwapInterval(1),
|
||||||
mShareHandle(reinterpret_cast<HANDLE *>(shareHandle))
|
mShareHandle(reinterpret_cast<HANDLE *>(shareHandle))
|
||||||
{
|
{
|
||||||
|
subclassWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
SurfaceD3D::~SurfaceD3D()
|
SurfaceD3D::~SurfaceD3D()
|
||||||
{
|
{
|
||||||
|
unsubclassWindow();
|
||||||
releaseSwapChain();
|
releaseSwapChain();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,6 +246,90 @@ egl::Error SurfaceD3D::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
|
|||||||
return egl::Error(EGL_SUCCESS);
|
return egl::Error(EGL_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
|
||||||
|
#define kSurfaceProperty _TEXT("Egl::SurfaceOwner")
|
||||||
|
#define kParentWndProc _TEXT("Egl::SurfaceParentWndProc")
|
||||||
|
|
||||||
|
static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
|
||||||
|
{
|
||||||
|
if (message == WM_SIZE)
|
||||||
|
{
|
||||||
|
SurfaceD3D* surf = reinterpret_cast<SurfaceD3D*>(GetProp(hwnd, kSurfaceProperty));
|
||||||
|
if(surf)
|
||||||
|
{
|
||||||
|
surf->checkForOutOfDateSwapChain();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
WNDPROC prevWndFunc = reinterpret_cast<WNDPROC >(GetProp(hwnd, kParentWndProc));
|
||||||
|
return CallWindowProc(prevWndFunc, hwnd, message, wparam, lparam);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void SurfaceD3D::subclassWindow()
|
||||||
|
{
|
||||||
|
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
|
||||||
|
HWND window = mNativeWindow.getNativeWindow();
|
||||||
|
if (!window)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD processId;
|
||||||
|
DWORD threadId = GetWindowThreadProcessId(window, &processId);
|
||||||
|
if (processId != GetCurrentProcessId() || threadId != GetCurrentThreadId())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetLastError(0);
|
||||||
|
LONG_PTR oldWndProc = SetWindowLongPtr(window, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
|
||||||
|
if(oldWndProc == 0 && GetLastError() != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
mWindowSubclassed = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetProp(window, kSurfaceProperty, reinterpret_cast<HANDLE>(this));
|
||||||
|
SetProp(window, kParentWndProc, reinterpret_cast<HANDLE>(oldWndProc));
|
||||||
|
mWindowSubclassed = true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void SurfaceD3D::unsubclassWindow()
|
||||||
|
{
|
||||||
|
if (!mWindowSubclassed)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
|
||||||
|
HWND window = mNativeWindow.getNativeWindow();
|
||||||
|
if (!window)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// un-subclass
|
||||||
|
LONG_PTR parentWndFunc = reinterpret_cast<LONG_PTR>(GetProp(window, kParentWndProc));
|
||||||
|
|
||||||
|
// Check the windowproc is still SurfaceWindowProc.
|
||||||
|
// If this assert fails, then it is likely the application has subclassed the
|
||||||
|
// hwnd as well and did not unsubclass before destroying its EGL context. The
|
||||||
|
// application should be modified to either subclass before initializing the
|
||||||
|
// EGL context, or to unsubclass before destroying the EGL context.
|
||||||
|
if(parentWndFunc)
|
||||||
|
{
|
||||||
|
LONG_PTR prevWndFunc = SetWindowLongPtr(window, GWLP_WNDPROC, parentWndFunc);
|
||||||
|
UNUSED_ASSERTION_VARIABLE(prevWndFunc);
|
||||||
|
ASSERT(prevWndFunc == reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
|
||||||
|
}
|
||||||
|
|
||||||
|
RemoveProp(window, kSurfaceProperty);
|
||||||
|
RemoveProp(window, kParentWndProc);
|
||||||
|
#endif
|
||||||
|
mWindowSubclassed = false;
|
||||||
|
}
|
||||||
|
|
||||||
bool SurfaceD3D::checkForOutOfDateSwapChain()
|
bool SurfaceD3D::checkForOutOfDateSwapChain()
|
||||||
{
|
{
|
||||||
RECT client;
|
RECT client;
|
||||||
|
@ -82,6 +82,9 @@ class SurfaceD3D : public SurfaceImpl
|
|||||||
egl::Error resetSwapChain(int backbufferWidth, int backbufferHeight);
|
egl::Error resetSwapChain(int backbufferWidth, int backbufferHeight);
|
||||||
egl::Error resizeSwapChain(int backbufferWidth, int backbufferHeight);
|
egl::Error resizeSwapChain(int backbufferWidth, int backbufferHeight);
|
||||||
|
|
||||||
|
void subclassWindow();
|
||||||
|
void unsubclassWindow();
|
||||||
|
|
||||||
RendererD3D *mRenderer;
|
RendererD3D *mRenderer;
|
||||||
egl::Display *mDisplay;
|
egl::Display *mDisplay;
|
||||||
|
|
||||||
@ -93,6 +96,7 @@ class SurfaceD3D : public SurfaceImpl
|
|||||||
|
|
||||||
SwapChainD3D *mSwapChain;
|
SwapChainD3D *mSwapChain;
|
||||||
bool mSwapIntervalDirty;
|
bool mSwapIntervalDirty;
|
||||||
|
bool mWindowSubclassed; // Indicates whether we successfully subclassed mWindow for WM_RESIZE hooking
|
||||||
|
|
||||||
NativeWindow mNativeWindow; // Handler for the Window that the surface is created for.
|
NativeWindow mNativeWindow; // Handler for the Window that the surface is created for.
|
||||||
EGLint mWidth;
|
EGLint mWidth;
|
||||||
|
6
src/3rdparty/libjpeg.pri
vendored
@ -1,9 +1,3 @@
|
|||||||
wince {
|
|
||||||
DEFINES += NO_GETENV
|
|
||||||
contains(CE_ARCH,x86):CONFIG -= stl exceptions
|
|
||||||
contains(CE_ARCH,x86):CONFIG += exceptions_off
|
|
||||||
}
|
|
||||||
|
|
||||||
winrt: DEFINES += NO_GETENV
|
winrt: DEFINES += NO_GETENV
|
||||||
|
|
||||||
#Disable warnings in 3rdparty code due to unused arguments
|
#Disable warnings in 3rdparty code due to unused arguments
|
||||||
|
1
src/3rdparty/zlib.pri
vendored
@ -1,4 +1,3 @@
|
|||||||
wince: DEFINES += NO_ERRNO_H
|
|
||||||
INCLUDEPATH = $$PWD/zlib $$INCLUDEPATH
|
INCLUDEPATH = $$PWD/zlib $$INCLUDEPATH
|
||||||
SOURCES+= \
|
SOURCES+= \
|
||||||
$$PWD/zlib/adler32.c \
|
$$PWD/zlib/adler32.c \
|
||||||
|
@ -0,0 +1,157 @@
|
|||||||
|
From 0a6fe2a93f451997d01e5e326846e0911d22622b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oliver Wolff <oliver.wolff@qt.io>
|
||||||
|
Date: Wed, 31 May 2017 15:50:28 +0200
|
||||||
|
Subject: [PATCH] ANGLE: Fix flickering on resize when D3D9 is used
|
||||||
|
|
||||||
|
By reverting ANGLE change d3b84ab51db09de238459b0dff2e8420c09aabf3
|
||||||
|
we get rid of the flickering that happens on resize when D3D9 is
|
||||||
|
used. The issue that was fixed there is not relevant in Qt's
|
||||||
|
context so it is safe to revert the change.
|
||||||
|
|
||||||
|
Task-number: QTBUG-59893
|
||||||
|
Change-Id: I9306314b892612fbd1f7a058a2e606aedc0367bb
|
||||||
|
---
|
||||||
|
.../angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp | 87 ++++++++++++++++++++++
|
||||||
|
.../angle/src/libANGLE/renderer/d3d/SurfaceD3D.h | 4 +
|
||||||
|
2 files changed, 91 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
|
||||||
|
index 3d27548..f567f47 100644
|
||||||
|
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
|
||||||
|
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
|
||||||
|
@@ -61,16 +61,19 @@ SurfaceD3D::SurfaceD3D(RendererD3D *renderer,
|
||||||
|
mDepthStencilFormat(config->depthStencilFormat),
|
||||||
|
mSwapChain(nullptr),
|
||||||
|
mSwapIntervalDirty(true),
|
||||||
|
+ mWindowSubclassed(false),
|
||||||
|
mNativeWindow(window, config, directComposition == EGL_TRUE),
|
||||||
|
mWidth(width),
|
||||||
|
mHeight(height),
|
||||||
|
mSwapInterval(1),
|
||||||
|
mShareHandle(reinterpret_cast<HANDLE *>(shareHandle))
|
||||||
|
{
|
||||||
|
+ subclassWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
SurfaceD3D::~SurfaceD3D()
|
||||||
|
{
|
||||||
|
+ unsubclassWindow();
|
||||||
|
releaseSwapChain();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -243,6 +246,90 @@ egl::Error SurfaceD3D::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
|
||||||
|
return egl::Error(EGL_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
|
||||||
|
+#define kSurfaceProperty _TEXT("Egl::SurfaceOwner")
|
||||||
|
+#define kParentWndProc _TEXT("Egl::SurfaceParentWndProc")
|
||||||
|
+
|
||||||
|
+static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
|
||||||
|
+{
|
||||||
|
+ if (message == WM_SIZE)
|
||||||
|
+ {
|
||||||
|
+ SurfaceD3D* surf = reinterpret_cast<SurfaceD3D*>(GetProp(hwnd, kSurfaceProperty));
|
||||||
|
+ if(surf)
|
||||||
|
+ {
|
||||||
|
+ surf->checkForOutOfDateSwapChain();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ WNDPROC prevWndFunc = reinterpret_cast<WNDPROC >(GetProp(hwnd, kParentWndProc));
|
||||||
|
+ return CallWindowProc(prevWndFunc, hwnd, message, wparam, lparam);
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+void SurfaceD3D::subclassWindow()
|
||||||
|
+{
|
||||||
|
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
|
||||||
|
+ HWND window = mNativeWindow.getNativeWindow();
|
||||||
|
+ if (!window)
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ DWORD processId;
|
||||||
|
+ DWORD threadId = GetWindowThreadProcessId(window, &processId);
|
||||||
|
+ if (processId != GetCurrentProcessId() || threadId != GetCurrentThreadId())
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ SetLastError(0);
|
||||||
|
+ LONG_PTR oldWndProc = SetWindowLongPtr(window, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
|
||||||
|
+ if(oldWndProc == 0 && GetLastError() != ERROR_SUCCESS)
|
||||||
|
+ {
|
||||||
|
+ mWindowSubclassed = false;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ SetProp(window, kSurfaceProperty, reinterpret_cast<HANDLE>(this));
|
||||||
|
+ SetProp(window, kParentWndProc, reinterpret_cast<HANDLE>(oldWndProc));
|
||||||
|
+ mWindowSubclassed = true;
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void SurfaceD3D::unsubclassWindow()
|
||||||
|
+{
|
||||||
|
+ if (!mWindowSubclassed)
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
|
||||||
|
+ HWND window = mNativeWindow.getNativeWindow();
|
||||||
|
+ if (!window)
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // un-subclass
|
||||||
|
+ LONG_PTR parentWndFunc = reinterpret_cast<LONG_PTR>(GetProp(window, kParentWndProc));
|
||||||
|
+
|
||||||
|
+ // Check the windowproc is still SurfaceWindowProc.
|
||||||
|
+ // If this assert fails, then it is likely the application has subclassed the
|
||||||
|
+ // hwnd as well and did not unsubclass before destroying its EGL context. The
|
||||||
|
+ // application should be modified to either subclass before initializing the
|
||||||
|
+ // EGL context, or to unsubclass before destroying the EGL context.
|
||||||
|
+ if(parentWndFunc)
|
||||||
|
+ {
|
||||||
|
+ LONG_PTR prevWndFunc = SetWindowLongPtr(window, GWLP_WNDPROC, parentWndFunc);
|
||||||
|
+ UNUSED_ASSERTION_VARIABLE(prevWndFunc);
|
||||||
|
+ ASSERT(prevWndFunc == reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ RemoveProp(window, kSurfaceProperty);
|
||||||
|
+ RemoveProp(window, kParentWndProc);
|
||||||
|
+#endif
|
||||||
|
+ mWindowSubclassed = false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool SurfaceD3D::checkForOutOfDateSwapChain()
|
||||||
|
{
|
||||||
|
RECT client;
|
||||||
|
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
|
||||||
|
index b925bfc..67d408d 100644
|
||||||
|
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
|
||||||
|
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
|
||||||
|
@@ -82,6 +82,9 @@ class SurfaceD3D : public SurfaceImpl
|
||||||
|
egl::Error resetSwapChain(int backbufferWidth, int backbufferHeight);
|
||||||
|
egl::Error resizeSwapChain(int backbufferWidth, int backbufferHeight);
|
||||||
|
|
||||||
|
+ void subclassWindow();
|
||||||
|
+ void unsubclassWindow();
|
||||||
|
+
|
||||||
|
RendererD3D *mRenderer;
|
||||||
|
egl::Display *mDisplay;
|
||||||
|
|
||||||
|
@@ -93,6 +96,7 @@ class SurfaceD3D : public SurfaceImpl
|
||||||
|
|
||||||
|
SwapChainD3D *mSwapChain;
|
||||||
|
bool mSwapIntervalDirty;
|
||||||
|
+ bool mWindowSubclassed; // Indicates whether we successfully subclassed mWindow for WM_RESIZE hooking
|
||||||
|
|
||||||
|
NativeWindow mNativeWindow; // Handler for the Window that the surface is created for.
|
||||||
|
EGLint mWidth;
|
||||||
|
--
|
||||||
|
2.10.2.windows.1
|
||||||
|
|
@ -96,6 +96,12 @@
|
|||||||
|
|
||||||
#include "archdetect.cpp"
|
#include "archdetect.cpp"
|
||||||
|
|
||||||
|
#ifdef qFatal
|
||||||
|
// the qFatal in this file are just redirections from elsewhere, so
|
||||||
|
// don't capture any context again
|
||||||
|
# undef qFatal
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#if !QT_DEPRECATED_SINCE(5, 0)
|
#if !QT_DEPRECATED_SINCE(5, 0)
|
||||||
@ -3056,13 +3062,20 @@ QString QSysInfo::machineHostName()
|
|||||||
If this macro is used outside a function, the behavior is undefined.
|
If this macro is used outside a function, the behavior is undefined.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*!
|
||||||
The Q_CHECK_PTR macro calls this function if an allocation check
|
\internal
|
||||||
fails.
|
The Q_CHECK_PTR macro calls this function if an allocation check
|
||||||
|
fails.
|
||||||
*/
|
*/
|
||||||
void qt_check_pointer(const char *n, int l)
|
void qt_check_pointer(const char *n, int l) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
qFatal("In file %s, line %d: Out of memory", n, l);
|
// make separate printing calls so that the first one may flush;
|
||||||
|
// the second one could want to allocate memory (fputs prints a
|
||||||
|
// newline and stderr auto-flushes).
|
||||||
|
fputs("Out of memory", stderr);
|
||||||
|
fprintf(stderr, " in %s, line %d\n", n, l);
|
||||||
|
|
||||||
|
std::terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3092,7 +3105,7 @@ Q_NORETURN void qTerminate() Q_DECL_NOTHROW
|
|||||||
*/
|
*/
|
||||||
void qt_assert(const char *assertion, const char *file, int line) Q_DECL_NOTHROW
|
void qt_assert(const char *assertion, const char *file, int line) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
qFatal("ASSERT: \"%s\" in file %s, line %d", assertion, file, line);
|
QMessageLogger(file, line, nullptr).fatal("ASSERT: \"%s\" in file %s, line %d", assertion, file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3100,7 +3113,7 @@ void qt_assert(const char *assertion, const char *file, int line) Q_DECL_NOTHROW
|
|||||||
*/
|
*/
|
||||||
void qt_assert_x(const char *where, const char *what, const char *file, int line) Q_DECL_NOTHROW
|
void qt_assert_x(const char *where, const char *what, const char *file, int line) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
qFatal("ASSERT failure in %s: \"%s\", file %s, line %d", where, what, file, line);
|
QMessageLogger(file, line, nullptr).fatal("ASSERT failure in %s: \"%s\", file %s, line %d", where, what, file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -771,7 +771,7 @@ template <> class QStaticAssertFailure<true> {};
|
|||||||
#define Q_STATIC_ASSERT_X(Condition, Message) Q_STATIC_ASSERT(Condition)
|
#define Q_STATIC_ASSERT_X(Condition, Message) Q_STATIC_ASSERT(Condition)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Q_CORE_EXPORT void qt_check_pointer(const char *, int);
|
Q_NORETURN Q_CORE_EXPORT void qt_check_pointer(const char *, int) Q_DECL_NOTHROW;
|
||||||
Q_CORE_EXPORT void qBadAlloc();
|
Q_CORE_EXPORT void qBadAlloc();
|
||||||
|
|
||||||
#ifdef QT_NO_EXCEPTIONS
|
#ifdef QT_NO_EXCEPTIONS
|
||||||
|
@ -297,23 +297,27 @@ bool QFileSystemEntry::isAbsolute() const
|
|||||||
bool QFileSystemEntry::isDriveRoot() const
|
bool QFileSystemEntry::isDriveRoot() const
|
||||||
{
|
{
|
||||||
resolveFilePath();
|
resolveFilePath();
|
||||||
|
return QFileSystemEntry::isDriveRootPath(m_filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QFileSystemEntry::isDriveRootPath(const QString &path)
|
||||||
|
{
|
||||||
#ifndef Q_OS_WINRT
|
#ifndef Q_OS_WINRT
|
||||||
return (m_filePath.length() == 3
|
return (path.length() == 3
|
||||||
&& m_filePath.at(0).isLetter() && m_filePath.at(1) == QLatin1Char(':')
|
&& path.at(0).isLetter() && path.at(1) == QLatin1Char(':')
|
||||||
&& m_filePath.at(2) == QLatin1Char('/'));
|
&& path.at(2) == QLatin1Char('/'));
|
||||||
#else // !Q_OS_WINRT
|
#else // !Q_OS_WINRT
|
||||||
return m_filePath == QDir::rootPath();
|
return path == QDir::rootPath();
|
||||||
#endif // !Q_OS_WINRT
|
#endif // !Q_OS_WINRT
|
||||||
}
|
}
|
||||||
#endif
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
bool QFileSystemEntry::isRoot() const
|
bool QFileSystemEntry::isRootPath(const QString &path)
|
||||||
{
|
{
|
||||||
resolveFilePath();
|
if (path == QLatin1String("/")
|
||||||
if (m_filePath == QLatin1String("/")
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
|| isDriveRoot()
|
|| isDriveRootPath(path)
|
||||||
|| isUncRoot(m_filePath)
|
|| isUncRoot(path)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
return true;
|
return true;
|
||||||
@ -321,6 +325,12 @@ bool QFileSystemEntry::isRoot() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QFileSystemEntry::isRoot() const
|
||||||
|
{
|
||||||
|
resolveFilePath();
|
||||||
|
return isRootPath(m_filePath);
|
||||||
|
}
|
||||||
|
|
||||||
bool QFileSystemEntry::isEmpty() const
|
bool QFileSystemEntry::isEmpty() const
|
||||||
{
|
{
|
||||||
return m_filePath.isEmpty() && m_nativeFilePath.isEmpty();
|
return m_filePath.isEmpty() && m_nativeFilePath.isEmpty();
|
||||||
|
@ -94,6 +94,7 @@ public:
|
|||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
bool isDriveRoot() const;
|
bool isDriveRoot() const;
|
||||||
|
static bool isDriveRootPath(const QString &path);
|
||||||
#endif
|
#endif
|
||||||
bool isRoot() const;
|
bool isRoot() const;
|
||||||
|
|
||||||
@ -103,6 +104,8 @@ public:
|
|||||||
*this = QFileSystemEntry();
|
*this = QFileSystemEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Q_CORE_EXPORT static bool isRootPath(const QString &path);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// creates the QString version out of the bytearray version
|
// creates the QString version out of the bytearray version
|
||||||
void resolveFilePath() const;
|
void resolveFilePath() const;
|
||||||
|
@ -526,7 +526,7 @@ QMimeType QMimeDatabase::mimeTypeForUrl(const QUrl &url) const
|
|||||||
if (scheme.startsWith(QLatin1String("http")) || scheme == QLatin1String("mailto"))
|
if (scheme.startsWith(QLatin1String("http")) || scheme == QLatin1String("mailto"))
|
||||||
return mimeTypeForName(d->defaultMimeType());
|
return mimeTypeForName(d->defaultMimeType());
|
||||||
|
|
||||||
return mimeTypeForFile(url.path());
|
return mimeTypeForFile(url.path(), MatchExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -207,7 +207,11 @@ public:
|
|||||||
|
|
||||||
template <typename T, typename ConstantsType>
|
template <typename T, typename ConstantsType>
|
||||||
Q_DECL_CONSTEXPR inline QFreeList<T, ConstantsType>::QFreeList()
|
Q_DECL_CONSTEXPR inline QFreeList<T, ConstantsType>::QFreeList()
|
||||||
: _next(ConstantsType::InitialNextValue)
|
:
|
||||||
|
#if defined(Q_COMPILER_CONSTEXPR)
|
||||||
|
_v{}, // uniform initialization required
|
||||||
|
#endif
|
||||||
|
_next(ConstantsType::InitialNextValue)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
template <typename T, typename ConstantsType>
|
template <typename T, typename ConstantsType>
|
||||||
|
@ -370,7 +370,7 @@ double asciiToDouble(const char *num, int numLen, bool &ok, int &processed,
|
|||||||
// if a digit before any 'e' is not 0, then a non-zero number was intended.
|
// if a digit before any 'e' is not 0, then a non-zero number was intended.
|
||||||
ok = false;
|
ok = false;
|
||||||
return 0.0;
|
return 0.0;
|
||||||
} else if (num[i] == 'e') {
|
} else if (num[i] == 'e' || num[i] == 'E') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ qtConfig(dbus-linked) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
wince: LIBS_PRIVATE += -lws2
|
LIBS_PRIVATE += \
|
||||||
else:LIBS_PRIVATE += -lws2_32 \
|
-lws2_32 \
|
||||||
-ladvapi32 \
|
-ladvapi32 \
|
||||||
-lnetapi32 \
|
-lnetapi32 \
|
||||||
-luser32
|
-luser32
|
||||||
|
@ -271,7 +271,7 @@
|
|||||||
"label": "XCB Xlib",
|
"label": "XCB Xlib",
|
||||||
"test": "qpa/xcb-xlib",
|
"test": "qpa/xcb-xlib",
|
||||||
"sources": [
|
"sources": [
|
||||||
{ "type": "pkgConfig", "args": "X11-xcb x11 xcb" },
|
{ "type": "pkgConfig", "args": "x11-xcb x11 xcb" },
|
||||||
"-lxcb -lX11 -lX11-xcb"
|
"-lxcb -lX11 -lX11-xcb"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -457,7 +457,7 @@
|
|||||||
"features": {
|
"features": {
|
||||||
"accessibility-atspi-bridge": {
|
"accessibility-atspi-bridge": {
|
||||||
"label": "ATSPI Bridge",
|
"label": "ATSPI Bridge",
|
||||||
"condition": "features.accessibility && features.xcb && features.dbus && config.atspi",
|
"condition": "features.accessibility && features.xcb && features.dbus && libs.atspi",
|
||||||
"output": [ "privateFeature", "feature" ]
|
"output": [ "privateFeature", "feature" ]
|
||||||
},
|
},
|
||||||
"angle": {
|
"angle": {
|
||||||
|
@ -114,6 +114,15 @@ static QDataStream &operator>>(QDataStream &s, BMP_INFOHDR &bi)
|
|||||||
s >> bi.biCompression >> bi.biSizeImage;
|
s >> bi.biCompression >> bi.biSizeImage;
|
||||||
s >> bi.biXPelsPerMeter >> bi.biYPelsPerMeter;
|
s >> bi.biXPelsPerMeter >> bi.biYPelsPerMeter;
|
||||||
s >> bi.biClrUsed >> bi.biClrImportant;
|
s >> bi.biClrUsed >> bi.biClrImportant;
|
||||||
|
if (bi.biSize >= BMP_WIN4) {
|
||||||
|
s >> bi.biRedMask >> bi.biGreenMask >> bi.biBlueMask >> bi.biAlphaMask;
|
||||||
|
s >> bi.biCSType;
|
||||||
|
for (int i = 0; i < 9; ++i)
|
||||||
|
s >> bi.biEndpoints[i];
|
||||||
|
s >> bi.biGammaRed >> bi.biGammaGreen >> bi.biGammaBlue;
|
||||||
|
if (bi.biSize == BMP_WIN5)
|
||||||
|
s >> bi.biIntent >> bi.biProfileData >> bi.biProfileSize >> bi.biReserved;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else { // probably old Windows format
|
else { // probably old Windows format
|
||||||
qint16 w, h;
|
qint16 w, h;
|
||||||
@ -219,53 +228,20 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, qint64 offset,
|
|||||||
int alpha_scale = 0;
|
int alpha_scale = 0;
|
||||||
|
|
||||||
if (!d->isSequential())
|
if (!d->isSequential())
|
||||||
d->seek(startpos + BMP_FILEHDR_SIZE + (bi.biSize >= BMP_WIN4 ? BMP_WIN : bi.biSize)); // goto start of colormap or masks
|
d->seek(startpos + BMP_FILEHDR_SIZE + bi.biSize); // goto start of colormap or masks
|
||||||
|
|
||||||
if (bi.biSize >= BMP_WIN4 || (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32))) {
|
if (bi.biSize >= BMP_WIN4) {
|
||||||
|
red_mask = bi.biRedMask;
|
||||||
|
green_mask = bi.biGreenMask;
|
||||||
|
blue_mask = bi.biBlueMask;
|
||||||
|
alpha_mask = bi.biAlphaMask;
|
||||||
|
} else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
|
||||||
if (d->read((char *)&red_mask, sizeof(red_mask)) != sizeof(red_mask))
|
if (d->read((char *)&red_mask, sizeof(red_mask)) != sizeof(red_mask))
|
||||||
return false;
|
return false;
|
||||||
if (d->read((char *)&green_mask, sizeof(green_mask)) != sizeof(green_mask))
|
if (d->read((char *)&green_mask, sizeof(green_mask)) != sizeof(green_mask))
|
||||||
return false;
|
return false;
|
||||||
if (d->read((char *)&blue_mask, sizeof(blue_mask)) != sizeof(blue_mask))
|
if (d->read((char *)&blue_mask, sizeof(blue_mask)) != sizeof(blue_mask))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Read BMP v4+ header
|
|
||||||
if (bi.biSize >= BMP_WIN4) {
|
|
||||||
int CSType = 0;
|
|
||||||
int gamma_red = 0;
|
|
||||||
int gamma_green = 0;
|
|
||||||
int gamma_blue = 0;
|
|
||||||
int endpoints[9];
|
|
||||||
|
|
||||||
if (d->read((char *)&alpha_mask, sizeof(alpha_mask)) != sizeof(alpha_mask))
|
|
||||||
return false;
|
|
||||||
if (d->read((char *)&CSType, sizeof(CSType)) != sizeof(CSType))
|
|
||||||
return false;
|
|
||||||
if (d->read((char *)&endpoints, sizeof(endpoints)) != sizeof(endpoints))
|
|
||||||
return false;
|
|
||||||
if (d->read((char *)&gamma_red, sizeof(gamma_red)) != sizeof(gamma_red))
|
|
||||||
return false;
|
|
||||||
if (d->read((char *)&gamma_green, sizeof(gamma_green)) != sizeof(gamma_green))
|
|
||||||
return false;
|
|
||||||
if (d->read((char *)&gamma_blue, sizeof(gamma_blue)) != sizeof(gamma_blue))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (bi.biSize == BMP_WIN5) {
|
|
||||||
qint32 intent = 0;
|
|
||||||
qint32 profileData = 0;
|
|
||||||
qint32 profileSize = 0;
|
|
||||||
qint32 reserved = 0;
|
|
||||||
|
|
||||||
if (d->read((char *)&intent, sizeof(intent)) != sizeof(intent))
|
|
||||||
return false;
|
|
||||||
if (d->read((char *)&profileData, sizeof(profileData)) != sizeof(profileData))
|
|
||||||
return false;
|
|
||||||
if (d->read((char *)&profileSize, sizeof(profileSize)) != sizeof(profileSize))
|
|
||||||
return false;
|
|
||||||
if (d->read((char *)&reserved, sizeof(reserved)) != sizeof(reserved) || reserved != 0)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool transp = (comp == BMP_BITFIELDS) && alpha_mask;
|
bool transp = (comp == BMP_BITFIELDS) && alpha_mask;
|
||||||
@ -876,7 +852,10 @@ QVariant QBmpHandler::option(ImageOption option) const
|
|||||||
case 32:
|
case 32:
|
||||||
case 24:
|
case 24:
|
||||||
case 16:
|
case 16:
|
||||||
format = QImage::Format_RGB32;
|
if (infoHeader.biCompression == BMP_BITFIELDS && infoHeader.biSize >= BMP_WIN4 && infoHeader.biAlphaMask)
|
||||||
|
format = QImage::Format_ARGB32;
|
||||||
|
else
|
||||||
|
format = QImage::Format_RGB32;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
case 4:
|
case 4:
|
||||||
|
@ -78,6 +78,21 @@ struct BMP_INFOHDR { // BMP information header
|
|||||||
qint32 biYPelsPerMeter; // vertical resolution
|
qint32 biYPelsPerMeter; // vertical resolution
|
||||||
qint32 biClrUsed; // number of colors used
|
qint32 biClrUsed; // number of colors used
|
||||||
qint32 biClrImportant; // number of important colors
|
qint32 biClrImportant; // number of important colors
|
||||||
|
// V4:
|
||||||
|
quint32 biRedMask;
|
||||||
|
quint32 biGreenMask;
|
||||||
|
quint32 biBlueMask;
|
||||||
|
quint32 biAlphaMask;
|
||||||
|
qint32 biCSType;
|
||||||
|
qint32 biEndpoints[9];
|
||||||
|
qint32 biGammaRed;
|
||||||
|
qint32 biGammaGreen;
|
||||||
|
qint32 biGammaBlue;
|
||||||
|
// V5:
|
||||||
|
qint32 biIntent;
|
||||||
|
qint32 biProfileData;
|
||||||
|
qint32 biProfileSize;
|
||||||
|
qint32 biReserved;
|
||||||
};
|
};
|
||||||
|
|
||||||
// BMP-Handler, which is also able to read and write the DIB
|
// BMP-Handler, which is also able to read and write the DIB
|
||||||
|
@ -929,7 +929,7 @@ bool QSslSocketBackendPrivate::setSessionCertificate(QString &errorDescription,
|
|||||||
#endif
|
#endif
|
||||||
QCFType<CFDictionaryRef> options = CFDictionaryCreate(nullptr, keys, values, nKeys,
|
QCFType<CFDictionaryRef> options = CFDictionaryCreate(nullptr, keys, values, nKeys,
|
||||||
nullptr, nullptr);
|
nullptr, nullptr);
|
||||||
CFArrayRef items = nullptr;
|
QCFType<CFArrayRef> items;
|
||||||
OSStatus err = SecPKCS12Import(pkcs12, options, &items);
|
OSStatus err = SecPKCS12Import(pkcs12, options, &items);
|
||||||
if (err != noErr) {
|
if (err != noErr) {
|
||||||
#ifdef QSSLSOCKET_DEBUG
|
#ifdef QSSLSOCKET_DEBUG
|
||||||
@ -970,7 +970,7 @@ bool QSslSocketBackendPrivate::setSessionCertificate(QString &errorDescription,
|
|||||||
|
|
||||||
CFArrayAppendValue(certs, identity);
|
CFArrayAppendValue(certs, identity);
|
||||||
|
|
||||||
QCFType<CFArrayRef> chain((CFArrayRef)CFDictionaryGetValue(import, kSecImportItemCertChain));
|
CFArrayRef chain = (CFArrayRef)CFDictionaryGetValue(import, kSecImportItemCertChain);
|
||||||
if (chain) {
|
if (chain) {
|
||||||
for (CFIndex i = 1, e = CFArrayGetCount(chain); i < e; ++i)
|
for (CFIndex i = 1, e = CFArrayGetCount(chain); i < e; ++i)
|
||||||
CFArrayAppendValue(certs, CFArrayGetValueAtIndex(chain, i));
|
CFArrayAppendValue(certs, CFArrayGetValueAtIndex(chain, i));
|
||||||
|
@ -80,6 +80,7 @@ namespace QtAndroidAccessibility
|
|||||||
|
|
||||||
static void setActive(JNIEnv */*env*/, jobject /*thiz*/, jboolean active)
|
static void setActive(JNIEnv */*env*/, jobject /*thiz*/, jboolean active)
|
||||||
{
|
{
|
||||||
|
QMutexLocker lock(QtAndroid::platformInterfaceMutex());
|
||||||
QAndroidPlatformIntegration *platformIntegration = QtAndroid::androidPlatformIntegration();
|
QAndroidPlatformIntegration *platformIntegration = QtAndroid::androidPlatformIntegration();
|
||||||
if (platformIntegration)
|
if (platformIntegration)
|
||||||
platformIntegration->accessibility()->setActive(active);
|
platformIntegration->accessibility()->setActive(active);
|
||||||
|
@ -273,6 +273,7 @@ namespace QtAndroidInput
|
|||||||
if (m_touchPoints.isEmpty())
|
if (m_touchPoints.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
QMutexLocker lock(QtAndroid::platformInterfaceMutex());
|
||||||
QAndroidPlatformIntegration *platformIntegration = QtAndroid::androidPlatformIntegration();
|
QAndroidPlatformIntegration *platformIntegration = QtAndroid::androidPlatformIntegration();
|
||||||
if (!platformIntegration)
|
if (!platformIntegration)
|
||||||
return;
|
return;
|
||||||
|
@ -83,7 +83,7 @@ static jmethodID m_setSurfaceGeometryMethodID = nullptr;
|
|||||||
static jmethodID m_destroySurfaceMethodID = nullptr;
|
static jmethodID m_destroySurfaceMethodID = nullptr;
|
||||||
|
|
||||||
static int m_pendingApplicationState = -1;
|
static int m_pendingApplicationState = -1;
|
||||||
static QBasicMutex m_pendingAppStateMtx;
|
static QBasicMutex m_platformMutex;
|
||||||
|
|
||||||
static jclass m_bitmapClass = nullptr;
|
static jclass m_bitmapClass = nullptr;
|
||||||
static jmethodID m_createBitmapMethodID = nullptr;
|
static jmethodID m_createBitmapMethodID = nullptr;
|
||||||
@ -104,7 +104,7 @@ static sem_t m_exitSemaphore, m_terminateSemaphore;
|
|||||||
|
|
||||||
QHash<int, AndroidSurfaceClient *> m_surfaces;
|
QHash<int, AndroidSurfaceClient *> m_surfaces;
|
||||||
|
|
||||||
static QMutex m_surfacesMutex;
|
static QBasicMutex m_surfacesMutex;
|
||||||
static int m_surfaceId = 1;
|
static int m_surfaceId = 1;
|
||||||
|
|
||||||
|
|
||||||
@ -123,28 +123,26 @@ static const char m_qtTag[] = "Qt";
|
|||||||
static const char m_classErrorMsg[] = "Can't find class \"%s\"";
|
static const char m_classErrorMsg[] = "Can't find class \"%s\"";
|
||||||
static const char m_methodErrorMsg[] = "Can't find method \"%s%s\"";
|
static const char m_methodErrorMsg[] = "Can't find method \"%s%s\"";
|
||||||
|
|
||||||
static void flushPendingApplicationState();
|
|
||||||
|
|
||||||
namespace QtAndroid
|
namespace QtAndroid
|
||||||
{
|
{
|
||||||
|
QBasicMutex *platformInterfaceMutex()
|
||||||
|
{
|
||||||
|
return &m_platformMutex;
|
||||||
|
}
|
||||||
|
|
||||||
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration)
|
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration)
|
||||||
{
|
{
|
||||||
QMutexLocker lock(&m_surfacesMutex);
|
|
||||||
m_androidPlatformIntegration = androidPlatformIntegration;
|
m_androidPlatformIntegration = androidPlatformIntegration;
|
||||||
|
|
||||||
// flush the pending state if necessary.
|
// flush the pending state if necessary.
|
||||||
if (m_androidPlatformIntegration) {
|
if (m_androidPlatformIntegration && (m_pendingApplicationState != -1))
|
||||||
flushPendingApplicationState();
|
QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState(m_pendingApplicationState));
|
||||||
m_androidPlatformIntegration->flushPendingUpdates();
|
|
||||||
} else {
|
m_pendingApplicationState = -1;
|
||||||
QMutexLocker locker(&m_pendingAppStateMtx);
|
|
||||||
m_pendingApplicationState = -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QAndroidPlatformIntegration *androidPlatformIntegration()
|
QAndroidPlatformIntegration *androidPlatformIntegration()
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&m_surfacesMutex);
|
|
||||||
return m_androidPlatformIntegration;
|
return m_androidPlatformIntegration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,17 +441,6 @@ namespace QtAndroid
|
|||||||
|
|
||||||
} // namespace QtAndroid
|
} // namespace QtAndroid
|
||||||
|
|
||||||
// Force an update of the pending application state (state set before the platform plugin was created)
|
|
||||||
static void flushPendingApplicationState()
|
|
||||||
{
|
|
||||||
QMutexLocker locker(&m_pendingAppStateMtx);
|
|
||||||
if (m_pendingApplicationState == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState(m_pendingApplicationState));
|
|
||||||
m_pendingApplicationState = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static jboolean startQtAndroidPlugin(JNIEnv* /*env*/, jobject /*object*//*, jobject applicationAssetManager*/)
|
static jboolean startQtAndroidPlugin(JNIEnv* /*env*/, jobject /*object*//*, jobject applicationAssetManager*/)
|
||||||
{
|
{
|
||||||
m_androidPlatformIntegration = nullptr;
|
m_androidPlatformIntegration = nullptr;
|
||||||
@ -628,7 +615,7 @@ static void setDisplayMetrics(JNIEnv */*env*/, jclass /*clazz*/,
|
|||||||
m_scaledDensity = scaledDensity;
|
m_scaledDensity = scaledDensity;
|
||||||
m_density = density;
|
m_density = density;
|
||||||
|
|
||||||
QMutexLocker lock(&m_surfacesMutex);
|
QMutexLocker lock(&m_platformMutex);
|
||||||
if (!m_androidPlatformIntegration) {
|
if (!m_androidPlatformIntegration) {
|
||||||
QAndroidPlatformIntegration::setDefaultDisplayMetrics(desktopWidthPixels,
|
QAndroidPlatformIntegration::setDefaultDisplayMetrics(desktopWidthPixels,
|
||||||
desktopHeightPixels,
|
desktopHeightPixels,
|
||||||
@ -670,18 +657,22 @@ static void updateWindow(JNIEnv */*env*/, jobject /*thiz*/)
|
|||||||
|
|
||||||
static void updateApplicationState(JNIEnv */*env*/, jobject /*thiz*/, jint state)
|
static void updateApplicationState(JNIEnv */*env*/, jobject /*thiz*/, jint state)
|
||||||
{
|
{
|
||||||
if (!m_main || !QtAndroid::androidPlatformIntegration()) {
|
QMutexLocker lock(&m_platformMutex);
|
||||||
QMutexLocker locker(&m_pendingAppStateMtx);
|
if (!m_main || !m_androidPlatformIntegration) {
|
||||||
m_pendingApplicationState = Qt::ApplicationState(state);
|
m_pendingApplicationState = state;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
flushPendingApplicationState();
|
// We're about to call user code from the Android thread, since we don't know
|
||||||
|
//the side effects we'll unlock first!
|
||||||
|
lock.unlock();
|
||||||
if (state == Qt::ApplicationActive)
|
if (state == Qt::ApplicationActive)
|
||||||
QtAndroidPrivate::handleResume();
|
QtAndroidPrivate::handleResume();
|
||||||
else if (state == Qt::ApplicationInactive)
|
else if (state == Qt::ApplicationInactive)
|
||||||
QtAndroidPrivate::handlePause();
|
QtAndroidPrivate::handlePause();
|
||||||
|
lock.relock();
|
||||||
|
if (!m_androidPlatformIntegration)
|
||||||
|
return;
|
||||||
|
|
||||||
if (state <= Qt::ApplicationInactive) {
|
if (state <= Qt::ApplicationInactive) {
|
||||||
// NOTE: sometimes we will receive two consecutive suspended notifications,
|
// NOTE: sometimes we will receive two consecutive suspended notifications,
|
||||||
@ -729,6 +720,7 @@ static void handleOrientationChanged(JNIEnv */*env*/, jobject /*thiz*/, jint new
|
|||||||
Qt::ScreenOrientation native = orientations[nativeOrientation - 1];
|
Qt::ScreenOrientation native = orientations[nativeOrientation - 1];
|
||||||
|
|
||||||
QAndroidPlatformIntegration::setScreenOrientation(screenOrientation, native);
|
QAndroidPlatformIntegration::setScreenOrientation(screenOrientation, native);
|
||||||
|
QMutexLocker lock(&m_platformMutex);
|
||||||
if (m_androidPlatformIntegration) {
|
if (m_androidPlatformIntegration) {
|
||||||
QPlatformScreen *screen = m_androidPlatformIntegration->screen();
|
QPlatformScreen *screen = m_androidPlatformIntegration->screen();
|
||||||
QWindowSystemInterface::handleScreenOrientationChange(screen->screen(),
|
QWindowSystemInterface::handleScreenOrientationChange(screen->screen(),
|
||||||
|
@ -58,9 +58,11 @@ class QWidget;
|
|||||||
class QString;
|
class QString;
|
||||||
class QWindow;
|
class QWindow;
|
||||||
class AndroidSurfaceClient;
|
class AndroidSurfaceClient;
|
||||||
|
class QBasicMutex;
|
||||||
|
|
||||||
namespace QtAndroid
|
namespace QtAndroid
|
||||||
{
|
{
|
||||||
|
QBasicMutex *platformInterfaceMutex();
|
||||||
QAndroidPlatformIntegration *androidPlatformIntegration();
|
QAndroidPlatformIntegration *androidPlatformIntegration();
|
||||||
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration);
|
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration);
|
||||||
void setQtThread(QThread *thread);
|
void setQtThread(QThread *thread);
|
||||||
|
@ -143,8 +143,13 @@ void *QAndroidPlatformNativeInterface::nativeResourceForWindow(const QByteArray
|
|||||||
|
|
||||||
void QAndroidPlatformNativeInterface::customEvent(QEvent *event)
|
void QAndroidPlatformNativeInterface::customEvent(QEvent *event)
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::User)
|
if (event->type() != QEvent::User)
|
||||||
QtAndroid::setAndroidPlatformIntegration(static_cast<QAndroidPlatformIntegration *>(QGuiApplicationPrivate::platformIntegration()));
|
return;
|
||||||
|
|
||||||
|
QMutexLocker lock(QtAndroid::platformInterfaceMutex());
|
||||||
|
QAndroidPlatformIntegration *api = static_cast<QAndroidPlatformIntegration *>(QGuiApplicationPrivate::platformIntegration());
|
||||||
|
QtAndroid::setAndroidPlatformIntegration(api);
|
||||||
|
api->flushPendingUpdates();
|
||||||
}
|
}
|
||||||
|
|
||||||
QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶mList)
|
QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶mList)
|
||||||
|
@ -303,7 +303,23 @@ void QCocoaMenuBar::resetKnownMenuItemsToQt()
|
|||||||
// Undo the effect of redirectKnownMenuItemsToFirstResponder():
|
// Undo the effect of redirectKnownMenuItemsToFirstResponder():
|
||||||
// set the menu items' actions to itemFired and their targets to
|
// set the menu items' actions to itemFired and their targets to
|
||||||
// the QCocoaMenuDelegate.
|
// the QCocoaMenuDelegate.
|
||||||
updateMenuBarImmediately();
|
foreach (QCocoaMenuBar *mb, static_menubars) {
|
||||||
|
foreach (QCocoaMenu *m, mb->m_menus) {
|
||||||
|
foreach (QCocoaMenuItem *i, m->items()) {
|
||||||
|
switch (i->effectiveRole()) {
|
||||||
|
case QPlatformMenuItem::CutRole:
|
||||||
|
case QPlatformMenuItem::CopyRole:
|
||||||
|
case QPlatformMenuItem::PasteRole:
|
||||||
|
case QPlatformMenuItem::SelectAllRole:
|
||||||
|
[i->nsItem() setTarget:m->nsMenu().delegate];
|
||||||
|
[i->nsItem() setAction:@selector(itemFired:)];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QCocoaMenuBar::updateMenuBarImmediately()
|
void QCocoaMenuBar::updateMenuBarImmediately()
|
||||||
|
@ -1118,7 +1118,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
|||||||
#endif
|
#endif
|
||||||
} break;
|
} break;
|
||||||
case QtWindows::DpiChangedEvent: {
|
case QtWindows::DpiChangedEvent: {
|
||||||
if (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_DLGFRAME)
|
if (platformWindow->window()->flags().testFlag(Qt::MSWindowsFixedSizeDialogHint))
|
||||||
return false; // Fixed-size window should not be resized
|
return false; // Fixed-size window should not be resized
|
||||||
|
|
||||||
platformWindow->setFlag(QWindowsWindow::WithinDpiChanged);
|
platformWindow->setFlag(QWindowsWindow::WithinDpiChanged);
|
||||||
|
@ -5,19 +5,10 @@ INCLUDEPATH += $$PWD/../
|
|||||||
|
|
||||||
load(qt_build_paths)
|
load(qt_build_paths)
|
||||||
|
|
||||||
# build with session management support
|
|
||||||
qtConfig(xcb-sm) {
|
|
||||||
DEFINES += XCB_USE_SM
|
|
||||||
}
|
|
||||||
|
|
||||||
!qtConfig(system-xcb) {
|
!qtConfig(system-xcb) {
|
||||||
DEFINES += XCB_USE_RENDER
|
|
||||||
QMAKE_USE += xcb-static xcb
|
QMAKE_USE += xcb-static xcb
|
||||||
} else {
|
} else {
|
||||||
qtConfig(xkb): QMAKE_USE += xcb_xkb
|
qtConfig(xkb): QMAKE_USE += xcb_xkb
|
||||||
# to support custom cursors with depth > 1
|
qtConfig(xcb-render): QMAKE_USE += xcb_render
|
||||||
qtConfig(xcb-render) {
|
|
||||||
DEFINES += XCB_USE_RENDER
|
|
||||||
}
|
|
||||||
QMAKE_USE += xcb_syslibs
|
QMAKE_USE += xcb_syslibs
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include "qxcbglxintegration.h"
|
#include "qxcbglxintegration.h"
|
||||||
|
|
||||||
#if defined(XCB_HAS_XCB_GLX)
|
#if QT_CONFIG(xcb_glx)
|
||||||
#include <xcb/glx.h>
|
#include <xcb/glx.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -56,37 +56,34 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#if defined(XCB_HAS_XCB_GLX) && XCB_GLX_MAJOR_VERSION == 1 && XCB_GLX_MINOR_VERSION < 4
|
#if QT_CONFIG(xcb_glx)
|
||||||
|
#if XCB_GLX_MAJOR_VERSION == 1 && XCB_GLX_MINOR_VERSION < 4
|
||||||
#define XCB_GLX_BUFFER_SWAP_COMPLETE 1
|
#define XCB_GLX_BUFFER_SWAP_COMPLETE 1
|
||||||
|
typedef struct xcb_glx_buffer_swap_complete_event_t {
|
||||||
typedef struct xcb_glx_buffer_swap_complete_event_t {
|
uint8_t response_type;
|
||||||
uint8_t response_type;
|
uint8_t pad0;
|
||||||
uint8_t pad0;
|
uint16_t sequence;
|
||||||
uint16_t sequence;
|
uint16_t event_type;
|
||||||
uint16_t event_type;
|
uint8_t pad1[2];
|
||||||
uint8_t pad1[2];
|
xcb_glx_drawable_t drawable;
|
||||||
xcb_glx_drawable_t drawable;
|
uint32_t ust_hi;
|
||||||
uint32_t ust_hi;
|
uint32_t ust_lo;
|
||||||
uint32_t ust_lo;
|
uint32_t msc_hi;
|
||||||
uint32_t msc_hi;
|
uint32_t msc_lo;
|
||||||
uint32_t msc_lo;
|
uint32_t sbc;
|
||||||
uint32_t sbc;
|
} xcb_glx_buffer_swap_complete_event_t;
|
||||||
} xcb_glx_buffer_swap_complete_event_t;
|
#endif
|
||||||
#endif
|
typedef struct {
|
||||||
|
int type;
|
||||||
#if defined(XCB_USE_GLX)
|
unsigned long serial; /* # of last request processed by server */
|
||||||
typedef struct {
|
Bool send_event; /* true if this came from a SendEvent request */
|
||||||
int type;
|
Display *display; /* Display the event was read from */
|
||||||
unsigned long serial; /* # of last request processed by server */
|
Drawable drawable; /* drawable on which event was requested in event mask */
|
||||||
Bool send_event; /* true if this came from a SendEvent request */
|
int event_type;
|
||||||
Display *display; /* Display the event was read from */
|
int64_t ust;
|
||||||
Drawable drawable; /* drawable on which event was requested in event mask */
|
int64_t msc;
|
||||||
int event_type;
|
int64_t sbc;
|
||||||
int64_t ust;
|
} QGLXBufferSwapComplete;
|
||||||
int64_t msc;
|
|
||||||
int64_t sbc;
|
|
||||||
} QGLXBufferSwapComplete;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QXcbGlxIntegration::QXcbGlxIntegration()
|
QXcbGlxIntegration::QXcbGlxIntegration()
|
||||||
@ -103,7 +100,7 @@ QXcbGlxIntegration::~QXcbGlxIntegration()
|
|||||||
bool QXcbGlxIntegration::initialize(QXcbConnection *connection)
|
bool QXcbGlxIntegration::initialize(QXcbConnection *connection)
|
||||||
{
|
{
|
||||||
m_connection = connection;
|
m_connection = connection;
|
||||||
#ifdef XCB_HAS_XCB_GLX
|
#if QT_CONFIG(xcb_glx)
|
||||||
|
|
||||||
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection->xcb_connection(), &xcb_glx_id);
|
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection->xcb_connection(), &xcb_glx_id);
|
||||||
if (!reply || !reply->present)
|
if (!reply || !reply->present)
|
||||||
@ -140,7 +137,7 @@ bool QXcbGlxIntegration::handleXcbEvent(xcb_generic_event_t *event, uint respons
|
|||||||
XEvent dummy;
|
XEvent dummy;
|
||||||
event->sequence = LastKnownRequestProcessed(xdisplay);
|
event->sequence = LastKnownRequestProcessed(xdisplay);
|
||||||
if (proc(xdisplay, &dummy, (xEvent*)event)) {
|
if (proc(xdisplay, &dummy, (xEvent*)event)) {
|
||||||
#ifdef XCB_HAS_XCB_GLX
|
#if QT_CONFIG(xcb_glx)
|
||||||
// DRI2 clients don't receive GLXBufferSwapComplete events on the wire.
|
// DRI2 clients don't receive GLXBufferSwapComplete events on the wire.
|
||||||
// Instead the GLX event is synthesized from the DRI2BufferSwapComplete event
|
// Instead the GLX event is synthesized from the DRI2BufferSwapComplete event
|
||||||
// by DRI2WireToEvent(). For an application to be able to see the event
|
// by DRI2WireToEvent(). For an application to be able to see the event
|
||||||
|
@ -3,14 +3,9 @@ TARGET = qxcb-glx-integration
|
|||||||
include(../gl_integrations_plugin_base.pri)
|
include(../gl_integrations_plugin_base.pri)
|
||||||
QT += glx_support-private
|
QT += glx_support-private
|
||||||
|
|
||||||
#should be removed from the sources
|
|
||||||
DEFINES += XCB_USE_GLX
|
|
||||||
DEFINES += QT_NO_FOREACH
|
DEFINES += QT_NO_FOREACH
|
||||||
|
|
||||||
qtConfig(xcb-glx) {
|
qtConfig(xcb-glx): QMAKE_USE += xcb_glx
|
||||||
DEFINES += XCB_HAS_XCB_GLX
|
|
||||||
QMAKE_USE += xcb_glx
|
|
||||||
}
|
|
||||||
|
|
||||||
!static:qtConfig(dlopen): QMAKE_USE += libdl
|
!static:qtConfig(dlopen): QMAKE_USE += libdl
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
#include <X11/extensions/XI2proto.h>
|
#include <X11/extensions/XI2proto.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XCB_USE_RENDER
|
#if QT_CONFIG(xcb_render)
|
||||||
#include <xcb/render.h>
|
#include <xcb/render.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -566,7 +566,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
|
|||||||
#if QT_CONFIG(xkb)
|
#if QT_CONFIG(xkb)
|
||||||
&xcb_xkb_id,
|
&xcb_xkb_id,
|
||||||
#endif
|
#endif
|
||||||
#ifdef XCB_USE_RENDER
|
#if QT_CONFIG(xcb_render)
|
||||||
&xcb_render_id,
|
&xcb_render_id,
|
||||||
#endif
|
#endif
|
||||||
0
|
0
|
||||||
@ -1467,7 +1467,7 @@ xcb_window_t QXcbConnection::clientLeader()
|
|||||||
1,
|
1,
|
||||||
&m_clientLeader);
|
&m_clientLeader);
|
||||||
|
|
||||||
#if !defined(QT_NO_SESSIONMANAGER) && defined(XCB_USE_SM)
|
#if QT_CONFIG(xcb_sm)
|
||||||
// If we are session managed, inform the window manager about it
|
// If we are session managed, inform the window manager about it
|
||||||
QByteArray session = qGuiApp->sessionId().toLatin1();
|
QByteArray session = qGuiApp->sessionId().toLatin1();
|
||||||
if (!session.isEmpty()) {
|
if (!session.isEmpty()) {
|
||||||
@ -1988,7 +1988,7 @@ void QXcbConnection::initializeXFixes()
|
|||||||
|
|
||||||
void QXcbConnection::initializeXRender()
|
void QXcbConnection::initializeXRender()
|
||||||
{
|
{
|
||||||
#ifdef XCB_USE_RENDER
|
#if QT_CONFIG(xcb_render)
|
||||||
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection, &xcb_render_id);
|
const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection, &xcb_render_id);
|
||||||
if (!reply || !reply->present)
|
if (!reply || !reply->present)
|
||||||
return;
|
return;
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#include <QtGui/QColor>
|
#include <QtGui/QColor>
|
||||||
#include <QtGui/private/qimage_p.h>
|
#include <QtGui/private/qimage_p.h>
|
||||||
#include <QtGui/private/qdrawhelper_p.h>
|
#include <QtGui/private/qdrawhelper_p.h>
|
||||||
#ifdef XCB_USE_RENDER
|
#if QT_CONFIG(xcb_render)
|
||||||
#include <xcb/render.h>
|
#include <xcb/render.h>
|
||||||
// 'template' is used as a function argument name in xcb_renderutil.h
|
// 'template' is used as a function argument name in xcb_renderutil.h
|
||||||
#define template template_param
|
#define template template_param
|
||||||
@ -193,7 +193,7 @@ xcb_pixmap_t qt_xcb_XPixmapFromBitmap(QXcbScreen *screen, const QImage &image)
|
|||||||
xcb_cursor_t qt_xcb_createCursorXRender(QXcbScreen *screen, const QImage &image,
|
xcb_cursor_t qt_xcb_createCursorXRender(QXcbScreen *screen, const QImage &image,
|
||||||
const QPoint &spot)
|
const QPoint &spot)
|
||||||
{
|
{
|
||||||
#ifdef XCB_USE_RENDER
|
#if QT_CONFIG(xcb_render)
|
||||||
xcb_connection_t *conn = screen->xcb_connection();
|
xcb_connection_t *conn = screen->xcb_connection();
|
||||||
const int w = image.width();
|
const int w = image.width();
|
||||||
const int h = image.height();
|
const int h = image.height();
|
||||||
|
@ -495,7 +495,7 @@ QByteArray QXcbIntegration::wmClass() const
|
|||||||
return m_wmClass;
|
return m_wmClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_NO_SESSIONMANAGER) && defined(XCB_USE_SM)
|
#if QT_CONFIG(xcb_sm)
|
||||||
QPlatformSessionManager *QXcbIntegration::createPlatformSessionManager(const QString &id, const QString &key) const
|
QPlatformSessionManager *QXcbIntegration::createPlatformSessionManager(const QString &id, const QString &key) const
|
||||||
{
|
{
|
||||||
return new QXcbSessionManager(id, key);
|
return new QXcbSessionManager(id, key);
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#ifndef QXCBINTEGRATION_H
|
#ifndef QXCBINTEGRATION_H
|
||||||
#define QXCBINTEGRATION_H
|
#define QXCBINTEGRATION_H
|
||||||
|
|
||||||
|
#include <QtGui/private/qtguiglobal_p.h>
|
||||||
#include <qpa/qplatformintegration.h>
|
#include <qpa/qplatformintegration.h>
|
||||||
#include <qpa/qplatformscreen.h>
|
#include <qpa/qplatformscreen.h>
|
||||||
|
|
||||||
@ -106,7 +107,7 @@ public:
|
|||||||
|
|
||||||
QByteArray wmClass() const;
|
QByteArray wmClass() const;
|
||||||
|
|
||||||
#if !defined(QT_NO_SESSIONMANAGER) && defined(XCB_USE_SM)
|
#if QT_CONFIG(xcb_sm)
|
||||||
QPlatformSessionManager *createPlatformSessionManager(const QString &id, const QString &key) const override;
|
QPlatformSessionManager *createPlatformSessionManager(const QString &id, const QString &key) const override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -61,9 +61,7 @@ qtConfig(xcb-xlib) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# build with session management support
|
|
||||||
qtConfig(xcb-sm) {
|
qtConfig(xcb-sm) {
|
||||||
DEFINES += XCB_USE_SM
|
|
||||||
QMAKE_USE += x11sm
|
QMAKE_USE += x11sm
|
||||||
SOURCES += qxcbsessionmanager.cpp
|
SOURCES += qxcbsessionmanager.cpp
|
||||||
HEADERS += qxcbsessionmanager.h
|
HEADERS += qxcbsessionmanager.h
|
||||||
@ -83,16 +81,11 @@ qtConfig(vulkan) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
!qtConfig(system-xcb) {
|
!qtConfig(system-xcb) {
|
||||||
DEFINES += XCB_USE_RENDER
|
|
||||||
QMAKE_USE += xcb-static xcb
|
QMAKE_USE += xcb-static xcb
|
||||||
} else {
|
} else {
|
||||||
LIBS += -lxcb-xinerama ### there is no configure test for this!
|
LIBS += -lxcb-xinerama ### there is no configure test for this!
|
||||||
qtConfig(xkb): QMAKE_USE += xcb_xkb
|
qtConfig(xkb): QMAKE_USE += xcb_xkb
|
||||||
# to support custom cursors with depth > 1
|
qtConfig(xcb-render): QMAKE_USE += xcb_render
|
||||||
qtConfig(xcb-render) {
|
|
||||||
DEFINES += XCB_USE_RENDER
|
|
||||||
QMAKE_USE += xcb_render
|
|
||||||
}
|
|
||||||
QMAKE_USE += xcb_syslibs
|
QMAKE_USE += xcb_syslibs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,5 +10,5 @@ qtHaveModule(gui) {
|
|||||||
}
|
}
|
||||||
qtHaveModule(widgets): SUBDIRS += styles
|
qtHaveModule(widgets): SUBDIRS += styles
|
||||||
|
|
||||||
!winrt:!wince:qtHaveModule(printsupport): \
|
!winrt:qtHaveModule(printsupport): \
|
||||||
SUBDIRS += printsupport
|
SUBDIRS += printsupport
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 670 B |
Before Width: | Height: | Size: 607 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 492 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 9.3 KiB |