Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/pxScene2d/src/pxWayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ void pxWayland::createDisplay(rtString displayName)

if ( mUseDispatchThread && !mRemoteObjectName.isEmpty() )
{
mWaitingForRemoteObject = true;
startRemoteObjectDetection();
}
}
Expand Down Expand Up @@ -692,6 +691,7 @@ void pxWayland::remoteDisconnectedCB(void *data)

void pxWayland::startRemoteObjectDetection()
{
mWaitingForRemoteObject = true;
int rc= pthread_create( &mFindRemoteThreadId, NULL, findRemoteThread, this );
if ( rc )
{
Expand Down
2 changes: 1 addition & 1 deletion examples/pxScene2d/src/pxWayland.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class pxWayland: public pxIView {
rtError addListener(const rtString& eventName, const rtFunctionRef& f);
rtError delListener(const rtString& eventName, const rtFunctionRef& f);
rtError startRemoteObjectLocator();
void startRemoteObjectDetection();
rtError connectToRemoteObject(unsigned int timeout_ms);
rtError useDispatchThread(bool use);
rtError resume(const rtValue& v, bool& b);
Expand Down Expand Up @@ -201,7 +202,6 @@ class pxWayland: public pxIView {
uint32_t getModifiers( uint32_t flags );
bool isRotated();
uint32_t linuxFromPX( uint32_t keyCode );
void startRemoteObjectDetection();
rtError connectToRemoteObject();

protected:
Expand Down
12 changes: 12 additions & 0 deletions examples/pxScene2d/src/pxWaylandContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,18 @@ void pxWaylandContainer::clientStoppedAbnormal( int pid, int signo )
mEmit.send("onClientStopped", e);
}

void pxWaylandContainer::remoteDisconnected(void * data)
{
UNUSED_PARAM(data);
if (!mIsDisposed) {
mRemoteReady = new rtPromise();
if ( mWayland )
{
mWayland->startRemoteObjectDetection();
}
}
}

void pxWaylandContainer::isReady( bool ready )
{
mReady.send(ready?"resolve":"reject", this);
Expand Down
1 change: 1 addition & 0 deletions examples/pxScene2d/src/pxWaylandContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class pxWaylandContainer: public pxViewContainer, pxWaylandEvents {
virtual void clientStoppedAbnormal( int pid, int signo );
virtual void isReady( bool ready );
virtual void isRemoteReady(bool ready);
virtual void remoteDisconnected(void * data);
virtual void sendPromise();

rtError displayName(rtString& s) const;
Expand Down