[-]
[+]
|
Changed |
_service:tar_git:libkscreen.spec
|
|
[-]
[+]
|
Added |
_service:tar_git:libkscreen-5.0.91.tar.xz/upstream/.reviewboardrc
^
|
@@ -0,0 +1,3 @@
+REVIEWBOARD_URL = "https://git.reviewboard.kde.org"
+REPOSITORY = 'git://anongit.kde.org/libkscreen'
+TARGET_GROUPS = 'solid'
|
[-]
[+]
|
Changed |
_service:tar_git:libkscreen-5.0.91.tar.xz/upstream/autotests/testscreenconfig.cpp
^
|
@@ -120,8 +120,8 @@
QCOMPARE(output->name(), QString("HDMI1"));
QCOMPARE(output->type(), Output::HDMI);
QCOMPARE(output->modes().count(), 4);
- QCOMPARE(output->pos(), QPoint(0, 0));
- QCOMPARE(output->geometry(), QRect(0,0, 1920, 1080));
+ QCOMPARE(output->pos(), QPoint(1280, 0));
+ QCOMPARE(output->geometry(), QRect(1280, 0, 1920, 1080));
QCOMPARE(output->currentModeId(), QLatin1String("4"));
QCOMPARE(output->preferredModeId(), QLatin1String("4"));
QCOMPARE(output->rotation(), Output::None);
|
[-]
[+]
|
Changed |
_service:tar_git:libkscreen-5.0.91.tar.xz/upstream/backends/fake/parser.cpp
^
|
@@ -165,6 +165,11 @@
}
map.remove(QLatin1Literal("type"));
+ if (map.contains("pos")) {
+ output->setPos(Parser::pointFromJson(map["pos"].toMap()));
+ map.remove(QLatin1Literal("pos"));
+ }
+
//Remove some extra properties that we do not want or need special treatment
map.remove(QLatin1Literal("edid"));
|
[-]
[+]
|
Changed |
_service:tar_git:libkscreen-5.0.91.tar.xz/upstream/backends/xrandr/xrandr.cpp
^
|
@@ -34,6 +34,8 @@
#include <QX11Info>
#include <QGuiApplication>
+#include <xcb/randr.h>
+
Display* XRandR::s_display = 0;
int XRandR::s_screen = 0;
Window XRandR::s_rootWindow = 0;
@@ -55,25 +57,35 @@
{
QLoggingCategory::setFilterRules(QLatin1Literal("kscreen.xrandr.debug = true"));
- if (s_display == 0) {
- s_display = QX11Info::display();
- s_screen = DefaultScreen(s_display);
- s_rootWindow = XRootWindow(s_display, s_screen);
+ // Use our own connection to make sure that we won't mess up Qt's connection
+ // if something goes wrong on our side.
+ xcb_generic_error_t *error = 0;
+ xcb_randr_query_version_reply_t* version;
+ xcb_connection_t *connection = xcb_connect(0, 0);
+ version = xcb_randr_query_version_reply(connection, xcb_randr_query_version(connection, XCB_RANDR_MAJOR_VERSION, XCB_RANDR_MINOR_VERSION), &error);
+ xcb_disconnect(connection);
- XRRQueryExtension(s_display, &s_randrBase, &s_randrError);
+ if (!version || error) {
+ free(error);
+ return;
}
- int majorVersion = 0, minorVersion = 0;
- XRRQueryVersion(s_display, &majorVersion, &minorVersion);
-
- if ((majorVersion > 1) || ((majorVersion == 1) && (minorVersion >= 2))) {
+ if ((version->major_version > 1) || ((version->major_version == 1) && (version->minor_version >= 2))) {
m_isValid = true;
} else {
qCWarning(KSCREEN_XRANDR) << "XRandR extension not available or unsupported version";
return;
}
- XRandR::s_has_1_3 = (majorVersion > 1 || (majorVersion == 1 && minorVersion >= 3));
+ if (s_display == 0) {
+ s_display = QX11Info::display();
+ s_screen = DefaultScreen(s_display);
+ s_rootWindow = XRootWindow(s_display, s_screen);
+
+ XRRQueryExtension(s_display, &s_randrBase, &s_randrError);
+ }
+
+ XRandR::s_has_1_3 = (version->major_version > 1 || (version->major_version == 1 && version->minor_version >= 3));
if (s_internalConfig == 0) {
s_internalConfig = new XRandRConfig();
|
[-]
[+]
|
Changed |
_service:tar_git:libkscreen-5.0.91.tar.xz/upstream/backends/xrandr1.1/wrapper.h
^
|
@@ -23,14 +23,22 @@
#include <xcb/randr.h>
#include <QX11Info>
-Display* display()
+static xcb_connection_t *XRandR11XCBConnection = 0;
+
+xcb_connection_t *connection()
{
- return QX11Info::display();
+ // Use our own connection to make sure that we won't mess up Qt's connection
+ // if something goes wrong on our side.
+ if (XRandR11XCBConnection == 0) {
+ XRandR11XCBConnection = xcb_connect(0, 0);
+ }
+ return XRandR11XCBConnection;
}
-xcb_connection_t *connection()
+void closeConnection()
{
- return QX11Info::connection();
+ xcb_disconnect(XRandR11XCBConnection);
+ XRandR11XCBConnection = 0;
}
xcb_screen_t *screen_of_display (xcb_connection_t *c, int screen)
|
[-]
[+]
|
Changed |
_service:tar_git:libkscreen-5.0.91.tar.xz/upstream/backends/xrandr1.1/xrandr11.cpp
^
|
@@ -51,7 +51,7 @@
qCDebug(KSCREEN_XRANDR11) << "Can't get XRandR version";
return;
}
- if (version->minor_version > 1) {
+ if (version->major_version != 1 || version->minor_version != 1) {
qCDebug(KSCREEN_XRANDR11) << "This backend is only for XRandR 1.1, your version is: " << version->major_version << "." << version->minor_version;
return;
}
@@ -65,6 +65,7 @@
XRandR11::~XRandR11()
{
+ closeConnection();
delete m_currentConfig;
delete m_x11Helper;
}
|
[-]
[+]
|
Changed |
_service:tar_git:libkscreen-5.0.91.tar.xz/upstream/src/config.h
^
|
@@ -124,7 +124,7 @@
void setValid(bool valid);
Q_SIGNALS:
- void outputAdded(Output *output);
+ void outputAdded(KScreen::Output *output);
void outputRemoved(int outputId);
void primaryOutputChanged(KScreen::Output *output);
private:
|