summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-05-17 17:57:15 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-05-17 17:57:15 +0900
commit64fa7dee0e68f216e9fc1efc91d9c6079a5f3c7b (patch)
treebc173956c1f3007932e60d4af8bcbbe4f2384187
parent0ed2885ececf079f16b42fec60a4dc86285b5101 (diff)
-rw-r--r--app/main.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 6194c25..5591afd 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -69,24 +69,15 @@ int main(int argc, char *argv[])
std::string token = secret.toStdString();
hs->init(port, token.c_str());
// Set the event handler for Event_TapShortcut which will activate the surface for windowmanager
- hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [qwm, myname](json_object *object){
-
- json_object *appnameJ = nullptr;
- if(json_object_object_get_ex(object, "application_name", &appnameJ))
- {
- const char *appname = json_object_get_string(appnameJ);
- if(QString::compare(myname, appname, Qt::CaseInsensitive) == 0)
- {
- qDebug("Surface %s got tapShortcut\n", appname);
- json_object *para, *area;
- json_object_object_get_ex(object, "parameter", &para);
- json_object_object_get_ex(para, "area", &area);
- const char *displayArea = json_object_get_string(area);
- qDebug("Surface %s got tapShortcut area\n", displayArea);
-// qwm->activateWindow(myname, QString(QLatin1String(displayArea)));
- qwm->activateWindow(myname, "master.split.sub");
- }
- }
+ hs->set_event_handler(LibHomeScreen::Event_ShowWindow, [qwm, myname](json_object *object){
+ qDebug("Surface tbtnavi got Event_ShowWindow.\n");
+ json_object *para, *area;
+ json_object_object_get_ex(object, "parameter", &para);
+ json_object_object_get_ex(para, "area", &area);
+ const char *displayArea = json_object_get_string(area);
+ qDebug("Surface %s got tapShortcut area\n", displayArea);
+// qwm->activateWindow(myname, QString(QLatin1String(displayArea)));
+ qwm->activateWindow(myname, "master.split.sub");
});
#endif
qmlRegisterType<QCheapRuler>("com.mapbox.cheap_ruler", 1, 0, "CheapRuler");