Skip to content
Snippets Groups Projects
Commit ddaa5683 authored by Nick's avatar Nick :v:
Browse files

prepare for pointer capture

Change-Id: I80e19676f7261ff423f78a4765ce9aac039434fe
parent 5212b891
No related branches found
No related tags found
No related merge requests found
......@@ -193,6 +193,11 @@ public class VncFlinger extends Service implements DisplayManager.DisplayListene
mOldPointerIcon = icon;
mOldPointerIconId = iconId;
}
@Override
public void onCaptureChanged(boolean enabled) throws RemoteException {
notifyServerCaptureChanged(enabled);
}
});
inputManager.setForceNullCursor(true);
} else {
......@@ -391,4 +396,6 @@ public class VncFlinger extends Service implements DisplayManager.DisplayListene
private native void endAudioStreamer();
private native void notifyServerCursorChanged(PointerIcon icon);
private native void notifyServerCaptureChanged(boolean enabled);
}
......@@ -68,7 +68,7 @@ class AndroidDesktop : public rfb::SDesktop,
int32_t mLayerId = -1;
sp<VirtualDisplay> mVirtualDisplay;
int32_t _width = 1, _height = 1, _rotation = 0;
bool touch = false, relative = false, clipboard = false;
bool touch = false, relative = false, clipboard = false, capture = false;
std::mutex jniConfigMutex;
private:
virtual void notify();
......
......@@ -115,6 +115,14 @@ extern "C" void Java_com_libremobileos_vncflinger_VncFlinger_notifyServerCursorC
return;
}
extern "C" void Java_com_libremobileos_vncflinger_VncFlinger_notifyServerCaptureChanged(
JNIEnv* env, jboolean enabled) {
if (desktop != NULL) {
desktop->capture = enabled;
}
return;
}
extern "C" jint Java_com_libremobileos_vncflinger_VncFlinger_initializeVncFlinger(JNIEnv *env,
jobject thiz,
jobjectArray command_line_args) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment