Fixed zooming bug in native-host-ext [Chrome] (#1936)
Co-authored-by: alazymeme <jkeasley@icloud.com> Co-authored-by: 23rd <23rd@vivaldi.net> Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -191,7 +191,6 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
|
||||
const QJsonObject &root)
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
QString action = root.value("action").toString();
|
||||
|
||||
if (action.isNull())
|
||||
@@ -211,13 +210,20 @@ void NativeMessagingServer::ReceiverThread::handleMessage(
|
||||
AttachedWindow::GetArgs args;
|
||||
args.winId = root.value("winId").toString();
|
||||
args.yOffset = root.value("yOffset").toInt(-1);
|
||||
args.x = root.value("size").toObject().value("x").toInt(-1);
|
||||
args.width = root.value("size").toObject().value("width").toInt(-1);
|
||||
args.height = root.value("size").toObject().value("height").toInt(-1);
|
||||
|
||||
{
|
||||
const auto sizeObject = root.value("size").toObject();
|
||||
args.x = sizeObject.value("x").toDouble(-1.0);
|
||||
args.pixelRatio = sizeObject.value("pixelRatio").toDouble(-1.0);
|
||||
args.width = sizeObject.value("width").toInt(-1);
|
||||
args.height = sizeObject.value("height").toInt(-1);
|
||||
}
|
||||
|
||||
args.fullscreen = attachFullscreen;
|
||||
|
||||
qCDebug(chatterinoNativeMessage)
|
||||
<< args.x << args.width << args.height << args.winId;
|
||||
<< args.x << args.pixelRatio << args.width << args.height
|
||||
<< args.winId;
|
||||
|
||||
if (_type.isNull() || args.winId.isNull())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user