fix wm icon geometry on hidpi

Change-Id: I836b6a00624e0e7efba3872a56b1e9802787d4b7
This commit is contained in:
石博文 2017-09-19 13:43:56 +08:00 committed by Deepin Code Review
parent bb41796fbc
commit 685991b7d4
Notes: Deepin Code Review 2017-09-20 11:23:52 +08:00
Verified+1: Anonymous Coward #1000004
Code-Review+2: 石博文 <sbw@sbw.so>
Submitted-by: 石博文 <sbw@sbw.so>
Submitted-at: Wed, 20 Sep 2017 11:23:51 +0800
Reviewed-on: https://cr.deepin.io/26421
Project: dde/dde-dock
Branch: refs/heads/master

View File

@ -21,6 +21,7 @@
#include <QDebug>
#include <QX11Info>
#include <QApplication>
#include <xcb/xcb.h>
#include <xcb/xcb_ewmh.h>
@ -118,5 +119,7 @@ void XcbMisc::set_window_icon_geometry(xcb_window_t winId, QRect geo)
{
// qDebug() << Q_FUNC_INFO << winId << geo;
xcb_ewmh_set_wm_icon_geometry(&m_ewmh_connection, winId, geo.x(), geo.y(), geo.width(), geo.height());
const auto ratio = qApp->devicePixelRatio();
xcb_ewmh_set_wm_icon_geometry(&m_ewmh_connection, winId, geo.x() * ratio, geo.y() * ratio, geo.width() * ratio, geo.height() * ratio);
}