Merge branch 'Plasma/5.10'
This commit is contained in:
commit
a6d0bc276d
4 changed files with 50 additions and 21 deletions
|
@ -1496,7 +1496,7 @@ bool AbstractClient::processDecorationButtonPress(QMouseEvent *event, bool ignor
|
|||
const qint64 interval = m_decoration.doubleClickTimer.elapsed();
|
||||
m_decoration.doubleClickTimer.invalidate();
|
||||
if (interval > QGuiApplication::styleHints()->mouseDoubleClickInterval()) {
|
||||
m_decoration.doubleClickTimer.invalidate(); // expired -> new first click and pot. init
|
||||
m_decoration.doubleClickTimer.start(); // expired -> new first click and pot. init
|
||||
} else {
|
||||
Workspace::self()->performWindowOperation(this, options->operationTitlebarDblClick());
|
||||
dontMoveResize();
|
||||
|
|
|
@ -130,9 +130,6 @@ void WindowBasedEdge::doUpdateBlocking()
|
|||
if (!isReserved()) {
|
||||
return;
|
||||
}
|
||||
if (!activatesForPointer()) {
|
||||
return;
|
||||
}
|
||||
if (isBlocked()) {
|
||||
m_window.unmap();
|
||||
m_approachWindow.unmap();
|
||||
|
|
|
@ -64,6 +64,10 @@ typedef struct xcb_glx_buffer_swap_complete_event_t {
|
|||
} xcb_glx_buffer_swap_complete_event_t;
|
||||
#endif
|
||||
|
||||
#ifndef GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV
|
||||
#define GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x20F7
|
||||
#endif
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#if __cplusplus <= 201103L
|
||||
|
@ -293,6 +297,15 @@ bool GlxBackend::initRenderingContext()
|
|||
|
||||
// Use glXCreateContextAttribsARB() when it's available
|
||||
if (hasExtension(QByteArrayLiteral("GLX_ARB_create_context"))) {
|
||||
const int attribs_31_core_nv_robustness[] = {
|
||||
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
|
||||
GLX_CONTEXT_MINOR_VERSION_ARB, 1,
|
||||
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB,
|
||||
GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB, GLX_LOSE_CONTEXT_ON_RESET_ARB,
|
||||
GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV, GL_TRUE,
|
||||
0
|
||||
};
|
||||
|
||||
const int attribs_31_core_robustness[] = {
|
||||
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
|
||||
GLX_CONTEXT_MINOR_VERSION_ARB, 1,
|
||||
|
@ -307,6 +320,13 @@ bool GlxBackend::initRenderingContext()
|
|||
0
|
||||
};
|
||||
|
||||
const int attribs_legacy_nv_robustness[] = {
|
||||
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB,
|
||||
GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB, GLX_LOSE_CONTEXT_ON_RESET_ARB,
|
||||
GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV, GL_TRUE,
|
||||
0
|
||||
};
|
||||
|
||||
const int attribs_legacy_robustness[] = {
|
||||
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB,
|
||||
GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB, GLX_LOSE_CONTEXT_ON_RESET_ARB,
|
||||
|
@ -320,18 +340,31 @@ bool GlxBackend::initRenderingContext()
|
|||
};
|
||||
|
||||
const bool have_robustness = hasExtension(QByteArrayLiteral("GLX_ARB_create_context_robustness"));
|
||||
const bool haveVideoMemoryPurge = hasExtension(QByteArrayLiteral("GLX_NV_robustness_video_memory_purge"));
|
||||
|
||||
// Try to create a 3.1 context first
|
||||
if (options->glCoreProfile()) {
|
||||
if (have_robustness)
|
||||
ctx = glXCreateContextAttribsARB(display(), fbconfig, 0, direct, attribs_31_core_robustness);
|
||||
if (have_robustness) {
|
||||
if (haveVideoMemoryPurge) {
|
||||
ctx = glXCreateContextAttribsARB(display(), fbconfig, 0, direct, attribs_31_core_nv_robustness);
|
||||
}
|
||||
if (!ctx) {
|
||||
ctx = glXCreateContextAttribsARB(display(), fbconfig, 0, direct, attribs_31_core_robustness);
|
||||
}
|
||||
}
|
||||
|
||||
if (!ctx)
|
||||
ctx = glXCreateContextAttribsARB(display(), fbconfig, 0, direct, attribs_31_core);
|
||||
}
|
||||
|
||||
if (!ctx && have_robustness)
|
||||
ctx = glXCreateContextAttribsARB(display(), fbconfig, 0, direct, attribs_legacy_robustness);
|
||||
if (!ctx && have_robustness) {
|
||||
if (haveVideoMemoryPurge) {
|
||||
ctx = glXCreateContextAttribsARB(display(), fbconfig, 0, direct, attribs_legacy_nv_robustness);
|
||||
}
|
||||
if (!ctx) {
|
||||
ctx = glXCreateContextAttribsARB(display(), fbconfig, 0, direct, attribs_legacy_robustness);
|
||||
}
|
||||
}
|
||||
|
||||
if (!ctx)
|
||||
ctx = glXCreateContextAttribsARB(display(), fbconfig, 0, direct, attribs_legacy);
|
||||
|
|
|
@ -2301,12 +2301,12 @@ void SceneOpenGLShadow::buildQuads()
|
|||
const QRectF outerRect(QPointF(-leftOffset(), -topOffset()),
|
||||
QPointF(topLevel()->width() + rightOffset(), topLevel()->height() + bottomOffset()));
|
||||
|
||||
const int width = qMax(topLeft.width(), bottomLeft.width()) +
|
||||
qMax(top.width(), bottom.width()) +
|
||||
qMax(topRight.width(), bottomRight.width());
|
||||
const int height = qMax(topLeft.height(), topRight.height()) +
|
||||
qMax(left.height(), right.height()) +
|
||||
qMax(bottomLeft.height(), bottomRight.height());
|
||||
const int width = std::max({topLeft.width(), left.width(), bottomLeft.width()}) +
|
||||
std::max(top.width(), bottom.width()) +
|
||||
std::max({topRight.width(), right.width(), bottomRight.width()});
|
||||
const int height = std::max({topLeft.height(), top.height(), topRight.height()}) +
|
||||
std::max(left.height(), right.height()) +
|
||||
std::max({bottomLeft.height(), bottom.height(), bottomRight.height()});
|
||||
|
||||
qreal tx1(0.0), tx2(0.0), ty1(0.0), ty2(0.0);
|
||||
|
||||
|
@ -2408,13 +2408,12 @@ bool SceneOpenGLShadow::prepareBackend()
|
|||
const QSize topLeft(shadowPixmap(ShadowElementTopLeft).size());
|
||||
const QSize bottomRight(shadowPixmap(ShadowElementBottomRight).size());
|
||||
|
||||
const int width = qMax(topLeft.width(), bottomLeft.width()) +
|
||||
qMax(top.width(), bottom.width()) +
|
||||
qMax(topRight.width(), bottomRight.width());
|
||||
|
||||
const int height = qMax(topRight.height(), topLeft.height()) +
|
||||
qMax(left.height(), right.height()) +
|
||||
qMax(bottomLeft.height(), bottomRight.height());
|
||||
const int width = std::max({topLeft.width(), left.width(), bottomLeft.width()}) +
|
||||
std::max(top.width(), bottom.width()) +
|
||||
std::max({topRight.width(), right.width(), bottomRight.width()});
|
||||
const int height = std::max({topLeft.height(), top.height(), topRight.height()}) +
|
||||
std::max(left.height(), right.height()) +
|
||||
std::max({bottomLeft.height(), bottom.height(), bottomRight.height()});
|
||||
|
||||
if (width == 0 || height == 0) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue