mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 00:35:27 +08:00
Qt 6.6.3 support (brought changes from 6.6.3)
This commit is contained in:
@ -639,6 +639,8 @@ QString QWindowsContext::classNamePrefix()
|
||||
# define xstr(s) str(s)
|
||||
# define str(s) #s
|
||||
str << xstr(QT_NAMESPACE);
|
||||
# undef str
|
||||
# undef xstr
|
||||
#endif
|
||||
}
|
||||
return result;
|
||||
|
@ -429,11 +429,7 @@ static inline bool windowIsAccelerated(const QWindow *w)
|
||||
{
|
||||
switch (w->surfaceType()) {
|
||||
case QSurface::OpenGLSurface:
|
||||
return true;
|
||||
case QSurface::RasterGLSurface:
|
||||
return qt_window_private(const_cast<QWindow *>(w))->compositing;
|
||||
case QSurface::VulkanSurface:
|
||||
return true;
|
||||
case QSurface::Direct3DSurface:
|
||||
return true;
|
||||
default:
|
||||
@ -2819,15 +2815,16 @@ void QWindowsWindow::calculateFullFrameMargins()
|
||||
const auto systemMargins = testFlag(DisableNonClientScaling)
|
||||
? QWindowsGeometryHint::frameOnPrimaryScreen(window(), m_data.hwnd)
|
||||
: frameMargins_sys();
|
||||
const QMargins actualMargins = systemMargins + customMargins();
|
||||
|
||||
const int yDiff = (windowRect.bottom - windowRect.top) - (clientRect.bottom - clientRect.top);
|
||||
const bool typicalFrame = (systemMargins.left() == systemMargins.right())
|
||||
&& (systemMargins.right() == systemMargins.bottom());
|
||||
const bool typicalFrame = (actualMargins.left() == actualMargins.right())
|
||||
&& (actualMargins.right() == actualMargins.bottom());
|
||||
|
||||
const QMargins adjustedMargins = typicalFrame ?
|
||||
QMargins(systemMargins.left(), (yDiff - systemMargins.bottom()),
|
||||
systemMargins.right(), systemMargins.bottom())
|
||||
: systemMargins + customMargins();
|
||||
QMargins(actualMargins.left(), (yDiff - actualMargins.bottom()),
|
||||
actualMargins.right(), actualMargins.bottom())
|
||||
: actualMargins;
|
||||
|
||||
setFullFrameMargins(adjustedMargins);
|
||||
}
|
||||
@ -3449,24 +3446,6 @@ void QWindowsWindow::registerTouchWindow()
|
||||
qErrnoWarning("RegisterTouchWindow() failed for window '%s'.", qPrintable(window()->objectName()));
|
||||
}
|
||||
|
||||
void QWindowsWindow::aboutToMakeCurrent()
|
||||
{
|
||||
#ifndef QT_NO_OPENGL
|
||||
// For RasterGLSurface windows, that become OpenGL windows dynamically, it might be
|
||||
// time to set up some GL specifics. This is particularly important for layered
|
||||
// windows (WS_EX_LAYERED due to alpha > 0).
|
||||
const bool isCompositing = qt_window_private(window())->compositing;
|
||||
if (isCompositing != testFlag(Compositing)) {
|
||||
if (isCompositing)
|
||||
setFlag(Compositing);
|
||||
else
|
||||
clearFlag(Compositing);
|
||||
|
||||
updateGLWindowSettings(window(), m_data.hwnd, m_data.flags, m_opacity);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void QWindowsWindow::setHasBorderInFullScreenStatic(QWindow *window, bool border)
|
||||
{
|
||||
if (QPlatformWindow *handle = window->handle())
|
||||
|
Reference in New Issue
Block a user