拼接屏2

This commit is contained in:
韩品龙 2024-03-16 15:07:48 +08:00 committed by openkylin-cibot
parent 731c08a5bd
commit eceea7069b
2 changed files with 86 additions and 0 deletions

85
debian/patches/0039-2.patch vendored Normal file
View File

@ -0,0 +1,85 @@
From: =?utf-8?b?6Z+p5ZOB6b6Z?= <hanpinlong@kylinos.cn>
Date: Sat, 16 Mar 2024 15:07:48 +0800
Subject: =?utf-8?b?5ou85o6l5bGPMg==?=
---
src/plugins/platforms/xcb/qxcbscreen.cpp | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 411e4e5..21e7e0e 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -536,6 +536,7 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDe
, m_crtc(output ? output->crtc : XCB_NONE)
, m_outputName(getOutputName(output))
, m_outputSizeMillimeters(output ? QSize(output->mm_width, output->mm_height) : QSize())
+ , m_cursor(std::make_unique<QXcbCursor>(connection, this))
{
// if (connection->hasXRandr()) {
if (connection->isAtLeastXRandR12()) {
@@ -564,7 +565,7 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDe
if (m_sizeMillimeters.isEmpty())
m_sizeMillimeters = virtualDesktop->physicalSize();
- m_cursor = new QXcbCursor(connection, this);
+ // m_cursor = new QXcbCursor(connection, this);
// if (connection->hasXRandr()) { // Parse EDID
if (connection->isAtLeastXRandR12()) { // Parse EDID
@@ -592,6 +593,7 @@ QXcbScreen::QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDe
: QXcbObject(connection)
, m_virtualDesktop(virtualDesktop)
, m_monitor(monitorInfo)
+ , m_cursor(std::make_unique<QXcbCursor>(connection, this))
{
setMonitor(monitorInfo, timestamp);
}
@@ -649,9 +651,9 @@ void QXcbScreen::setMonitor(xcb_randr_monitor_info_t *monitorInfo, xcb_timestamp
m_singlescreen = (monitorGeometry == (QRect(crtc->x, crtc->y, crtc->width, crtc->height)));
if (m_singlescreen) {
if (crtc->mode) {
- if (crtc->rotation == XCB_RANDR_ROTATION_ROTATE_90 ||
- crtc->rotation == XCB_RANDR_ROTATION_ROTATE_270)
- std::swap(crtc->width, crtc->height);
+ // if (crtc->rotation == XCB_RANDR_ROTATION_ROTATE_90 ||
+ // crtc->rotation == XCB_RANDR_ROTATION_ROTATE_270)
+ // std::swap(crtc->width, crtc->height);
updateGeometry(QRect(crtc->x, crtc->y, crtc->width, crtc->height), crtc->rotation);
if (mode() != crtc->mode)
updateRefreshRate(crtc->mode);
@@ -675,10 +677,13 @@ void QXcbScreen::setMonitor(xcb_randr_monitor_info_t *monitorInfo, xcb_timestamp
QByteArray ba = connection()->atomName(monitorInfo->name);
m_outputName = getName(monitorInfo);
- if (monitorInfo->primary)
+ // if (monitorInfo->primary)
+ if (connection()->primaryScreenNumber() == virtualDesktop()->number() && monitorInfo->primary)
m_primary = true;
- m_cursor = new QXcbCursor(connection(), this);
+ // m_cursor = new QXcbCursor(connection(), this);
+ else
+ m_primary = false;
}
@@ -686,7 +691,7 @@ void QXcbScreen::setMonitor(xcb_randr_monitor_info_t *monitorInfo, xcb_timestamp
QXcbScreen::~QXcbScreen()
{
- delete m_cursor;
+ // delete m_cursor;
}
QString QXcbScreen::getName(xcb_randr_monitor_info_t *monitorInfo)
@@ -861,7 +866,8 @@ QDpi QXcbScreen::logicalDpi() const
QPlatformCursor *QXcbScreen::cursor() const
{
- return m_cursor;
+ // return m_cursor;
+ return m_cursor.get();
}
void QXcbScreen::setOutput(xcb_randr_output_t outputId,

View File

@ -36,3 +36,4 @@ revert_startBlocking_removal.diff
0036-21-bugfix-I6YMV4.patch 0036-21-bugfix-I6YMV4.patch
0037-hover.patch 0037-hover.patch
0038-patch.patch 0038-patch.patch
0039-2.patch