mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-27 05:38:37 +08:00
update
This commit is contained in:
parent
2bd03ad9d8
commit
67518fb4e6
@ -6,9 +6,6 @@
|
|||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
IPC::IPC(uint32_t profileId)
|
IPC::IPC(uint32_t profileId)
|
||||||
: profileId{profileId}
|
: profileId{profileId}
|
||||||
@ -88,7 +85,7 @@ time_t IPC::postEvent(const QString& name, const QByteArray& data, uint32_t dest
|
|||||||
memcpy(evt->data, data.constData(), data.length());
|
memcpy(evt->data, data.constData(), data.length());
|
||||||
mem->lastEvent = evt->posted = result = qMax(mem->lastEvent + 1, time(nullptr));
|
mem->lastEvent = evt->posted = result = qMax(mem->lastEvent + 1, time(nullptr));
|
||||||
evt->dest = dest;
|
evt->dest = dest;
|
||||||
evt->sender = getpid();
|
evt->sender = qApp->applicationPid();
|
||||||
qDebug() << "postEvent " << name << "to" << dest;
|
qDebug() << "postEvent " << name << "to" << dest;
|
||||||
}
|
}
|
||||||
globalMemory.unlock();
|
globalMemory.unlock();
|
||||||
@ -170,7 +167,7 @@ IPC::IPCEvent* IPC::fetchEvent()
|
|||||||
memset(evt, 0, sizeof(IPCEvent));
|
memset(evt, 0, sizeof(IPCEvent));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evt->posted && !evt->processed && evt->sender != getpid()
|
if (evt->posted && !evt->processed && evt->sender != qApp->applicationPid()
|
||||||
&& (evt->dest == profileId || (evt->dest == 0 && isCurrentOwnerNoLock()))) {
|
&& (evt->dest == profileId || (evt->dest == 0 && isCurrentOwnerNoLock()))) {
|
||||||
return evt;
|
return evt;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ Item {
|
|||||||
id:root
|
id:root
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: -3
|
anchors.margins: -3
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
width: root.width
|
width: root.width
|
||||||
height: root.height
|
height: root.height
|
||||||
|
Loading…
Reference in New Issue
Block a user