Hello community, here is the log from the commit of package kwindowsystem for openSUSE:Factory checked in at 2014-12-21 11:59:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kwindowsystem (Old) and /work/SRC/openSUSE:Factory/.kwindowsystem.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kwindowsystem" Changes: -------- --- /work/SRC/openSUSE:Factory/kwindowsystem/kwindowsystem.changes 2014-11-11 01:10:14.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kwindowsystem.new/kwindowsystem.changes 2014-12-21 11:58:50.000000000 +0100 @@ -1,0 +2,11 @@ +Sat Dec 6 12:53:50 UTC 2014 - [email protected] + +- Update to 5.5.0 + * Add KStartupInfo::createNewStartupIdForTimestamp + * Add support for more multimedia keys + * Add support for initial mapping state of WM_HINTS + * Drop incorrect warnings when using KXMessages without QX11Info + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.5.0.php + +------------------------------------------------------------------- Old: ---- kwindowsystem-5.4.0.tar.xz New: ---- kwindowsystem-5.5.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kwindowsystem.spec ++++++ --- /var/tmp/diff_new_pack.4Ot7y0/_old 2014-12-21 11:58:54.000000000 +0100 +++ /var/tmp/diff_new_pack.4Ot7y0/_new 2014-12-21 11:58:54.000000000 +0100 @@ -18,10 +18,10 @@ %define lname libKF5WindowSystem5 Name: kwindowsystem -Version: 5.4.0 +Version: 5.5.0 Release: 0 BuildRequires: cmake >= 2.8.12 -BuildRequires: extra-cmake-modules >= 1.4.0 +BuildRequires: extra-cmake-modules >= 1.5.0 BuildRequires: fdupes BuildRequires: kf5-filesystem BuildRequires: libqt5-linguist-devel >= 5.2.0 @@ -37,7 +37,7 @@ License: LGPL-2.1+ Group: System/GUI/KDE Url: http://www.kde.org -Source: http://download.kde.org/stable/frameworks/5.4/%{name}-%{version}.tar.xz +Source: http://download.kde.org/stable/frameworks/5.5/%{name}-%{version}.tar.xz Source1: baselibs.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ kwindowsystem-5.4.0.tar.xz -> kwindowsystem-5.5.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/CMakeLists.txt new/kwindowsystem-5.5.0/CMakeLists.txt --- old/kwindowsystem-5.4.0/CMakeLists.txt 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/CMakeLists.txt 2014-12-06 13:47:31.000000000 +0100 @@ -3,7 +3,7 @@ project(KWindowSystem) # ECM setup -find_package(ECM 1.4.0 REQUIRED NO_MODULE) +find_package(ECM 1.5.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(FeatureSummary) @@ -15,7 +15,7 @@ include(ECMPoQmTools) -set(KF5_VERSION "5.4.0") # handled by release scripts +set(KF5_VERSION "5.5.0") # handled by release scripts ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KWINDOWSYSTEM VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kwindowsystem_version.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/autotests/kstartupinfo_unittest.cpp new/kwindowsystem-5.5.0/autotests/kstartupinfo_unittest.cpp --- old/kwindowsystem-5.4.0/autotests/kstartupinfo_unittest.cpp 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/autotests/kstartupinfo_unittest.cpp 2014-12-06 13:47:31.000000000 +0100 @@ -62,6 +62,8 @@ void checkCleanOnCantDetectTest(); void checkStartupTest_data(); void checkStartupTest(); + void createNewStartupIdTest(); + void createNewStartupIdForTimestampTest(); private: KStartupInfo m_listener; @@ -267,6 +269,25 @@ QCOMPARE(info.checkStartup(window), KStartupInfo::Match); } +void KStartupInfo_UnitTest::createNewStartupIdTest() +{ + const QByteArray &id = KStartupInfo::createNewStartupId(); + QVERIFY(!id.isEmpty()); + const int index = id.indexOf(QByteArrayLiteral("TIME")); + QVERIFY(index != -1); + const QByteArray time = id.mid(index + 4); + QVERIFY(time.toULongLong() != 0u); +} + +void KStartupInfo_UnitTest::createNewStartupIdForTimestampTest() +{ + const QByteArray &id = KStartupInfo::createNewStartupIdForTimestamp(5); + QVERIFY(!id.isEmpty()); + const int index = id.indexOf(QByteArrayLiteral("TIME")); + QVERIFY(index != -1); + QCOMPARE(id.mid(index + 4).toULongLong(), 5u); +} + QTEST_MAIN(KStartupInfo_UnitTest) #include "kstartupinfo_unittest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/autotests/netwininfotestclient.cpp new/kwindowsystem-5.5.0/autotests/netwininfotestclient.cpp --- old/kwindowsystem-5.4.0/autotests/netwininfotestclient.cpp 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/autotests/netwininfotestclient.cpp 2014-12-06 13:47:31.000000000 +0100 @@ -83,6 +83,8 @@ void testUrgency(); void testInput_data(); void testInput(); + void testInitialMappingState_data(); + void testInitialMappingState(); void testTransientFor(); void testProtocols_data(); void testProtocols(); @@ -339,6 +341,13 @@ // and wait for our event waitForPropertyChange(&info, atom, property); QVERIFY(!(info.*getter)()); + + // set it again, to ensure that we don't leak on tear-down + (info.*setter)("bar"); + QCOMPARE((info.*getter)(), "bar"); + xcb_flush(connection()); + waitForPropertyChange(&info, atom, property); + QCOMPARE((info.*getter)(), "bar"); } void NetWinInfoTestClient::testIconName() @@ -756,6 +765,51 @@ QTEST(info.input(), "expected"); } +Q_DECLARE_METATYPE(NET::MappingState) + +void NetWinInfoTestClient::testInitialMappingState_data() +{ + QTest::addColumn<quint32>("flags"); + QTest::addColumn<quint32>("state"); + QTest::addColumn<NET::MappingState>("expected"); + + QTest::newRow("flag-iconic") << quint32(2) << quint32(3) << NET::Iconic; + QTest::newRow("flag-normal") << quint32(2) << quint32(1) << NET::Visible; + QTest::newRow("flag-invalid") << quint32(2) << quint32(8) << NET::Withdrawn; + QTest::newRow("noflag-iconic") << quint32(256) << quint32(3) << NET::Withdrawn; + QTest::newRow("noflag-normal") << quint32(256) << quint32(1) << NET::Withdrawn; +} + +void NetWinInfoTestClient::testInitialMappingState() +{ + QVERIFY(connection()); + INFO + + QCOMPARE(info.initialMappingState(), NET::Withdrawn); + QFETCH(quint32, flags); + QFETCH(quint32, state); + + // group leader needs to be changed through wm hints + uint32_t values[] = { + flags, + 1, /* Input */ + state, /* Normal State */ + XCB_NONE, /* icon pixmap */ + XCB_NONE, /* icon window */ + XCB_NONE, /* icon x */ + XCB_NONE, /* icon y */ + XCB_NONE, /* icon mask */ + XCB_NONE /* group leader */ + }; + xcb_change_property(connection(), XCB_PROP_MODE_REPLACE, m_testWindow, + XCB_ATOM_WM_HINTS, XCB_ATOM_WM_HINTS, 32, 9, values); + xcb_flush(connection()); + + // only updated after event + waitForPropertyChange(&info, XCB_ATOM_WM_HINTS, NET::Property(0), NET::WM2InitialMappingState); + QTEST(info.initialMappingState(), "expected"); +} + void NetWinInfoTestClient::testTransientFor() { QVERIFY(connection()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/autotests/netwininfotestwm.cpp new/kwindowsystem-5.5.0/autotests/netwininfotestwm.cpp --- old/kwindowsystem-5.4.0/autotests/netwininfotestwm.cpp 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/autotests/netwininfotestwm.cpp 2014-12-06 13:47:31.000000000 +0100 @@ -501,6 +501,12 @@ // and wait for our event waitForPropertyChange(&info, atom, NET::WMVisibleIconName); QVERIFY(!info.visibleIconName()); + + // set again, to ensure we don't leak on tear down + info.setVisibleIconName("bar"); + xcb_flush(connection()); + waitForPropertyChange(&info, atom, NET::WMVisibleIconName); + QCOMPARE(info.visibleIconName(), "bar"); } void NetWinInfoTestWM::testVisibleName() @@ -532,6 +538,12 @@ // and wait for our event waitForPropertyChange(&info, atom, NET::WMVisibleName); QVERIFY(!info.visibleName()); + + // set again, to ensure we don't leak on tear down + info.setVisibleName("bar"); + xcb_flush(connection()); + waitForPropertyChange(&info, atom, NET::WMVisibleName); + QCOMPARE(info.visibleName(), "bar"); } QTEST_GUILESS_MAIN(NetWinInfoTestWM) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/po/fi/kwindowsystem5_qt.po new/kwindowsystem-5.5.0/po/fi/kwindowsystem5_qt.po --- old/kwindowsystem-5.4.0/po/fi/kwindowsystem5_qt.po 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/po/fi/kwindowsystem5_qt.po 2014-12-06 13:47:31.000000000 +0100 @@ -29,7 +29,7 @@ "POT-Creation-Date: 2014-03-23 01:50+0000\n" "PO-Revision-Date: 2014-03-30 00:13+0200\n" "Last-Translator: Lasse Liehu <[email protected]>\n" -"Language-Team: Finnish <[email protected]>\n" +"Language-Team: Finnish <[email protected]>\n" "Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/po/it/kwindowsystem5_qt.po new/kwindowsystem-5.5.0/po/it/kwindowsystem5_qt.po --- old/kwindowsystem-5.4.0/po/it/kwindowsystem5_qt.po 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/po/it/kwindowsystem5_qt.po 2014-12-06 13:47:31.000000000 +0100 @@ -23,8 +23,8 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 1.5\n" "X-Qt-Contexts: true\n" #: kwindowsystem_mac.cpp:580 kwindowsystem_win.cpp:632 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/po/lt/kwindowsystem5_qt.po new/kwindowsystem-5.5.0/po/lt/kwindowsystem5_qt.po --- old/kwindowsystem-5.4.0/po/lt/kwindowsystem5_qt.po 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/po/lt/kwindowsystem5_qt.po 2014-12-06 13:47:31.000000000 +0100 @@ -12,7 +12,7 @@ "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-03-23 01:50+0000\n" -"PO-Revision-Date: 2014-03-16 20:46+0200\n" +"PO-Revision-Date: 2014-11-11 00:33+0200\n" "Last-Translator: Liudas Ališauskas <[email protected]>\n" "Language-Team: Lithuanian <[email protected]>\n" "Language: lt\n" @@ -26,8 +26,7 @@ #: kwindowsystem_mac.cpp:580 kwindowsystem_win.cpp:632 #: kwindowsystem_x11.cpp:959 -#, fuzzy, qt-format -#| msgid "Desktop %1" +#, qt-format msgctxt "KWindowSystem|" msgid "Desktop %1" msgstr "Darbastalis %1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/po/tr/kwindowsystem5_qt.po new/kwindowsystem-5.5.0/po/tr/kwindowsystem5_qt.po --- old/kwindowsystem-5.4.0/po/tr/kwindowsystem5_qt.po 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/po/tr/kwindowsystem5_qt.po 2014-12-06 13:47:31.000000000 +0100 @@ -16,20 +16,21 @@ # Ozan Çağlayan <[email protected]>, 2010, 2011. # Serdar SOYTETİR <[email protected]>, 2010, 2012. # Volkan Gezer <[email protected]>, 2013, 2014. +# Kaan Ozdincer <[email protected]>, 2014. msgid "" msgstr "" "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-03-23 01:50+0000\n" -"PO-Revision-Date: 2014-04-03 20:21+0200\n" -"Last-Translator: Volkan Gezer <[email protected]>\n" +"PO-Revision-Date: 2014-11-12 00:33+0200\n" +"Last-Translator: Kaan Ozdincer <[email protected]>\n" "Language-Team: Turkish <[email protected]>\n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 1.4\n" "X-Qt-Contexts: true\n" #: kwindowsystem_mac.cpp:580 kwindowsystem_win.cpp:632 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/src/kkeyserver_x11.cpp new/kwindowsystem-5.5.0/src/kkeyserver_x11.cpp --- old/kwindowsystem-5.4.0/src/kkeyserver_x11.cpp 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/src/kkeyserver_x11.cpp 2014-12-06 13:47:31.000000000 +0100 @@ -300,10 +300,14 @@ #define XF86XK_TopMenu 0x1008FFA2 #define XF86XK_Suspend 0x1008FFA7 #define XF86XK_Hibernate 0x1008FFA8 +#define XF86XK_TouchpadToggle 0x1008FFA9 +#define XF86XK_TouchpadOn 0x1008FFB0 +#define XF86XK_TouchpadOff 0x1008FFB1 +#define XF86XK_AudioMicMute 0x1008FFB2 // end of XF86keysyms.h , - // All of the stuff below really has to match qkeymapper_x11.cpp in Qt! + // All of the stuff below really has to match qxcbkeyboard.cpp in Qt! { Qt::Key_Back, XF86XK_Back }, { Qt::Key_Forward, XF86XK_Forward }, { Qt::Key_Stop, XF86XK_Stop }, @@ -421,6 +425,10 @@ { Qt::Key_Bluetooth, XF86XK_Bluetooth }, { Qt::Key_Suspend, XF86XK_Suspend }, { Qt::Key_Hibernate, XF86XK_Hibernate }, + { Qt::Key_TouchpadToggle, XF86XK_TouchpadToggle }, + { Qt::Key_TouchpadOn, XF86XK_TouchpadOn }, + { Qt::Key_TouchpadOff, XF86XK_TouchpadOff }, + { Qt::Key_MicMute, XF86XK_AudioMicMute }, { Qt::Key_Launch2, XF86XK_Launch0 }, { Qt::Key_Launch3, XF86XK_Launch1 }, { Qt::Key_Launch4, XF86XK_Launch2 }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/src/kstartupinfo.cpp new/kwindowsystem-5.5.0/src/kstartupinfo.cpp --- old/kwindowsystem-5.4.0/src/kstartupinfo.cpp 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/src/kstartupinfo.cpp 2014-12-06 13:47:31.000000000 +0100 @@ -988,6 +988,17 @@ QByteArray KStartupInfo::createNewStartupId() { + quint32 timestamp = 0; +#if KWINDOWSYSTEM_HAVE_X11 + if (QX11Info::isPlatformX11()) { + timestamp = QX11Info::getTimestamp(); + } +#endif + return KStartupInfo::createNewStartupIdForTimestamp(timestamp); +} + +QByteArray KStartupInfo::createNewStartupIdForTimestamp(quint32 timestamp) +{ // Assign a unique id, use hostname+time+pid, that should be 200% unique. // Also append the user timestamp (for focus stealing prevention). struct timeval tm; @@ -1005,13 +1016,8 @@ if (!gethostname(hostname, 255)) { hostname[sizeof(hostname) - 1] = '\0'; } -#if KWINDOWSYSTEM_HAVE_X11 - unsigned long qt_x_user_time = QX11Info::appUserTime(); -#else - unsigned long qt_x_user_time = 0; -#endif QByteArray id = QString::fromLatin1("%1;%2;%3;%4_TIME%5").arg(hostname).arg(tm.tv_sec) - .arg(tm.tv_usec).arg(getpid()).arg(qt_x_user_time).toUtf8(); + .arg(tm.tv_usec).arg(getpid()).arg(timestamp).toUtf8(); //qDebug() << "creating: " << id << ":" << (qApp ? qAppName() : QString("unnamed app") /* e.g. kdeinit */); return id; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/src/kstartupinfo.h new/kwindowsystem-5.5.0/src/kstartupinfo.h --- old/kwindowsystem-5.4.0/src/kstartupinfo.h 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/src/kstartupinfo.h 2014-12-06 13:47:31.000000000 +0100 @@ -122,9 +122,24 @@ /** * Creates and returns new startup id. The id includes properly setup * user timestamp. + * + * On the X11 platform the current timestamp will be fetched from the + * X-Server. If the caller has an adaquat timestamp (e.g. from a QMouseEvent) + * it should prefer using createNewStartupIdForTimestamp to not trigger a + * roundtrip to the X-Server + * + * @see createNewStartupIdForTimestamp */ static QByteArray createNewStartupId(); /** + * Creates and returns new startup id with @p timestamp as user timestamp part. + * + * @param timestamp The timestamp for the startup id. + * @see createNewStartupId + * @since 5.5 + **/ + static QByteArray createNewStartupIdForTimestamp(quint32 timestamp); + /** * */ enum { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/src/kxmessages.cpp new/kwindowsystem-5.5.0/src/kxmessages.cpp --- old/kwindowsystem-5.4.0/src/kxmessages.cpp 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/src/kxmessages.cpp 2014-12-06 13:47:31.000000000 +0100 @@ -216,10 +216,6 @@ if (disp == NULL) { return false; } - if (!QX11Info::isPlatformX11()) { - qWarning() << "KXMessages used on non-X11 platform! This is an application bug."; - return false; - } Atom a2 = XInternAtom(disp, msg_type_P, false); Atom a1 = XInternAtom(disp, QByteArray(QByteArray(msg_type_P) + "_BEGIN").constData(), false); Window root = screen_P == -1 ? DefaultRootWindow(disp) : RootWindow(disp, screen_P); @@ -250,13 +246,9 @@ if (!c) { return false; } - if (!QX11Info::isPlatformX11()) { - qWarning() << "KXMessages used on non-X11 platform! This is an application bug."; - return false; - } const QByteArray msg(msg_type_P); - XcbAtom a2(QX11Info::connection(), msg); - XcbAtom a1(QX11Info::connection(), msg + QByteArrayLiteral("_BEGIN")); + XcbAtom a2(c, msg); + XcbAtom a1(c, msg + QByteArrayLiteral("_BEGIN")); const xcb_screen_t *screen = defaultScreen(c, screenNumber); if (!screen) { return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/src/netwm.cpp new/kwindowsystem-5.5.0/src/netwm.cpp --- old/kwindowsystem-5.4.0/src/netwm.cpp 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/src/netwm.cpp 2014-12-06 13:47:31.000000000 +0100 @@ -264,6 +264,7 @@ delete [] p->class_class; delete [] p->class_name; delete [] p->activities; + delete [] p->client_machine; int i; for (i = 0; i < p->icons.size(); i++) { @@ -2774,6 +2775,7 @@ p->blockCompositing = false; p->urgency = false; p->input = true; + p->initialMappingState = NET::Withdrawn; p->protocols = NET::NoProtocol; // p->strut.left = p->strut.right = p->strut.top = p->strut.bottom = 0; @@ -2836,6 +2838,7 @@ p->blockCompositing = false; p->urgency = false; p->input = true; + p->initialMappingState = NET::Withdrawn; p->protocols = NET::NoProtocol; // p->strut.left = p->strut.right = p->strut.top = p->strut.bottom = 0; @@ -3934,6 +3937,7 @@ dirty2 |= WM2GroupLeader; dirty2 |= WM2Urgency; dirty2 |= WM2Input; + dirty2 |= WM2InitialMappingState; } else if (pe->atom == XCB_ATOM_WM_TRANSIENT_FOR) { dirty2 |= WM2TransientFor; } else if (pe->atom == XCB_ATOM_WM_CLASS) { @@ -4112,7 +4116,7 @@ cookies[c++] = xcb_get_property(p->conn, false, p->window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 1); } - if (dirty2 & (WM2GroupLeader | WM2Urgency | WM2Input)) { + if (dirty2 & (WM2GroupLeader | WM2Urgency | WM2Input | WM2InitialMappingState)) { cookies[c++] = xcb_get_property(p->conn, false, p->window, XCB_ATOM_WM_HINTS, XCB_ATOM_WM_HINTS, 0, 9); } @@ -4570,7 +4574,7 @@ p->transient_for = get_value_reply<xcb_window_t>(p->conn, cookies[c++], XCB_ATOM_WINDOW, 0); } - if (dirty2 & (WM2GroupLeader | WM2Urgency | WM2Input)) { + if (dirty2 & (WM2GroupLeader | WM2Urgency | WM2Input | WM2InitialMappingState)) { xcb_get_property_reply_t *reply = xcb_get_property_reply(p->conn, cookies[c++], 0); if (reply && reply->format == 32 && reply->value_len == 9 && reply->type == XCB_ATOM_WM_HINTS) { @@ -4579,6 +4583,22 @@ if (hints->flags & (1 << 0)/*Input*/) { p->input = hints->input; } + if (hints->flags & (1 << 1)/*StateHint*/) { + switch (hints->initial_state) { + case 3: // IconicState + p->initialMappingState = Iconic; + break; + + case 1: // NormalState + p->initialMappingState = Visible; + break; + + case 0: // WithdrawnState + default: + p->initialMappingState = Withdrawn; + break; + } + } if (hints->flags & (1 << 6)/*WindowGroupHint*/) { p->window_group = hints->window_group; } @@ -4795,6 +4815,11 @@ return p->input; } +NET::MappingState NETWinInfo::initialMappingState() const +{ + return p->initialMappingState; +} + const char *NETWinInfo::windowClassClass() const { return p->class_class; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/src/netwm.h new/kwindowsystem-5.5.0/src/netwm.h --- old/kwindowsystem-5.4.0/src/netwm.h 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/src/netwm.h 2014-12-06 13:47:31.000000000 +0100 @@ -1391,6 +1391,17 @@ bool input() const; /** + * Returns the initial mapping state as set in WM_HINTS. + * See ICCCM 4.1.2.4 and 4.1.4. + * + * The default value if @c Withdrawn in case the Client is mapped without + * a WM_HINTS property or without the initial state hint set. + * + * @since 5.5 + **/ + MappingState initialMappingState() const; + + /** * Returns the class component of the window class for the window * (i.e. WM_CLASS property). */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/src/netwm_def.h new/kwindowsystem-5.5.0/src/netwm_def.h --- old/kwindowsystem-5.4.0/src/netwm_def.h 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/src/netwm_def.h 2014-12-06 13:47:31.000000000 +0100 @@ -678,6 +678,7 @@ @li WM2Urgency urgency hint in WM_HINTS (see ICCCM 4.1.2.4) @li WM2Input input hint (input in WM_HINTS, see ICCCM 4.1.2.4) @li WM2Protocols see NET::Protocol + @li WM2InitialMappingState initial state hint of WM_HINTS (see ICCCM 4.1.2.4) **/ enum Property2 { WM2UserTime = 1u << 0, @@ -704,6 +705,7 @@ WM2Urgency = 1u << 21, // @since 5.3 WM2Input = 1u << 22, // @since 5.3 WM2Protocols = 1u << 23, // @since 5.3 + WM2InitialMappingState = 1u << 24, // @since 5.5 WM2AllProperties = ~0u }; Q_DECLARE_FLAGS(Properties2, Property2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwindowsystem-5.4.0/src/netwm_p.h new/kwindowsystem-5.5.0/src/netwm_p.h --- old/kwindowsystem-5.4.0/src/netwm_p.h 2014-11-02 13:21:19.000000000 +0100 +++ new/kwindowsystem-5.5.0/src/netwm_p.h 2014-12-06 13:47:31.000000000 +0100 @@ -167,6 +167,7 @@ bool blockCompositing; bool urgency; bool input; + NET::MappingState initialMappingState; NET::Protocols protocols; int ref; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
