D28112: [WIP] Expose application menu via KWindowInfo
Vlad Zahorodnii
noreply at phabricator.kde.org
Wed Mar 18 08:29:54 GMT 2020
zzag requested changes to this revision.
zzag added a reviewer: KWin.
zzag added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> netwininfotestclient.cpp:281-319
> +void NetWinInfoTestClient::testAppMenuObjectPath()
> +{
> + ATOM(_KDE_NET_WM_APPMENU_OBJECT_PATH)
> + UTF8
> + INFO
> +
> + QVERIFY(!info.appMenuObjectPath());
You have to change properties via xcb_change_property().
void NetWinInfoTestClient::testAppMenuObjectPath()
{
ATOM(_KDE_NET_WM_APPMENU_OBJECT_PATH)
INFO
QVERIFY(!info.appMenuObjectPath());
xcb_change_property(connection(), XCB_PROP_MODE_REPLACE, m_testWindow,
atom, XCB_ATOM_STRING, 8, 4, "foo\0");
xcb_flush(connection());
waitForPropertyChange(&info, atom, NET::Property(0), NET::WM2AppMenuObjectPath);
QCOMPARE(info.appMenuObjectPath(), "foo");
}
void NetWinInfoTestClient::testAppMenuServiceName()
{
ATOM(_KDE_NET_WM_APPMENU_SERVICE_NAME)
INFO
QVERIFY(!info.appMenuServiceName());
xcb_change_property(connection(), XCB_PROP_MODE_REPLACE, m_testWindow,
atom, XCB_ATOM_STRING, 8, 4, "foo\0");
xcb_flush(connection());
waitForPropertyChange(&info, atom, NET::Property(0), NET::WM2AppMenuServiceName);
QCOMPARE(info.appMenuServiceName(), "foo");
}
> netwm_def.h:727-728
> WM2GTKFrameExtents = 1u << 27, // NOT STANDARD @since 5.65
> + WM2AppMenuServiceName = 1u << 28,
> + WM2AppMenuObjectPath = 1u << 29,
> WM2AllProperties = ~0u
Missing `// NOT STANDARD @since`
> netwm.cpp:3536
> + xcb_change_property(p->conn, XCB_PROP_MODE_REPLACE, p->window, p->atom(_KDE_NET_WM_APPMENU_OBJECT_PATH),
> + p->atom(UTF8_STRING), 8, strlen(p->appmenu_object_path),
> + (const void *) p->appmenu_object_path);
s/p->atom(UTF8_STRING)/XCB_ATOM_STRING/
> netwm.cpp:3550
> + xcb_change_property(p->conn, XCB_PROP_MODE_REPLACE, p->window, p->atom(_KDE_NET_WM_APPMENU_SERVICE_NAME),
> + p->atom(UTF8_STRING), 8, strlen(p->appmenu_service_name),
> + (const void *) p->appmenu_service_name);
s/p->atom(UTF8_STRING)/XCB_ATOM_STRING/
> netwm.cpp:4681
> +
> + const QByteArray id = get_string_reply(p->conn, cookies[c++], p->atom(UTF8_STRING));
> + if (id.length() > 0) {
s/p->atom(UTF8_STRING)/XCB_ATOM_STRING/
> netwm.cpp:4691
> +
> + const QByteArray id = get_string_reply(p->conn, cookies[c++], p->atom(UTF8_STRING));
> + if (id.length() > 0) {
s/p->atom(UTF8_STRING)/XCB_ATOM_STRING/
REPOSITORY
R278 KWindowSystem
REVISION DETAIL
https://phabricator.kde.org/D28112
To: cblack, #plasma, broulik, zzag, #kwin
Cc: zzag, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200318/db43ad99/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list